-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.py
More file actions
1946 lines (1320 loc) · 53.1 KB
/
map.py
File metadata and controls
1946 lines (1320 loc) · 53.1 KB
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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from sys import exit # importing neccessities
from textwrap import dedent
from random import randint
from char import Player, Enemy
import items
####################################
#### Map Class is at the bottom####
####################################
user = Player("level_one_intro", "sgt's_office", 100)
error = False
# For error handling to catch users attention
def message_pop_up(message=dedent("Please select an option below and type in the terminal.")):
print(dedent("""
######## IMPORTANT ########
###########################
###########################
{}
###########################
###########################
""".format(message)))
# Merges all attack methods from Player into each and every battle.
def battles(enemy, enemy_weapon, message):
error = False
while enemy.health > 0 and user.health > 0:
enemy.attack(enemy_weapon, user)
choice = input('# ')
user_choices = user.attack_choice(choice)
if user_choices == None:
error = True
message_pop_up(dedent("""Due to your choice of neither A or B the room was
reset, sorry for your inconvience. """))
break
if user_choices != False:
print(user_choices)
if user_choices == False:
escaped = "You have escaped {}".format(enemy.name)
break
if 'What' in user_choices:
item_name = input('# ')
if items.find_item(user, item_name, "weapon") == False:
message_pop_up(dedent(
"""
Looks like that is not a weapon or it is not
in your inventory.
"""))
else:
item = items.find_item(user, item_name, "weapon")
print(dedent('Your item choice is {}'.format(item.name)))
user.attack(item, enemy)
# Going through outcomes of the battle based on importance
if error:
print(dedent('Looks like there was an error.'))
return user.saved_room
if user.health <= 0:
print(dedent(message))
return 'death'
elif enemy.health <= 0:
print(dedent(message))
ration = user.get_player_item_val("rations", user)
rando = randint(1, 4)
if rando == 1:
ration += 2
print("You got two rations from battle.")
elif rando == 2:
ration += 10
print("you got ten rations from battle.")
elif rando == 3:
print(dedent("You get nothing from this battle."))
elif rando == 4:
ration += 5
print("You got five ration from battle.")
return user.next_room
elif escaped:
print(escaped)
return user.next_room
else:
message_pop_up(dedent("""Error notify the creator of this issue. In the mean time sorry
for your inconvience."""))
### ###
### Possible Endings to the game ###
### ###
class Room(object):
"""Parent of all room objects and used for underconstruction features."""
def enter(self):
print(dedent("""
Sorry this level is still under construction. We
apoligize for any inconvience we have caused you. Have a good day!
"""))
exit(1)
class Death(Room):
def enter(self):
print("""You died a soldiers death that is all that matters.
____
__,---' `--.__
,-' ; `.
,' `--.`--.
,' `._ `-.
; ; `-- ;
,-'-_ _,-~~-. ,-- `.
;; `-,; ,'~`.__ ,;;; ; ;
;; ;,' ,;; `, ;;; `. ;
`: ,' `:; __/ `.; ; ;
;~~^. `. `---'~~ ;; ; ;
`,' `. `. .;;; ;'
,',^. `. `._ __ `:; ,'
`-' `--' ~`--'~~`--. ~ ,'
/;`-;_ ; ;. /. / ; ~~`-. ;
-._ ; ; ; `,;`-;__;---; `----'
`--.__ ``-`-;__;: ; ;__;
... `--.__ `-- `-'
`--.:::... `--.__ ____
`--:::::--. `--.__ __,--' `.
`--:::`;.... `--' ___ `.
`--`-:::... __ ) ;
~`-:::... `---. ( ,'
~`-:::::::::`--. `-.
~`-::::::::`. ;
~`--:::,' ,'
~~`--'~
""")
exit(1)
class Discharged(Room):
def enter(self):
print(dedent("""
You got discharged from the military!!
You got caught breaking the rules and you loose the privlage to serve.
"""))
exit(1)
class Completed():
def enter(self):
rando = randint(1, 10)
if rando == 3:
ending_scene = """get shot by a crafty german sniper on the way back to base camp. Your
cold dead corpse never leaves the french country side. Your wife will never know if you
are KIA or POW.
THE END"""
elif rando == 2:
ending_scene = """fought near the effiel tower, you took a few hits
and are now listed as medically warrented to go home. You will finally get to see your baby
boy.
THE END"""
elif rando == 7:
ending_scene = """battle almost a year longer until all german's are gone of the
country side and you meet with Russian forces. You love your family, but you fight
for your country. After you are dismissed from duty and given a reward, your wife notifies
you of divorce.
THE END"""
else:
ending_scene = """are sent home with gratitude and pride. Finally your fight is over
and your family only had to wait for 3 months."""
print(dedent("""
You have been through it all. You prepared for war, played some
games and got the nerves. You have stormed the beachs of France, battled men and
helped men. And after all your struggles and all your efforts you {}""".format(ending_scene)))
exit(1)
########################
## Menu Options rooms ##
########################
class Menu(Room):
def enter(self):
print(dedent("""
#####################################################################
Welcome to the menu! How can I help you soldier?
A. Bartering stand and Repairs.
Note: (Option above has full list of items.)
B. Inventory related.
C. Eat
D. Quit the game (Note: No progress will be save.).
E. Back to game.
"""))
choice = input('# ')
if 'A' in choice:
return "shop"
elif 'B' in choice:
return "inventory"
elif 'C' in choice:
user.add_to_player_health()
return 'menu_enter'
elif 'D' in choice:
return "quit"
elif 'E' in choice:
return user.saved_room
else:
message_pop_up()
return "menu_enter"
# Quiting has to be an option (I guess)
class Quit(Room):
def enter(self):
message_pop_up(dedent("""
Are you sure you want to quit? You made it so far! Remember
no progress will be saved. (Type yes to quit and no to go back to menu.)"""))
choice = input("# ")
if 'yes' in choice:
print(dedent("Good bye."))
exit(0)
if 'no' in choice:
print(dedent('Redirecting back to menu......'))
return 'menu_enter'
else:
message_pop_up()
return 'quit'
class Shop(Room):
def enter(self):
print(dedent("""
#####################################################################
Welcome to the American depot soldier, or
what they call jimmy's bartering stand. I can repair weapons, trade,
and much more. What do you need?
A. Repair an item.
B. Buy an item
C. Sell an item
D. List all items in game.
E. Back to menu
"""))
choice = input("# ")
if 'A' in choice:
repair = items.repair_items(user)
return 'menu_enter'
elif 'B' in choice:
buy = items.buy_items()
return "menu_enter"
elif 'C' in choice:
items.sell_items()
return 'menu_enter'
elif 'D' in choice:
items.list_items()
return 'menu_enter'
elif 'E' in choice:
return "menu_enter"
else:
message_pop_up()
return "shop"
class Inventory(Room):
"""Displaying the inventory and other
actions related to invetory here."""
def enter(self):
print(dedent("""
Please choose an option for your inventory.
A. Check what is in your inventory.
B. Drop an item in your inventory.
C. Back to the main menu.
"""))
choice = input('# ')
if 'A' in choice:
user.check_inventory()
return 'menu_enter'
elif 'B' in choice:
user.drop()
return 'menu_enter'
elif 'C' in choice:
return 'menu_enter'
else:
message_pop_up()
#########################
## Start of game rooms ##
#########################
class LevelOneIntro(Room):
def enter(self):
print(dedent("""
Welcome! soldier what is your name?
"""))
user.name = input('# ')
if user.name == 'Brian':
user.add_to_inventory(items.bazooka)
print(dedent("Okay, {} you have been drafted!".format(user.name)))
print(dedent("""
Your family is worried sick. World war
two is raging across europe, you turned 18 just
weeks ago. The military needs extra troops on the
ground agaist the Nazi's. The Nazi's have infested
Europe like a cockroch colony. You will be assigned
to Unit 179.
"""))
return "sgt's_office"
class SgtsOffice(Room):
def enter(self):
"""Reminder for users to read the rules before playing."""
user.saved_room = "sgt's_office"
user.next_room = "path_to_war"
print(dedent("""
Welcome soldier I am a reminder here to tell you the
make sure to read the Rules.md file!
Did you read the rules and your ready to play??
A. yes
B. No
"""))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
elif 'A' in choice:
return "path_to_war"
elif 'B' in choice:
message_pop_up('Go read the Rules.md file!')
exit(0)
else:
message_pop_up()
return "sgt's_office"
class WarPath(Room):
""" You get to choose your last recreational activity as a soldier before
storming the beachs at normandy, France."""
def enter(self):
user.saved_room = 'path_to_war'
user.next_room = 'ship'
print(dedent(
"""
Everything is in it's place, you are off to war. In one short day you and all
your fellow soldiers will be loaded on to ship and headed for the invastion on normandy.
You see a few things around your barracks, a group men playing cards, your sgt and others
talking ops, your cozy bed and the range.
What do you want to do for your last day in America?
A. Play some cards
B. Talk ops with Sgt
C. Get some more rest
D. Get more rifle practice.
"""
))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
elif 'A' in choice:
# Random opportunity's in poker ordered by most likely to least likely
if randint(1, 4) == 3:
print(dedent("""
You played some poker, you won a thing or two, but got carried away. In the final round
you bet it all. You fell right into the bluff of a fellow private and lost it all. You lost 7 rations."""))
items.rations.quantity -= 7
print(dedent("You now have only {} rations.".format(items.rations.quantity)))
elif randint(1, 4) == 1:
print(dedent("""
You did pretty good for poker, you played fair and gained 5 rations"""))
items.rations.quantity += 5
print(dedent("You now have {} rations.".format(items.rations.quantity)))
elif randint(1, 50) == 33:
print(dedent("""
Uh Oh! Your sgt caught you playing poker under the table,
the group blames you. You are in big trouble."""))
return 'discharged'
elif randint(1, 50) == 14:
print(dedent("""
Wow!!! Looks like you were in an all stakes game with a bazooka
gunner. You won it all! You now have a bazooka in you midst."""))
user.add_to_inventory(items.bazooka)
else:
print(dedent("""
Your not to good at poker, you lost 2 rations for a bad round then you
called it a night."""))
items.rations.quantity -= 2
print(dedent("You now have only {} rations".format(items.rations.quantity)))
elif 'B' in choice:
print(dedent("""
You talked a bit and had fun talking shop with the Sgt, but you
took it a bit to far. You said some things you wish you didn't to Sgt and he took
a ration away."""))
items.rations.quantity -= 1
elif 'C' in choice:
print(dedent("""
You curl up on your bed and deciede to relax for the next few hours. Your
rest was quiet and comfortable. You are ready for battle."""))
elif 'D' in choice:
print(dedent("""
You shoot almost five bullets right on the nose of the bullseye. The troop
was so impress some gave you a few bullets. Your quality of your rifle was increased by 10 quality
points."""))
items.rifle.quality += 10
print(dedent(
"Your rifles quality is now {}, great choice.".format(items.rifle.quality)
))
else:
message_pop_up()
return 'path_to_war'
return 'ship'
class Ship(Room):
"""On the 3 day trip to normandy beach final training and
preperation before storming the beachs."""
def enter(self):
user.saved_room = 'ship'
user.next_room = 'normandy'
print(dedent("""
You and all your troop are loaded on to a ship labeled the USS great leap. For a 3 day journey
to Nazi occupied France. You are training on deck, going through drills and wishing you were home.
But, you have a duty and that is to America.
"""))
input('# ')
print(dedent("""
You are walking up the stairs from your room, to the deck to catch a glimpse of the
sky. However, you hear some ruckus on the deck. Seems like some of you fellow army men
are in a fight!!
"""))
print(dedent("""
"I will fucken kill you, you god damn ration theif" shouted Timothy.
"""))
input('# ')
print(dedent("""
"Yeah, I did not steal your rations you damn tweeker. Fuck off before I
lay a punch on ya." said Jimmy
"""))
input('# ')
print(dedent("""
"You lying sack of shit!" said Timothy with rage in his vains.
"""))
input('# ')
print(dedent("""
"Alright, thats it..." said Jimmy
"""))
print(dedent("""
Jimmy lays a punch and then Timothy. The fight starts to get rough.
What will you do?
A. Try to stop Jimmy by talking sense to the crowd.
B. Stand up for Timothy and fight Jimmy.
C. Watch the fight to see who wins.
D. Go back to your room.
"""))
choice = input('# ')
ship_mate = Enemy(5, "Jimmy")
if 'menu' in choice:
return 'menu_enter'
elif 'A' in choice:
print(dedent("""
You had the crowds attention for a a little while, but Jimmy did
not want to listen to your words. He knocked you out cold. You loose 10
health.
"""))
user.health -= 10
print(dedent("Your health is now {}".format(user.health)))
elif 'B' in choice:
print(dedent(
"""
You say "Hey, Jimmy". You kick his shin and he falls to the ground.
Everyone looks at you. Jimmy stares with rage.
"""
))
play = battles(
ship_mate, items.hands, """
Everyone looks at Jimmy's dead corpse. They all start
charging at you, and pin you to the floor. "You don't kill our own men!!!" some one screamed.
"""
)
return 'discharged'
elif 'C' in choice:
print(dedent("""
You take a seat on the side of the deck and watch Jimmy completly pound
on Timothys face. Everyone else left in a hurry when they saw sgt. But you
stayed. Your sgt's response is...
"""))
input('# ')
return 'discharged'
elif 'D' in choice:
print(dedent(
"""
You hurry back to your room. Just in time to catch Kyle in action, harboring
two glocks. You say "Hey, kyle I know we are not suppose to have those, but I
can forget about it if there is one for me and you."
"""
))
input('# ')
print(dedent(
"""
"Okay, {} I will give you one. But hush up these guns are not invented yet."
""".format(user.name)))
user.add_to_inventory(items.glock)
print(dedent('You now have a {} in your inventory.'.format(items.glock.name)))
else:
message_pop_up()
return 'ship'
return user.next_room
class NormandyBeach(Room):
"""First landing at france. Our player has to navigate through
decisions of death."""
def enter(self):
user.saved_room = 'normandy'
user.next_room = 'hell_beach'
print(dedent("""
Sgt said
"GENTAL MEN! ITS TIME TO PROVE YOUR WORTH.
In fifthteen minutes we will reach the shores of normandy
for our planned assualt off occupied france. Prepare your
gear and make peace with your God."
"""))
input('# ')
print(dedent("""
The USS Great Leap finally reaches the point of dock. All your
fellow soldiers rush in the beach ships. You hop in the ship, packed
like sardieens the ship struggles to the shore. Just when the front gate opens...
"""))
input('# ')
print(dedent("""
BANG!
The entire front of the ship is blown to oblivian. An artillary
blast took out 20 of your peers. Lucky for you, you were in the back
of the shipand live to die another day. A few others including your
SGT voided the blast.
"OKAY YOU SORRY BASTARDS, WE SAW THE FATE OF OUR MEN BUT THAT WILL NOT
STOP YOU NOW. GET YOUR RIFLES AND CHARGE OR I'LL KILL YOU MYSELF." sgt screamed over the rapid machine gun fire.
A. Charge in the beach with your peers.
B. Stay back and give cover fire.
C. Hide in the water and hope you live.
D. Scope out the flow of the beach.
"""))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
if 'A' in choice:
print(dedent("""
Just like a fresh cadet from New York would you charge the beach.
However, in 5 seconds you bit the bullet of a mp40. 7 bullets in
your body falls to the ground in an instant. You slowly bleed out
until a artillary blast gives you unintentional mersy.
"""))
return 'death'
elif 'B' in choice:
print(dedent("""
A calculated move you offer your cover fire to protect the rushing cadets.
Sgt approves you and 15 others to hold the line in prone position. Lucky for
the cadets you have their back. More than half make it to a guard tower where
they hold their position.
"""))
input('# ')
print(dedent("""
Quick thinking {}. Have a grenade it
could come in handy. said Sgt
""".format(user.name)))
add_to_inventory("grenade")
return user.next_room
elif 'C' in choice:
print(dedent("""
Too afraid to face the beach you cowar in the water watching
your fellow soldiers fight life and limb. Unlucky for you the
Sgt meant what he said.
"""))
sgt = Enemy(25, 'Sargent Bowers')
battles(
sgt, items.glock,
"""
Looks like the Sgt was quite a challenge. You ran to a structure
where it looks like soldiers are held up.
"""
)
return user.next_room
elif 'D' in choice:
print(dedent("""
Your eyes skim the beach on the left you see a trailing pile
of dead bodies along the lines of the barb wire. On your right you spot
a machine gunner plowing down every soldier attempting to conquer the beach.
Finally, dead ahead 100 meters you see a small structure and a few soldiers
holding their ground. Better than nothing...
"""))
input('# ')
print(dedent("""
You dash towards the group, and take
a hit in the shoulder on the way. You made it... barely.
"""))
user.health -= 30
print(dedent("""Your health is now down to {} because you got shot
in the arm on the way to the structure.""".format(user.health)))
return user.next_room
else:
message_pop_up()
return user.saved_room
class Hell_beach(object):
def enter(self):
user.saved_room = 'hell_beach'
user.next_room = 'quick'
print(dedent("""
Are you okay? a soldier exclaimed.
"""))
input('# ')
print(dedent("""
Well, sorry I asked we don't have time to talk. Two machine
gunners have us pinned. Only 11 of use left, but I guess 12
counting you. We are going to storm the left he reloads Every
7 minutes, for about 30 seconds.
"""))
input('# ')
print(dedent("""
Alright, here goes nothing!
A. Charge to the left with the rest of the troops.
B. Sneak to the right to see if you can catch the other gunner by suprise.
C. Lead the CHARGE
D. Prone down and fire your weapon at the gunner.
"""))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
if 'A' in choice:
print(dedent("""
The men scatter across the beach running towards the left gunner
and rifle in hand. You seen 5 brother in total get mowed down before
a brother gets the gunner with a rifle fire. They storm the gunners
hide out and kill two more and get one prisoner.
"""))
input('# ')
print(dedent("""
Looks like you found 3 rations on the dead bodies. lucky you.
"""))
rations = user.get_player_item_val("rations", user)
rations += 3
print('You now have {} rations'.format(rations))
return user.next_room
elif 'B' in choice:
print(dedent('''
Everyone charges to the left. You swiftly move to the right to
confront the right side machine gunner.
'''))
input('# ')
print(dedent('''
Your about to take the shot when, the gunner spots you and blasts
to infinity. You never stood a chance.
'''))
return 'death'
elif 'C' in choice:
print(dedent('''
You yell, "Hey I will lead the charge".
Everyone in the troop agrees.
'''))
input('# ')
print(dedent('''
One, two, three CHARGE!
Everyone runs with enthusiams towards the
machine gunner. Four men are mowed down almost
instantly. But you got in a lucky shot and nailed the
gunner right on his ass. You all quickly take the
hideout and get 3 men hostage.
'''))
input('# ')
print(dedent('''
Hey, brother you did a great job out there a soldier said.
We all pitched in and for what it is worth we want to give you
this.
'''))
input('# ')
print(dedent('All the men point at the machine gun and offer it to you.'))
print(dedent('Do you want the machine gun? (type yes to accept)'))
choice = input('# ')
if 'yes' in choice:
user.add_to_inventory(items.machine_gun)
else:
print(dedent('Your loss, a soldier exclaimed.'))
return user.next_room
elif 'D' in choice:
print(dedent('''
The troops charge and you keep firing at the machine gunners position.
It keeps him busy for most of the time and only 2 men were lost. They
take the hideout with shear force and signal you to run towards them.
'''))
input('# ')
print(dedent("""
You dash across the no mans land and dodge sniper fire. The men cover
you as much as they can.
you whisper "thanks guys I owe you one"
a soldier responds "count us even you had our asses."
"""))
input('# ')
print(dedent('"Here dude take this" he hands you a ration.'))
rations = user.get_player_item_val("rations", user)
rations += 1
return user.next_room
else:
message_pop_up()
return user.saved_room
class SafePlace(Room):
def enter(self):
user.saved_room = 'quick'
user.next_room = 'gunner'
print(dedent("""
Six brutal hours have passed in the hideout. You and the men sit
and lick your wounds. Its almost dark and the battle ground has
finally begun to quiet down.
A. Stay in the hideout till morning.
B. Advise a sneak attack on the rest of the enemy troops.
C. Draw enemy attention.
D. Retreat back to rubble in the water.
"""))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
if 'A' in choice:
print(dedent("""
You and the troops agree to wait out the night in the
hideout. You hear bits of rifle fire in the night and just
enough screaming to remember even in your dreams, you are
not at home you are at war.
"""))
input('# ')
print(dedent("""
You wake up just before sunrise and alert the others. "Hey guys"
you stated "its almost sun rise we need to make a move".
"""))
input('# ')
print(dedent("""
Whoosh!
You look at the slit in the hideout and see an incoming...
"No! Not now" you think.
"""))
input('# ')
print(dedent("""
"Grenade!" You yelled.
A. Jump on grenade.
B. Don't jump on grenade.
"""))
choice = input('# ')
if 'menu' in choice:
return 'menu_enter'
if 'A' in choice:
print(dedent("""
You dashed and landed on the grenade. Closing
your eyes in these last moments you think of your wife and
how sad she will be alone, all alone.
"""))
input('# ')