-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameDriver.py
4273 lines (4104 loc) · 178 KB
/
GameDriver.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
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
# NEWEST VERSION 4/3/17 (11:46)
# Fastest run ever recorded : 1 minutes, 59.2 seconds
# Try and beat it!
# *** Walkthrough ***:
# https://docs.google.com/document/d/1Z66YHWr4cZ_A_3xnZOEdGZGcvAwPsENSKryyxVO7kIU/edit?usp=sharing
# ------Recent Fixes------
# Gave name to druid scout with lantern (Dentros)
# Changed name of Silvarum to Silvarium
# Western Path's direction was changed to be parallel to Splitpath.
# Fixed several, several typos
# Made Neutrals reside in the city of Ofelos
from time import sleep
import random
from random import randint
# Initializing
def wait(time_multiplier=1):
global time
seconds = -1
if time == "OFF":
seconds = 0
if time == "ON":
seconds = 8
if seconds == -1:
return False
sleep(seconds * time_multiplier)
return True
def userinput(message):
ans = input(message)
if ans == "":
return ""
ans = ans.upper().replace("USE", "").replace("CAST", "").replace(" ", "")
return ans
def containsAny(string, options):
for option in options:
if option.upper() in string.upper():
return True
return False
def textspeed():
global time
while True:
print()
print()
print("\033[2;36;48mAvasia: King of Nacastrum!")
print("\033[0;26;48m")
print()
print()
print("Do you want delay between sentences? (On or off) ")
ans = input("On is strongly recommended for first time players.")
print()
time = ans.upper()
if wait(0):
intro()
break
else:
print()
def intro():
print()
print()
print("You hear waves and the sound of the ocean around you.")
print("But... Where are you?")
print("You pull yourself to your feet.")
print("It appears that you are alongside a beach.")
wait()
print()
print("The whisper of the ocean and the scream of the fierce wind penetrate your ears.")
print("You see the remains of a gate to your north.")
print("As you draw closer you see what appears to be an older gentleman, who seems out of place.")
print("This can't be the guard, you think to yourself.")
print("The guard is dressed in common-wear and has nothing to defend himself, other than a short broken spear.")
print()
wait()
print(""" "Welcome to Oceandale." """)
print(""" "Or what's left of it..." """)
print(""" "Last week Oceandale was attacked by the faction of Agroman." """)
print()
wait()
print(""" "Once all of Avasia was united under the Kaefden family." """)
print(""" "But the youngest son of the king thirsted for power." """)
print(""" "He began a protest in Kaefden's capital, Aylova, which quickly became violent." """)
print(""" "The youngest son urged his father for the crown and spited him for his lack of leadership." """)
print(""" "Together, the older brother and the king, banished him from all of Kaefden." """)
print(""" "The king couldn't allow for this behavior to fall upon his citizens, or certain chaos would follow." """)
print()
wait(2)
print(""" "The younger brother built the Agromanian faction from the ground up." """)
print(""" "Of course, many Kaefden people followed of all races. Mages, Humans, and Druids alike." """)
print(""" "Although the brothers, and the king are long gone, the rivalry and the hatred still exist." """)
print(""" "The Agroman faction today believes in brotherhood and loyalty." """)
print(""" "The Kaefden faction believes in order and integrity." """)
print(""" "There's a city who remains neutral in the matter; the city of Ofelos." """)
print(""" "They believe that a united Avasia would benefit the people more than petty fighting." """)
print(""" "After Oceandale nearly fell to the Barbarians, I'm starting to see their point. """)
print()
wait(2.5)
print(""" "Go into the city. There isn't much left to see." """)
print(
"------------------------------------------------------------------------------------------------------------")
print()
print("You venture forth until you begin to see the debris of crumbling and post-burnt houses.")
print()
wait(.5)
global lev
lev = 0
global sword
sword = 0
global lant
lant = 0
global druid
druid = 0
global fireball
fireball = 0
global slipp
slipp = 0
global ndoor
ndoor = 0
global grass
grass = 0
global forestlore
forestlore = 0
global dagger
dagger = 0
global armory
armory = 0
global blood
blood = 0
global geo
geo = 0
global guesses
guesses = 3
global tunnel
tunnel = 0
global roadfir
roadfir = 0
global roadgeo
roadgeo = 0
global roadlev
roadlev = 0
global rod
rod = 0
global deathcount
deathcount = 0
global lady
lady = 0
global escort
escort = 0
global orange
orange = 0
global lock
lock = 0
global cgates
cgates = 0
global tran
tran = 0
global symbols
symbols = ["^'", "~'", ">'", ";'"]
random.shuffle(symbols)
oceandale()
# oceandale functions
def oceandale():
if escort == 0:
print("To the NORTH, a blood-stained road continues through the city.")
print("To the EAST, there is debris barely distinguishable as a trading post.")
print("To the WEST, you see a house that appears untouched, unmarked by the Agroman faction.")
print("To the SOUTH, the southern gate leads to the shore-front.")
print()
north = ["NORTH"]
east = ["EAST"]
west = ["WEST"]
south = ["LEAVE", "BACK", "EXIT", "RETURN", "SOUTH"]
ans = userinput("Which way would you like to investigate?")
print()
if containsAny(ans, east):
print()
print(
"As you near the broken remnants of a trading post, the stench of fish and burnt wood fills the air.")
print("A few people are attempting to make the place a bit more organized.")
print("You could try and talk to them.")
print()
while True:
ans = input("What would you like to do?")
ans = ans.upper()
talk = ["TALK"]
leave = ["LEAVE", "BACK", "EXIT", "RETURN"]
if containsAny(ans, talk):
print()
print("You approach one of the men cleaning up the debris and announce yourself.")
print("He takes a moment to look at you before speaking.")
print()
print(""" "Trading post is closed, mage, if you couldn't tell already." """)
print(""" "The damn Agromanians burned my beloved store to the ground!" """)
print(""" "They showed up in the middle of the night, the cowards!" """)
print(""" "My wife, they took my wife!" """)
print(""" "I swear those bastards will get what's coming to them." """)
print(""" "I.. I need to be alone now." """)
print()
print("There's no other reason for you to continue loitering around here.")
print()
print("You leave the trading post.")
print()
print()
wait()
oceandale()
break
if containsAny(ans, leave):
print()
print("You leave the trading post.")
print()
wait()
oceandale()
break
if containsAny(ans, west):
magehouse()
if containsAny(ans, north):
print("You venture NORTH into the outskirts of the city.")
print()
graveyard()
if containsAny(ans, south):
print("You venture SOUTH to the beach.")
print()
beach()
else:
oceandale()
if escort == 1:
print("To the NORTH, the road continues into the city.")
print("To the SOUTH, the southern gate leads to the shore-front.")
print()
print("Your quest is finally coming to an end. Head NORTH towards Nacastrum.")
print("On the other hand, maybe the Old Mage would like to see the beach before venturing on.")
print()
ans = userinput("Which way would you like to investigate?")
print()
north = ["NORTH"]
south = ["SOUTH"]
if containsAny(ans, north):
print("You venture NORTH into the outskirts of the city.")
print()
graveyard()
if containsAny(ans, south):
print("You venture SOUTH to the beach.")
print()
beach()
def magehouse():
global lev
global escort
global lock
if lev == 0:
print()
print("You draw nearer to the house, when the door bursts open, pages")
print("of books fly in every direction. The sudden gust of wind startles you.")
print()
wait()
print("However, no one is there.")
print("You enter the house to see stacks of books piled to the ceiling.")
print("The heavy door behind you slams shut in an instant.")
print("You quickly jump and look to the door to see what caused it.")
print()
wait()
print("However, you can't find the cause of the paranormal occurrence.")
print("You turn back around to be face to face with an elderly brunette woman,")
print("whose appearance alone sparks recognition.")
print("You decide that she was the one controlling the door.")
print()
wait(2)
print("The woman spoke with intellect and fluency, despite her age.")
print(""" "You recognize one of your own don't you?" """)
print(""" "Mage to mage; Kaefden to Kaefden." """)
print(""" "But... YOU are lost, terribly lost." """)
print()
wait()
print(""" "All mages have been exiled from Nacastrum, not just you." """)
print(""" "But YOU... " """)
print(""" "You might have what it takes." """)
while True:
ans = input(""" "Answer me: what faction do the mages represent?" """)
ans = ans.upper()
k = ["KAEFDEN"]
if containsAny(ans, k):
break
else:
print("Try again.")
print()
print(""" "Glad you know the simplest of things about our people." """)
print(""" "Do you know why Nacastrum banished its people?" """)
print()
print(""" "Vashirr, the king of the mages, used his power to teleport Nacastrum's citizens." """)
print(""" "After the fall of Oceandale, Vashirr heard of rumors from the druids." """)
print(""" "Nacastrum was to be attacked by the full force of the barbarians of the north." """)
print(""" "I never trusted Vashirr. Soon after he became King, I left" """)
wait()
print()
print(""" "What is the last thing you truly remember? """)
print(""" "Many mages have thought to have been teleported out of the city." """)
print(""" "Most have ventured east to Kaefden's capital, Aylova." """)
wait()
print(""" "Vashirr didn't save you." """)
print(""" "His true intentions are certainly clouded." """)
print(""" "He scattered his people for a reason." """)
print(""" "All this seems to me, that he has sided with the Agromanians." """)
print(""" "The mages lived in a floating city... What real threat did the barbarians pose?" """)
print()
wait(2)
print(""" "I'm too old to venture on this quest." """)
print(""" "But you... You can reunite our people." """)
print(""" "Before I die, I want to see the Nacastrum I remember from my childhood." """)
print()
wait()
print(""" "This is your quest! You must unlock the gates to Nacastrum and unite our people!" """)
print()
wait()
print("She walks over to her enormous stack of books and yanks one in the middle.")
print("The other books fall to the ground with a loud crash.")
print("She satisfyingly dusts off the cover of a very large, old book.")
print()
print(""" "This spell will certainly prove useful in your quest!" """)
print()
print(""" "It's called Levitate." """)
print()
print("\033[1;32;48mYou obtained the spell Levitate!")
print("\033[0;26;48m")
wait(2)
print(""" "Use it to simply float or hover." """)
print()
print(""" "Sadly, that is all I have to offer." """)
print(""" "Many things have changed since I lived in Nacastrum." """)
print(""" "None-the-less, this spell will guide you in your quest to reestablish our home." """)
print()
print("You thank the Old Mage and continue back into Oceandale, with a new sense of purpose.")
print()
wait()
lev = 1
lock = 1
oceandale()
if lock == 1:
print()
print("The door is locked.")
print("It seems the Old Mage is no longer home.")
print()
oceandale()
if lady == 1:
print()
print("You approach the Mage's house and open the door.")
print("As you head inside, the room is eerily quiet.")
print("You look around and notice the Old Mage from before sitting at a desk.")
print("Before you can utter a word she calls out to you without turning around.")
print()
print(""" "I've been waiting for you." """)
print()
wait(1)
print("You stop in your tracks and listen to what she has to say.")
print()
print(""" "So it is done then?" """)
print()
print("You're unsure what she is talking about.")
print("You stay silent.")
print()
print(""" "I knew there was something special about you from the moment you stepped through my door." """)
print(""" "I felt your energy before you even entered my home." """)
print()
wait(2)
print("She gets up from her desk and approaches you.")
print()
print(""" "Ah, I can see it in your eyes." """)
print(""" "You've seen many things in your travels." """)
print(""" "Come, I have something to show you." """)
print()
print("She gestures you to follow her as she walks into a back room and down a staircase into the basement of "
"her home.")
wait(1.5)
print("The room is pitch black and you can't see a thing.")
print("The mage snaps her fingers and candles around the room light up.")
print()
print("In the center of the room is a silver table.")
print()
print(""" "Come on, don't be shy." """)
print()
wait(1)
print("You walk over to the table and on it is a long staff, nearly 6 feet long.")
print("The staff is made of silver with gold etchings wrapping around it.")
print("At the end is a blue gemstone about the size of your hand.")
print()
print(""" "I bet you're wondering what this is." """)
print(""" "You already know, you just don't realize it." """)
print(""" "The only reason you are here is because you need this staff to get to Nacastrum." """)
print(""" "I've kept it safe while I waited on you to return." """)
print(""" "I know you've seen it, the Ring of Malkos." """)
print(""" "The monument under our home." """)
print()
wait(2)
print("You remember the platform with the silver circle under Nacastrum.")
print()
print(""" "The Rings of Malkos are teleporters, named after our first king." """)
print(""" "The only way to Nacastrum is through that gate." """)
print(""" "This staff acts as a key to the Rings of Malkos." """)
print()
print(""" "You know what we must do next." """)
print(""" "Let us not waste any time. Our home awaits." """)
print()
while True:
ans = input(""" "But before we go, are you sure you're ready?" """)
ans = ans.upper()
y = ["YES", "Y"]
n = ["NO", "N"]
if containsAny(ans, y):
print()
print("You and the Old Mage leave the house on the final journey to Nacastrum.")
print()
escort = 1
oceandale()
escort = 1
break
if containsAny(ans, n):
print()
print(""" "Come back when you are truly ready." """)
print()
oceandale()
break
if escort == 1:
print()
print(""" "We need to go to Nacastrum." """)
print()
oceandale()
def graveyard():
global sword
if escort == 0:
print()
print("To the NORTH is a broken arch that appears to be the gate out of the city. ")
print("To the EAST, comes a stench, more vile than you ever could have imagined.")
print("To the WEST, there is a fallen building that seems to have significance.")
print("To the SOUTH, the path goes back to the main part of Oceandale.")
print()
ans = userinput("Which way would you like to investigate?")
print()
north = ["NORTH"]
east = ["EAST"]
west = ["WEST"]
south = ["LEAVE", "BACK", "EXIT", "RETURN", "SOUTH"]
if containsAny(ans, west):
print()
print("There is what appears to be the remnants of a rustic church.")
print("Ashes of burned holy books and wooden benches lay burned and battered.")
print("Nothing remains except an alter, dedicated to the matron God of the Ocean.")
print("Survivors gather wood and try to salvage whatever they can.")
wait()
print()
print("You gain a new sense of hatred for the brutality of the barbarians.")
print()
wait()
print("You go back to the upper part of town.")
graveyard()
elif containsAny(ans, east):
print()
print("The smell of the burnt and decaying bodies stung your nostrils and left you gasping for breath.")
print("Piles of bodies, tell you that the population of Oceandale must have decreased dramatically. ")
print(
"The sun falls on the 6-feet tall endless stack of bodies, which doesn't help the protruding stench. ")
print("However, a glimmer of light is flickering in the middle.")
print()
if sword == 0:
while True:
ans = userinput("What do you do?")
verbs = ["TAKE", "GRAB", "STEAL", "GET"]
look = ["LOOK", "INVESTIGATE", "SEARCH"]
leave = ["LEAVE", "BACK", "EXIT", "RETURN"]
if containsAny(ans, look):
print()
print("You discover the flicker of light comes from a soldier's sheath.")
print("A long sword lays half unsheathed, suspended on the decayed back of the man. ")
print()
elif containsAny(ans, verbs):
print()
print("Although death is honorable in fighting for a just cause, ")
print("he won't be needing that anymore. You decide to take the long sword.")
print()
print()
print("\033[1;32;48mYou received the Long Sword!")
print("\033[0;26;48m")
wait(.5)
sword = 1
graveyard()
break
elif containsAny(ans, leave):
print("You leave the graveyard and head back into town.")
graveyard()
break
else:
print("Bad input. Try using a different verb.")
print()
if sword == 1:
y = ["YES", "Y"]
leave = ["LEAVE", "BACK", "EXIT", "NO", "N"]
print("The bodies lay, piled and rotting.")
print()
ans = input("Would you like to pay your respect?")
ans = ans.upper()
if containsAny(ans, leave):
print("You leave the graveyard and head back into town.")
graveyard()
elif containsAny(ans, y):
print()
print("How could one do this?")
print("Is the Faction War that intense to justify the slaughter of a village? ")
print("You pay respects for the lost citizens and then venture back into town.")
wait(.5)
graveyard()
else:
print()
elif containsAny(ans, south):
print("You travel back to the main area of town.")
print()
oceandale()
elif containsAny(ans, north):
print("You venture to and through the rustic gates of northern Oceandale.")
print()
splitpath()
else:
graveyard()
if escort == 1:
print()
print("To the NORTH is a broken arch that appears to be the gate out of the city. ")
print("To the SOUTH, the path goes back to the main part of Oceandale.")
print()
print("You really should make your way to Nacastrum.")
print()
ans = userinput("Which way would you like to investigate?")
print()
north = ["NORTH"]
south = ["LEAVE", "BACK", "EXIT", "RETURN", "SOUTH"]
if containsAny(ans, south):
print("You travel back to the main area of town.")
print()
oceandale()
elif containsAny(ans, north):
print("You venture to and through the rustic gates of northern Oceandale.")
print()
splitpath()
else:
print()
def beach():
global rod
if escort == 0:
print("You stand along the beach, gazing outward.")
print("Distant ships sit along the horizon, fishing.")
print("The sea breeze is very calming.")
print()
wait()
while True:
verbs = ["STRETCH", "RELAX", "EXERCISE", "YOGA"]
leave = ["LEAVE", "BACK", "EXIT", "RETURN"]
fish = ["FISH", "FISHING"]
ans = userinput("What would you like to do?")
if containsAny(ans, fish):
if rod == 0:
print()
print("You don't have a fishing rod.")
print()
if rod == 1:
fishingbeach()
break
elif containsAny(ans, verbs):
print()
print("You take a deep breath and do some yoga moves.")
print()
print("A couple of back bends.")
print("A few Eagles.")
print("Even a Crow Pose.")
print()
print("Both your body and mind feel revitalized.")
print()
elif containsAny(ans, leave):
print()
print("You leave and return to Oceandale.")
print()
oceandale()
break
else:
print()
print("This would be a great place to do some stretching.")
print()
if escort == 1:
print("You take the Old Mage to the shore.")
print("She gazes outwards and begins to talk to you.")
print()
print(""" "Many, many nights I come out here and ponder how it would be if I didn't leave Nacastrum." """)
print(""" "I think I've been waiting... Well." """)
print(""" "I've been waiting for someone like you to come along." """)
print(""" "Who thought when I did finally go back, I would be assisting such an important cause." """)
print(""" "We'd best get to it." """)
print()
wait(2)
print("You and the Old Mage go back into Oceandale.")
print()
oceandale()
def fishingbeach():
global orange
global deathcount
print()
print("You cast a line into the ocean.")
print()
cast = (randint(2, 12))
while True:
if cast == 2:
print()
print("Moments after casting a line, you feel a pull on the fishing rod!")
print()
print("You pull back the line and discover a huge fish made of pure gold hanging on the hook!")
print("It must be worth a fortune!")
print()
orange = 0
break
if cast == 3:
print()
print("Minutes pass and you finally feel a tug on the line!")
print()
print("You fight with the line until eventually you manage to reel it in.")
print()
print("Out of the water appears a large crab like monster!")
print()
orange = 0
if sword == 1:
print()
print("Fortunately, you draw your sword and slay the beast before it can attack.")
print("Looks like you'll be eating crab for dinner!")
print()
break
if fireball == 1:
print()
print("Just before the beast attacks, you blast it with Inflame.")
print("The smell of cooked crab fills the air.")
print("Delicious.")
print()
break
else:
print()
print("The beast lunges forward and snaps at you!")
print("Its mighty claws clutch tightly around your waist!")
print()
print("You're snapped completely in half and the crab-monster drags your body into the ocean.")
print()
print("\033[1;31;48mYou have died.")
print("\033[0;26;48m")
deathcount += 1
print()
textspeed()
break
if cast == 4 or cast == 5 or cast == 6:
print()
print("After minutes of silence you reel in your line.")
print()
orange = 0
break
if cast == 7 or cast == 8 or cast == 9:
print()
print("Minutes after casting your line into the ocean you feel the weight of the fishing rod become "
"slightly heavier.")
print()
print("You assume that you've got a bite so you reel in the line only to discover an old shoe.")
print("How disappointing.")
print()
orange = 0
break
if cast == 10 or cast == 11:
print()
print("A few minutes pass and you feel a bite on the line!")
print()
print("You fight with the fishing rod and eventually reel in a large fish!")
print("Looks like you've caught dinner!")
print()
orange = 0
break
if cast == 12:
if orange < 4:
print()
print("After a few minutes of waiting, you feel a tug on the line!")
print("You reel in the fishing rod and find a floppy orange colored fish.")
print()
print("It looks absolutely useless, just splashing about.")
print()
print("You toss it back into the ocean.")
print()
orange = orange + 1
break
if orange >= 3:
print()
print("You wait just a few moments before your fishing line is taken right out of your hands!")
print()
print("The water begins to ripple and you watch as an enormous blue sea-serpent plunges out of "
"the water!")
print("You have no time at to react before it dives down and gobbles you up.")
print()
print("\033[1;31;48mYou have died.")
print("\033[0;26;48m")
deathcount += 1
print()
textspeed()
break
print()
while True:
ans = input("Would you like to cast your line again?")
ans = ans.upper()
if ans == "YES":
fishingbeach()
break
if ans == "NO":
beach()
break
def splitpath():
if escort == 0:
print()
print("To the NORTH is a forest.")
print("To the EAST appears to lead to the mountains.")
print("To the WEST is a familiar pathway, but you can't quite place its significance in your memory.")
print("To the SOUTH, the path leads you back into the upper part of Oceandale.")
print()
ans = userinput("Which way would you like to investigate?")
print()
north = ["NORTH"]
east = ["EAST"]
west = ["WEST"]
south = ["LEAVE", "BACK", "EXIT", "RETURN", "SOUTH"]
if containsAny(ans, south):
print()
print("You travel back to the upper part of Oceandale.")
graveyard()
if containsAny(ans, north):
print()
forestenterance()
if containsAny(ans, west):
print()
print("The road seems to be well maintained, but not a soul is in sight.")
print("Abandoned carriages dot the road, some of which are ablaze and destroyed.")
print("It seems the Agromanians have been stalking this road.")
print()
westernroad()
if containsAny(ans, east):
print("You walk along the path.")
print("Trees become mountains, and each step is higher than the past.")
print("Finally, it levels off.")
print()
wait()
print("You begin to hear the roar of water close-by.")
print("Ahead you notice the beginnings of a bridge.")
print("As you draw in closer you see that the bridge disappears deep into the chasm.")
print("The end of the bridge is hidden by the rapid water.")
bridge()
else:
splitpath()
print()
if escort == 1:
print()
print("You need to take the Old Mage West, to Nacastrum.")
print()
ans = userinput("Which way would you like to investigate?")
print()
west = ["WEST"]
east = ["EAST"]
south = ["LEAVE", "BACK", "EXIT", "RETURN", "SOUTH"]
if containsAny(ans, west):
print()
print("You're intrigued by the road to the WEST and decide to head in that direction.")
westernroad()
elif containsAny(ans, south):
print()
oceandale()
elif containsAny(ans, east):
print()
print("You need to take the Old Mage West, to Nacastrum.")
print()
else:
print()
print("You need to take the Old Mage West, to Nacastrum.")
print()
# mountain functions
def mountain():
print()
print("To the NORTH, there is a small divot between the rocks you can easily fit through.")
print("To the EAST, the ground follows parallel around the mountain.")
print("To the WEST, the path extends straight, but narrow, parallel to the roaring chasm.")
print("Going SOUTH takes you back to the split path.")
print()
while True:
ans = userinput("Which way would you like to investigate?")
print()
north = ["NORTH"]
east = ["EAST"]
west = ["WEST"]
south = ["SOUTH"]
if containsAny(ans, south):
print()
print("You levitate back across the bridge to the split-path.")
splitpath()
break
elif containsAny(ans, north):
print()
caveentrance()
break
elif containsAny(ans, east):
druidtalk()
break
elif containsAny(ans, west):
print()
print("You go WEST, along the mountain wall, being very careful to avoid the chasm.")
print("Finally, the path you're on opens up to allow you to walk more freely.")
westmountain()
break
elif mountain():
print()
def bridge():
print()
print("The bridge is impassable.")
print()
while True:
global lev
global sword
global deathcount
global tran
s = ["SWORD", "CUT"]
float = ["LEVITATE", "LEV", "LEVITATE", "LEV"]
v = ["SWIM", "DIVE", "WATER"]
j = ["JUMP"]
leave = ["LEAVE", "BACK", "EXIT", "RETURN"]
ans = input("What do you do?")
ans = ans.upper()
print()
if containsAny(ans, s):
if sword == 0:
print("You don't have a sword.")
print()
if sword == 1:
print(
"No nearby trees are long enough to span across the chasm, even if your sword could cut down one.")
print()
elif containsAny(ans, float):
if lev == 0:
print("You don't know the spell.")
print("You can try and jump across the chasm though.")
print("Good luck.")
print()
bridge()
elif lev == 1:
print("Due to a strong tone in your voice, Levitate echos across the mountains.")
print("You hover across the chasm, surprisingly easy for your first time.")
print("Almost, as if it wasn't your first time at all.")
print("Never-the-less, you cross the roaring chasm safe and sound.")
wait()
mountain()
tran = 1
break
elif geo == 1 and lev == 0:
print("You don't know the spell.")
print("You can try and jump across the chasm though.")
print("Good luck.")
print()
bridge()
elif geo == 1 and lev == 1:
print("Due to a strong tone in your voice, Levitate echos across the mountains.")
print("You hover across the chasm, surprisingly easy for your first time.")
print("Almost, as if it wasn't your first time at all.")
print("Never-the-less, you cross the roaring chasm safe and sound.")
wait()
mountain()
brid = 1
break
elif containsAny(ans, j):
print("You jump in the water and then realize, halfway into the jump, that the chasm is VERY deep.")
print()
print()
print("\033[1;31;48mYou have died.")
print("\033[0;26;48m")
deathcount += 1
print()
textspeed()
break
elif containsAny(ans, v):
print("You jump in the water and then realize, halfway into the jump, that the chasm is VERY deep.")
print()
print()
print("\033[1;31;48mYou have died.")
print("\033[0;26;48m")
deathcount += 1
print()
textspeed()
break
elif containsAny(ans, leave):
print("I'll find another way, you think to yourself.")
print("You travel back the way you came.")
splitpath()
break
else:
print("I don't understand that.")
bridge()
print()
def druidtalk():
global druid
global lant
if druid == 0:
print()
print("You follow the path to the EAST.")
print("As you travel further, you notice tracks on the ground.")
print("The tracks are fairly small and are in the shape of a paw-print.")
print()
wait()
print("You decide to follow the tracks and eventually find yourself behind a red fox.")
print("The fox quickly discovers your presence and turns around in a threatening pose.")
print("After a stare-down between you and the fox, the fox relaxes and begins to walk towards you.")
print()
wait(.5)
print("As it walks closer, its size begins to increase.")
print("The fox then begins to stand on its hind legs, much like a human.")
print("To your surprise, what was a fox transforms into a man with long, cherry-red hair.")
print()
wait(.5)
print(""" "Ah, greetings mage. My apologies for the reaction. You never know what could be out here." """)
print()
wait()
print(""" "My name is Dentros." """)
print(""" "I am a scout from Cataracta." """)
print(""" "If you can't tell, I am a Druid." """)
print(""" "I hope I am not being too presumptuous, but I must ask." """)
print(""" "What are you doing here?" """)
print()
wait()
print("You explain your quest to the druid.")
print("He waits for you to finish before speaking.")
print()
print(""" "You seek to reopen Nacastrum?" """)
print(""" "Yes, a difficult task indeed." """)
print(""" "Since Vashirr exiled his people, I must admit, my people have been worried." """)
print(
""" "If the king of the Mage feared the Agromanians, then surely they are a real force to be reckoned with." """)
wait()
print()
print(""" "But I recognize your quest." """)
print(""" "If Cataracta was to be taken, I would do anything to protect my home." """)
print()
print(""" "Deep within the mountains is a secret of the Old Mages." """)
print(""" "The druid of Cataracta have known of it for ages, but do not posses the means to reach it." """)
print(""" "I suggest you look for this hidden knowledge. It may be of use to you." """)
print()
wait(2)
print(""" "Oh, before you leave." """)
print(""" "Take this lantern. The caves are dark and you will need to be able to see." """)
print()
print("\033[1;32;48mYou received a lantern!")
print("\033[0;26;48m")
print(""" "Good luck, my friend." """)
print()
print("Dentros returns to his fox form and leaps away.")
wait()
print("You return back to the place you came from.")
print()
druid = 1
lant = 1
mountain()