File size: 2,359 Bytes
c8c2f6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import { pick } from "@/lib/utils/pick"
import {
  addons, // Fragments to add to the end of sentences for different moods. Many include preceding commas or periods.
  adjectives,  // For use with `nouns` or `concepts`
  concepts, // Complex nouns
  descriptions, // For use with `locations`
  gametypes, // Video game genres/playstyles/feels
  locations, // Nouns that represent places
  nouns, // Simple things that can act or be acted upon
  superlatives, // Adjectives that express the extremes of something. For use with `nouns`, `concepts`, or `locations`
  verbSecondPerson,  // Verbs for use with "you" or "they" as in "you help the aardvark" or "they fight a bird"
  verbSecondConcepts,  // Verbs for use with "you" or "they" in combination with `concepts` as in "you are helped by the King" or "they fight against traditions"
  verbThirdPerson, // Verbs for use with `nouns` as in "The aardvark anticipates rain"
} from "@/lib/fun-words"


const moodTypes = [
  "A fantasy",
  "An epic",
  "A beautiful",
  "A science-fiction",
  "A boring",
  "A sad",
  "A cheerful",
  "A funny",
  "A funny",
  "A trending",
  "A cute",
  "An interesting",
  "An outrageous",
  "A dark",
  "A 3D-rendered",
  "An animated",
  "Burlesque",
  "Short",
  "Long",
  "An inspiring",
  "A marketing",
  "A commercial",
  "An internet",
  "A stupid",
  "A vintage",
]

const videoTypes = [
  "fail compilation",
  "influencer meltdown",
  "breaking news",
  "newscast",
  "politician speech",
  "found footage",
  "meme video",
  "rap video",
  "animal documentary",
  "music video",
  "live video",
  "advert",
  "instagram video",
  "short movie",
  "documentary",
  "movie trailer",
  "TikTok video",
]

const locationTypes = [
  "in some",
  // "set somewhere in",
  "near some",
]

export function generateRandomStory() {

  let pickedWords: any[] = []

  function randomize<T>(words: T[]): T {
    const picked = pick(words, '' as T)
    pickedWords.push(picked as any)
    return picked
  } 

  return `${
    pick(moodTypes, '')
  } ${
    pick(videoTypes, '')
  }${
    Math.random() > 0.5 ? "," : ""
  } ${
    pick(locationTypes, '')
  } ${
    randomize(descriptions)
  } and ${
    randomize(descriptions)
  } ${
    randomize(locations)
  }. It is about ${
    randomize(nouns)[1]
  }, ${
    randomize(nouns)[0]
  } ${
    randomize(nouns)[1]
  } and..`
}