-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainCode.py
418 lines (363 loc) · 15.9 KB
/
mainCode.py
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
import time
import temple1
import importantStuff
characterInventory = importantStuff.characterInventory
stick = importantStuff.stick
mName = importantStuff.mName
runOrFight = importantStuff.runOrFight
# def add_inventory(key, amount):
def play_again():
play = input("Do you want to play again?"
"Yes(a) or no(b)")
if play.lower()[:1:] == "a" or play.lower()[:1:] == "y":
welcome()
else:
importantStuff.print_delay("Okay, killing whole program.", 1)
return
def welcome():
characterInventory.clear()
print("Welcome to Story Path!")
time.sleep(1)
print("In this game, YOU will be the one making the actions, and if YOU die...")
time.sleep(1)
print('YOU will be the one taking fault.')
time.sleep(2)
print('Are')
time.sleep(.5)
print('You')
time.sleep(.5)
print('Ready?!?!?!')
are_you_ready = input()
if are_you_ready.lower()[:1:] == "y":
start()
else:
print("Okay, bye.")
return
def start():
print("Now, let us begin.")
setting()
# This will be the setting that they are in. If you want to change,
# just rewrite the wording a little bit.
# Should we ask for the name right now, or later?
def setting():
print('You awake to find yourself stranded in a forest,')
time.sleep(1)
print('not knowing where you are, or how you got there.')
time.sleep(.1)
print('...')
time.sleep(1)
print("You spot a spaceship right next to you.")
time.sleep(1)
print("Do you want to investigate the spaceship,"
"or explore the forest a little bit further?")
is_valid_response = False
while not is_valid_response:
investigate_or_explore = input('investigate or explore?')
if investigate_or_explore.lower()[:1:] == "i":
is_valid_response = True
spaceship_investigation()
elif investigate_or_explore.lower()[:1:] == "e":
is_valid_response = True
maze_forest()
else:
print("Invalid try again.")
def maze_forest():
print("As you walk deeper into the forest, you find yourself getting lost.")
time.sleep(1)
print("Soon, you cannot find your way anywhere.")
time.sleep(1)
print("You cannot see, and you stumble.")
time.sleep(1)
print("You crash into a tree, and receive a bad concussion.")
time.sleep(1)
print("Your brain bleeding internally,")
time.sleep(.5)
print("you die. The End.")
play_again()
time.sleep(1.1)
importantStuff.print_delay("Your eyesight is hazy, and your head really hurts.", 1.5)
print("Do you want to search your pockets (s),"
"or try to find your way back to the spaceship (f)?")
is_valid_response = False
while not is_valid_response:
search_or_find = input()
if search_or_find.lower()[:1:] == "s":
is_valid_response = True
search_pockets()
if search_or_find.lower()[:1:] == "f:":
is_valid_response = True
find_spaceship()
def find_spaceship():
importantStuff.print_delay("When you try to find you way"
"back to the spaceship, you meet"
"a dark shape blocking your path.", 3)
print("Do you want to run away (r),"
"or try to get around it (g),"
"or feel amazing and attack it head on (a)?")
is_valid_response = False
while not is_valid_response:
if input().lower()[:1:] == "r":
is_valid_response = True
importantStuff.print_delay("After running for some time, you get tired."
"Since it is night, and you cannot find your"
"way anywhere, you just fall asleep in a "
"tree trunk, but you never see the daylight again.", 4.1)
play_again()
if input().lower()[:1:] == "g":
is_valid_response = True
importantStuff.print_delay("As you try to sneakily get around it,"
"it seems to be working.", 1.25)
def search_pockets():
pass
def spaceship_investigation():
importantStuff.clear_screen()
print("When you reach the spaceship, you see a couple of things:")
time.sleep(1.25)
print(" 1) A ray gun")
time.sleep(1)
print(" 2) A vest, very thick and looking uncomfortable to put on")
time.sleep(1.5)
print(" 3) 5 chemical vials")
time.sleep(1)
print(" 4) A portable sleeping bag")
time.sleep(1)
print(' 5) A bag labeled "food"')
time.sleep(1)
print(" 6) a belt labeled 'gravity belt'")
time.sleep(1)
print("You see that the cockpit is not that big,"
"and that even though you have enough supplies,")
time.sleep(2)
print("you might find something of use in the cargo space.")
time.sleep(1.5)
cargo_explore = input("Do you want to explore(e) or pick up(p)?")
if cargo_explore.lower()[:1:] == "e":
meeting_monster()
elif cargo_explore.lower()[:1:] == "p":
choose_from_cockpit()
pass
cargo_explore = input("Do you want to explore(e) or pick up(p)?")
if cargo_explore.lower()[:1:] == "e":
meeting_monster()
elif cargo_explore.lower()[:1:] == "p":
pass
def choose_from_cockpit():
print(" 1) A ray gun")
time.sleep(1)
print(" 2) A vest, very thick and looking uncomfortable to put on")
time.sleep(1.5)
print(" 3) 5 chemical vials")
time.sleep(1)
print(" 4) A portable sleeping bag")
time.sleep(1)
print(' 5) A bag labeled "food"')
time.sleep(1)
print(" 6) a belt labeled 'gravity belt'")
item_chose = input(importantStuff.print_delay("What do you want from the cockpit?", 1.5))
if item_chose == 1 or item_chose.lower()[:1:] == "r":
pass
elif item_chose == 2 or item_chose.lower()[:1:] == "v":
pass
elif item_chose == 3 or item_chose.lower()[:1:] == "c":
pass
elif item_chose == 4 or item_chose.lower()[:1:] == "s":
pass
elif item_chose == 5 or item_chose.lower()[:1:] == "b":
pass
elif item_chose == 6 or item_chose.lower()[:1:] == "g":
pass
def meeting_monster():
print("You hear a noise when you open the cargo crate.")
monster = input("Do you want to investigate the noise?")
if monster.lower()[:1:] == "y":
print("You find a large monster that is snoring."
"You gently poke it.")
time.sleep(1.25)
print("You leave some food in front of it and you sit there and wait.")
time.sleep(7)
print("after a while. the monster wakes up, gobbles up the food,"
"and looks at you.")
time.sleep(2)
print("HI. It's great deep voice rumbles around you.")
time.sleep(1.5)
print("You believe that he is friendly.")
time.sleep(1)
temple1.live_with_monster()
# # def choose_from_cockpit(cannot_pick1, cannot_pick2, cannot_pick3, cannot_pick4, cannot_pick5, cannot_pick6):
# # is_valid_response = False
# while not is_valid_response:
# what_pick = input("What do you want to pick up?"
# "You can only pick up one thing:"
# "1, 2, 3, 4, 5, or 6?")
# if what_pick == "1":
# if cannot_pick1.lower()[:1:] == "r"\
# or cannot_pick2.lower()[:1:] == "r"\
# or cannot_pick3.lower()[:1:] == "r"\
# or cannot_pick4.lower()[:1:] == "r"\
# or cannot_pick5.lower()[:1:] == "r"\
# or cannot_pick6.lower()[:1:] == "r":
# pass
# else:
# is_valid_response = True
# maze_forest_sleep()
# elif what_pick == "2":
# is_valid_response = True
# characterInventory.update({"vest": 1})
# maze_forest()
# elif what_pick == "3":
# is_valid_response = True
# print_delay("You burn yourself, and get mutated into a monster.", 1)
# print_delay("The spaceship self-defense system activates and you get shot, and die.", 1.25)
# play_again()
# elif what_pick == "4":
# characterInventory.update({"port-sleeping bag": 1})
# is_valid_response = True
# maze_forest() # This we still need to fix.
# elif what_pick == "5":
# characterInventory.update({"food": 5})
# is_valid_response = True
# maze_forest() # Same here.
# elif what_pick == "6":
# print("You try it on, and nothing happens."
# "Do you want to pick another item?")
# pick_another_item = input()
# if pick_another_item.lower()[:1:] == "n":
# is_valid_response = True
# that_is_when_he_realized()
# else:
# choose_from_cockpit(None, None, None, None, None, None,)
# else:
# print_delay("Invalid response. Please pick one of the ones above.", 1.25)
#
#
# def clear_screen():
# if platform == "darwin":
# os.system('clear')
# elif platform == "linux" or platform == "linux2":
# # linux
# elif platform == "win32":
# os.system('cls')
def sleep():
print("You try to sleep.")
time.sleep(1.5)
importantStuff.print_delay("You toss and turn, really tired, but since you are so wired, you cannot sleep.", 1.5)
importantStuff.print_delay("And you notice a tag that is at the neck of the regoob, who is really tired.", 1.75)
importantStuff.print_delay("You toss and turn, really tired, but since you are so tired, you cannot sleep.", 1.5)
importantStuff.print_delay("And you notice a tag that is at the neck of the regoob, who is really tired.", 1.75)
tag = input("Do you want to read the tag? yes(y) or no(n)")
if tag.lower()[:1:] == "y":
read_tag()
else:
print("You go back to sleep, actually sleeping.")
# day 2
time.sleep(5)
print("The next day...")
time.sleep(1)
print("You wake up to find " + mName + " gone!")
print("You also find yourself chained up!")
time.sleep(2)
prison()
def prison():
print("You're stuck in ropes!")
print("YOU HAVE BEEN SENTENCED TO BE TIED UP UNTIL YOU READ THE TAG,"
"FOR IT IS MY DUTY!")
read = input("Do you want to read the tag?")
if read.lower()[:1:] == "y":
read_tag()
else:
importantStuff.print_delay("The creature that is looking at you now kills itself on the rocks,"
" and you, having nothing and no one to untie you, fall to the prey of "
"another creature and die.", 4)
play_again()
def read_tag():
importantStuff.print_delay("The tag read:", 1)
print(" This animal is a regoob, and they are very flexible, no skeleton at all!")
time.sleep(1.5)
print("But this animal is yours, and if you read this letter, then that means that you")
time.sleep(1.5)
print("did the right choice. regoobs are very strict to their instructions,"
"and this regoob's job was to give you this letter.")
time.sleep(1.25)
print("They will tie you up with anything that they have"
"until their deed is completed with you.")
time.sleep(2)
print("What you have to do is find the temples around this world called Yiggurt,"
"to find the pieces of your past.")
time.sleep(3)
journey()
def journey():
importantStuff.print_delay("THE JOURNEY", 1)
importantStuff.print_delay("Here is your inventory.", 1)
importantStuff.print_delay(characterInventory, 1.5)
importantStuff.print_delay("Now that you now where you are, you set out on the quest.", 3)
importantStuff.print_delay("You talk to the regoob, and he agrees to help you on the quest.", 0.5)
first_town()
importantStuff.print_delay("Now that you realize that this is your goal,", 1.5)
importantStuff.print_delay("You set off not knowing where to start.", 1.25)
importantStuff.print_delay("So you wander about, also wanting to find some food.", 1.5)
def maze_forest_sleep():
importantStuff.print_delay("When you go exploring, you hear your stomach grumble, "
"thinking that you have to go find food sooner or later.", 2)
importantStuff.print_delay("But before you go anywhere, you want to try out the ray gun first.", 1.75)
def first_town():
importantStuff.print_delay("You travel in a direction for 2 days when you stumble a cross a village.", 3)
importantStuff.print_delay("You notice that the regoob is lagging behind, and he looks scared.", 1)
do = input("Do you ask him why is looks scared?")
if do.lower()[:1:] == "y":
importantStuff.print_delay("He says that the village is a hunting village, and regoobs are very expensive", 2)
elif do.lower()[:1:] == "n":
importantStuff.print_delay("You keep on going thinking that he is just tired.", 1)
dead_regoob()
else:
importantStuff.print_delay("Invalid response: Try Again", 0.5)
def dead_regoob():
importantStuff.print_delay("You go to the village, and immediately you hear a trap go into action.", 3)
importantStuff.print_delay("You turn around and see that the regoob has been caught.", 1)
importantStuff.print_delay("You hide just in time, but you find the regoob being taken away"
"into the camp. Hear a squelch, and you know it's over.", 4)
depression()
def depression():
importantStuff.print_delay("Suffering from depression, you suicide by jumping into a pit of quick sand", 5)
def the_journey():
play_again()
importantStuff.print_delay("THE JOURNEY", 1)
importantStuff.print_delay("Here is your inventory.", 1)
importantStuff.print_delay(characterInventory, 1.5)
importantStuff.print_delay("Now that you know what to do, you set out on the quest.", 3)
importantStuff.print_delay("You talk to the regoob, and he agrees to help you on the quest.", 0.5)
importantStuff.print_delay("Now that you realize that this is your goal,", 1.5)
importantStuff.print_delay("You set off not knowing where to start.", 1.25)
importantStuff.print_delay("So you wander about, also wanting to find some food.", 1.5)
meeting_village()
def that_is_when_he_realized():
importantStuff.print_delay("as you walk, something tugs a little bit, but not hard. "
"You look down and see a medium sized branch.", 2)
importantStuff.print_delay("When you lift it from the gravity belt, you almost crumple from the sudden weight.", 1.5)
importantStuff.print_delay("When you clip it back onto your gravity belt, it feels almost weightless.", 2)
importantStuff.print_delay("This is when you realize you can take more things from the cockpit this way.", 1.5)
importantStuff.print_delay("Do you want to take more things from the cockpit? (yes or no)", 1.25)
is_valid_response = False
while not is_valid_response:
if input().lower()[:1:] == "y":
# choose_from_cockpit("gravityBelt", None, None, None, None, None)
pass
# while not is_valid_response:
# # if input().lower()[:1:] == "y":
# choose_from_cockpit("gravityBelt", None, None, None, None, None)
def meeting_village():
importantStuff.print_delay("You travel in a direction for 2 days when you stumble a cross a village.", 3)
importantStuff.print_delay("You notice that" + mName + "is lagging behind, and he looks scared.", 1)
do = input("Do you ask him why is looks scared?")
if do.lower()[:1:] == "y":
importantStuff.print_delay("THE VILLAGE IS A HUNTING VILLAGE, AND FINDING US IN THE WILD WOULD LEAD ME TO DEATH!!.", 2)
turn_around()
elif do.lower()[:1:] == "n":
importantStuff.print_delay("you just walk along, pondering why he is so scared.", 1.5)
get_shot()
def get_shot():
print("You ")
def turn_around():
print("You head back, and you go around the village.")
# Is this Welcome() at the end for if the player dies?
# No its to run
welcome()