-
Notifications
You must be signed in to change notification settings - Fork 0
/
SW Story
106 lines (97 loc) · 2.71 KB
/
SW Story
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
103
104
105
106
import random
import time
story_fragments = [
"was training with Yoda on Dagobah.",
"watched as the Death Star approached the rebel base dangerously.",
"was on a secret mission on Tatooine.",
"was leading a meeting of the rebel council.",
"was meditating in their meditation chamber, planning their next move.",
"was fighting against the Imperial soldiers.",
"was negotiating with smugglers at the spaceport.",
"discovered an ancient Jedi temple.",
"escaped from a trap set by the Empire.",
"was repairing the Millennium Falcon.",
"was piloting an X-Wing in a space battle.",
"was investigating a distress signal on a desert planet.",
"infiltrated the Sith base on Korriban.",
"rescued prisoners on the Leviathan ship.",
"was searching for clues about Darth Revan's whereabouts.",
"explored the ruins of Dantooine.",
"fought against the Mandalorians on Dxun.",
"faced war droids on the planet Manaan.",
"commanded their squad on a mission in Kashyyyk.",
"disarmed bombs on the Invisible Hand ship."
]
attributes = [
"interesting",
"dangerous",
"mysterious",
"heroic",
"treacherous",
"surprising",
"exciting",
"intense",
"crucial",
"difficult"
]
characters = [
"Luke Skywalker",
"Han Solo",
"Chewbacca",
"Princess Leia",
"Darth Vader",
"Obi-Wan Kenobi",
"R2-D2",
"C-3PO",
"Yoda",
"Emperor Palpatine",
"Lando Calrissian",
"Boba Fett",
"Padmé Amidala",
"Anakin Skywalker",
"Mace Windu",
"Qui-Gon Jinn",
"Rey",
"Finn",
"Kylo Ren",
"Poe Dameron",
"Darth Revan",
"Bastila Shan",
"Canderous Ordo",
"HK-47",
"Carth Onasi",
"Darth Malak",
"Darth Nihilus",
"Darth Sion",
"Atton Rand",
"Bao-Dur",
"Mira",
"Scorch",
"Sev",
"Boss",
"Fixer"
]
linking_words = [
"Then,",
"Afterwards,",
"Later,",
"Next,",
"Subsequently,",
"Following that,"
]
def generate_story(fragments, attributes, characters, linking_words):
story = []
random_fragments = random.sample(fragments, len(fragments))
for i, fragment in enumerate(random_fragments):
attribute = random.choice(attributes)
character = random.choice(characters)
if i > 0:
linking_word = random.choice(linking_words)
story.append(f"{linking_word} {character} {fragment} Valuation: {attribute}.")
else:
story.append(f"{character} {fragment} Valuation: {attribute}.")
return "\n".join(story)
generated_story = generate_story(story_fragments, attributes, characters, linking_words)
for line in generated_story.split('\n'):
print(line)
time.sleep(2)