-
Notifications
You must be signed in to change notification settings - Fork 1
/
world.py
1253 lines (1000 loc) · 44.8 KB
/
world.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
import enemies
import npc
import random
import player
import items
class MapTile:
def __init__(self, x, y):
self.x = x
self.y = y
def intro_text(self):
raise NotImplementedError("Create a subclass instead!")
def modify_player(self, player):
pass
class LocationTile4(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def intro_text(self):
print ("You find something etched onto a great oak tree")
print("It looks like a map of the Woods !!")
print ("It provides your location (H)")
print ("and something else is marked (?)")
print ("""
| | H| | | | | | | | |
| |xx|xx|xx| | |xx|xx|xx|xx|
| | | |xx| | | | ?|xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
| | | | | | | | | | |
| |xx|xx|xx| | |xx|xx|xx| |
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
""")
class LocationTile3(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def intro_text(self):
print ("You find some markings etched onto the chest of a crucified corpse ")
print("It looks like a map of the Woods !!")
print ("It provides your location (H)")
print ("and something else is marked (?)")
print ("""
| | | | | | | | | | ?|
| |xx|xx|xx| | |xx|xx|xx|xx|
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
| | | | | | H| | | | |
| |xx|xx|xx| | |xx|xx|xx| |
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
""")
class LocationTile2(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def intro_text(self):
print ("You found something etched onto a old tombstone")
print("It looks like a map of the Woods !!")
print ("It provides your location (H)")
print ("and something else is marked (?)")
print ("""
| | | | | | | | | | |
| |xx|xx|xx| | |xx|xx|xx|xx|
| | | |xx| | | | |xx| |
| | | | | | |xx| H| | |
| |xx| |xx| | |xx| |xx| |
| | | ?| | | | | | | |
| |xx|xx|xx| | |xx|xx|xx| |
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
""")
class LocationTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def intro_text(self):
print ("You see an old wooden sign ahead of you")
print("It looks like a map of the Woods !!")
print ("It provides your location (H)")
print ("and something else is marked (?)")
print ("""
| | | | | | | | | | ?|
| |xx|xx|xx| | |xx|xx|xx|xx|
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
| | | | | | | | | | |
| |xx|xx|xx| | |xx|xx|xx| |
| | | |xx| | | | H|xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
""")
class RagManTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.Item_claimed:
action_input=input("Action:")
if action_input =="Y" or action_input =="y":
print("Wonderful, make a note little one.. ")
input(".....")
print ("Go south 5,east 4 then south 4 ")
input(".....")
print("You will find a weapon of great power and fear.. ")
input(".....")
print ("I will let you have a look at my map ")
print("H=HERE T=Treasure ")
self.Item_claimed = True
player.hp=int(player.hp/2)
print("")
print("""
| | | | | | H| | | | |
| |xx|xx|xx| | |xx|xx|xx|xx|
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx| |
| | | | | | | | | | |
| |xx|xx|xx| | |xx|xx|xx| |
| | | |xx| | | | |xx| |
| | | | | | |xx| | | |
| |xx| |xx| | |xx| |xx|T |
""")
print("Your hp {} ".format(player.hp))
elif action_input =="N" or action_input =="n":
print("You refuse the offer and continue on")
else:
print("(INVALID CHOICE) You leave without taking up the offer")
def intro_text(self):
if self.Item_claimed:
return """
This is the place where you met that friendly Rag man
I wonder where he is now ?
"""
else:
print("You see a rag man but he does not attack you ")
print("He speaks 'Hello young one,I can tell you a secret of these dreaded woods'")
input(" ")
print("'If you offer me some 'life'.. Not all, mind you..Just enough'")
input(" ")
return """
Do you accept the dark pact? yes(Y) or No(N)
"""
class FindRingTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.Item_claimed:
action_input=input("Action:")
if action_input =="Y" or action_input =="y":
print ("You decide to put on the ring")
input(".....")
print("As you fit the ring around your finger")
input(".....")
print("Your flesh starts to become hard like rock")
input(".....")
print("You panic and attempt to remove it")
input(".....")
print ("It will not come off, it is cursed !!!")
input(".....")
print("You are disturbed, but have no choice but to continue")
input(".....")
self.Item_claimed = True
player.armour=12
player.sanity = player.sanity + 2
print("Your sanity point {}".format(player.sanity))
print("Your armour resist {}".format(player.armour))
print("")
elif action_input =="N" or action_input =="n":
print("You decide to not to wear the ring")
else:
print("(INVALID CHOICE) You leave without wearing the ring")
def intro_text(self):
if self.Item_claimed:
return """
You see a stone alter, nothing interesting here
"""
else:
print("You see a ring placed on a stone alter")
input(".....")
print("There is a short note beside the ring")
input(".....")
print("One man's curse is another man's saviour")
input(".....")
print( "You have a strange urge to put on the ring")
input(".....")
return """
Will you wear the ring ? YES (y) or NO (n)
"""
class FindHammerTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.Item_claimed:
action_input=input("Action:")
if action_input =="Y" or action_input =="y":
print ("You decide to take the hammer")
input(".....")
print("As you pick the hammer up ")
input(".....")
print("A great sense of dread and horror fills your soul")
input(".....")
print ("You are now the bearer of the Doom Hammer")
input(".....")
print("GO FORTH AND BRING DOOM TO US ALL ")
input(".....")
self.Item_claimed = True
player.inventory.append(items.DoomHammer())
player.sanity = player.sanity + 5
print("Your sanity point {}".format(player.sanity))
print("")
elif action_input =="N" or action_input =="n":
print("You decide to not take the hammer")
else:
print("(INVALID CHOICE) You leave without the hammer")
def intro_text(self):
if self.Item_claimed:
return """
A place of great power and darkness...
"""
else:
print("You see a large hammer before you")
input(".....")
print("It has a dark essence around it")
input(".....")
print("Yet, there is a undeniable aura of power too")
input(".....")
return """
Will you take the doom hammer ? YES (y) or NO (n)
"""
class FindSwordTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.Item_claimed:
action_input=input("Action:")
if action_input =="Y" or action_input =="y":
print ("You retreive the Silver Sword" )
input(".....")
print ("You feel a sense of hope against the darkness")
input(".....")
self.Item_claimed = True
player.inventory.append(items.SilverSword())
player.sanity = player.sanity - 3
print("Your sanity level is {}".format(player.sanity))
elif action_input =="N" or action_input =="n":
print("You decide not to free the sword")
else:
print(" (INVALID CHOICE) You leave without taking the sword")
def intro_text(self):
if self.Item_claimed:
return """
You see a large rock with a big crack in the middle
"""
else:
print("You see a sword stuck in a large rock ")
input(".....")
print("The sword's glow devours the darkness around it ")
return """
Will you attempt to free the sword? Yes (Y) or No (N)
"""
class FindHealthTile(MapTile):
def __init__(self, x, y):
self.Item_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.Item_claimed:
action_input=input("Action:")
if action_input =="Y" or action_input =="y":
print ("you gain a Greater Healing Potion" )
self.Item_claimed = True
player.inventory.append(items.GreaterHealingPotion())
elif action_input =="N" or action_input =="n":
print("You decide not to disturb the dead")
else:
print("(INVALID CHOICE) You walk away from the corpse")
def intro_text(self):
if self.Item_claimed:
return """
You see a deady body slowly rotting away
"""
else:
print("You see a dead adventurer on the ground")
print("There is something in his bag")
return """
will you search the dead adventurer ? YES(Y) or NO(N)
"""
class BossTile(MapTile):
def __init__(self, x, y):
self.enemy = enemies.boss()
self.alive_text = """
You see a massive demonic creature with a
gigantic cleaver.
He smiles and speaks... 'Meat for the lady?'
"""
self.dead_text = """
The great abomination falls to the ground
bleeding from every orifice.
It has been a bloody battle.
He reaches his right hand into the air
and with his dying breath he whispers
'No meat for supper tonight, my lady'.
The butcher is dead
"""
super().__init__(x, y)
def intro_text(self):
text = self.alive_text if self.enemy.is_alive() else self.dead_text
return text
def modify_player(self, player):
if self.enemy.is_alive():
enemydamage=self.enemy.damage-player.armour
if enemydamage < 0:
enemydamage=0
player.hp = player.hp-enemydamage
print("Enemy does {} damage. You resisted {} damage. You have {} HP remaining.".
format(self.enemy.damage, player.armour,player.hp))
else:
player.victory=True
print("You see a dim light on the edge of the woods")
input(".....")
print("You run to the light and the light becomes brighter")
input(".....")
print("As you reach the light, a sense of finality overcomes you")
input(".....")
print("You wake up")
input(".....")
print("You are surrounded by mangled bodies all with contorted faces of horror" )
print("You can make out four paths.' ")
input(".....")
print ("You break down on the floor knowing you cannot do this again..")
input(".....")
print("You notice an old man with a pipe sitting in a chair ")
print("beside a pile of mangled bodies")
input(".....")
print("The old man speaks 'No one truly escapes these woods ")
print("without a clear conscious")
input(".....")
print ("As you begin to object. You start to remember")
input(".....")
print ("Something your mind has hid away from you until now " )
input(".....")
print ("You remember the butcher's daughter lying on the floor in a pool of blood" )
input(".....")
print ("The butcher rushes into the room and stares in horror")
input(".....")
print ("Your hands were around another woman's neck, her eyes drained of life")
input(".....")
print ("You remember a struggle with the enraged butcher ")
input(".....")
print("which ended with you throwing the butcher into a great cauldron of boiling water")
input(".....")
print("You remember the endless scream and rambling of the butcher")
print("as you force the lid on top of the cauldron preventing his escape")
input(".....")
print ("Until silence")
input(".....")
print ("You start to cry uncontrollably feeling only the deepest of guilt and regret")
input(".....")
print ("The old man speaks again ' There, there.. Old Man Kwong will take care of you'")
input(".....")
print("You look up and suddenly, you are back in your prison cell ")
print("before your trip to the Woods of Ypres")
input(".....")
print("The old man continues 'Congratulations, you have escaped the Woods of Ypres")
input(".....")
print("'Now are you ready to confess, this time ?'")
input(".....")
print("You nod with approval and readily face your final judgement")
input(".....")
print("Sometimes redemption can only be found in death")
print("All is forgiven within the eternal sleep ")
input(".....")
print(r"""
_______ _ ______ _
|__ __| | | ____| | |
| | | |__ ___ | |__ _ __ __| |
| | | '_ \ / _ \ | __| | '_ \ / _` |
| | | | | | __/ | |____| | | | (_| |
|_| |_| |_|\___| |______|_| |_|\__,_|
""")
print("Final stats")
print("Bones: {}".format(player.gold))
print("Experience:{}".format(player.exp))
attackpower=player.powerup+player.power
print("Attack:{}".format(attackpower))
print("Hp:{}".format(player.hp))
print("Mark of the Beast {} out of 6 ".format(player.mark))
print("Special thanks to Louise Shaw for proof reading ")
print("Ascii by jg and jgs" )
print("""
)
(_)
.-'-.
| |
| |
| |
| |
__| |__ .-.
.-' | | `-: :
: `---' :-'
`-._ _.-'
'""""""
""")
input("Press any button to escape")
class WestTile(MapTile):
def intro_text(self):
print ("You see a large cage hanging from a dead tree")
print ("There seems to be a corpse inside with a sign")
return """
The Sign reads : Go West, my honey flower
"""
class EastTile(MapTile):
def intro_text(self):
print ("You see a large cage hanging from a dead tree")
print ("There seems to be a corpse inside with a sign")
return """
The Sign reads : Go East, my sweet meat
"""
class SouthTile(MapTile):
def intro_text(self):
print ("You see a large cage hanging from a dead tree")
print ("There seems to be a corpse inside with a sign")
return """
The Sign reads : Go South, my butter cups
"""
class NorthTile(MapTile):
def intro_text(self):
print ("You see a large cage hanging from a dead tree")
print ("There seems to be a corpse inside with a sign")
return """
The Sign reads : Go North, my sugar plums
"""
class SleepTile(MapTile):
def __init__(self, x, y):
self.powerup =1
self.powerup_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.powerup_claimed:
self.insanity=5
player.hp=player.fullhp
player.sanity=player.sanity-self.insanity
print("Your sanity point{}".format(player.sanity))
print("Your hp {} ".format(player.hp))
self.powerup_claimed = True
def intro_text(self):
if self.powerup_claimed:
return """
You return to the church but you only see rubbles..
Is there no safe space in this dreaded woods ?
"""
else:
return """
You find an abandon church, it has a holy aura around it.
You decide to rest your exhausted body and find a
temperamental solace within this hell...
"""
class MadTile(MapTile):
def __init__(self, x, y):
self.sanity = random.randint(3,5)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
self.dream_claimed = True
player.mark=player.mark+1
print("Your sanity level is {}".format(player.sanity))
print ("Gain 1 Mark of the Beast")
print("")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
You faintly remember a story about a mother's love for her child.
It terrifies you to the core..
"""
else:
r=random.random()
if r< 1.0:
print("You see a mother with two daughters.")
print("One in red and the other in blue.")
input(".....")
print("The mother first hugs the one in 'blue' with a sad sigh")
input(".....")
print("She then moves towards the one in 'red' and proceeds to strangle her")
input(".....")
print("As red's frantic body ceases of movement and her life becomes no more ")
input(".....")
print("the mother then stares wildly at 'blue 'and moves towards her next ")
input(".....")
print("With great excitement she embraces the child")
input(".....")
print("She whispers in the sweet child's ear ")
input(".....")
print("'Now, i can love you more'")
input(".....")
return """ """
else :
return """
bleak """
class MadTile2 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(3,5)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
player.mark=player.mark+1
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print ("Gain 1 Mark of the Beast")
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
You feel that you have taken something important
from someone here.
"""
else:
r=random.random()
if r< 1.00:
print("You see a man full of glee stepping up on a chair")
print("and puts a noose around his neck")
input(".....")
print("He then jumps off the chair and hangs in the air for a while")
input(".....")
print("Suddenly he starts to cry uncontrollably")
input(".....")
print("You start to notice your throat begins to tighten ")
input(".....")
print("You struggle for breath frantically grasping at your throat")
print("Attempting to tear away something that is not there.")
input(".....")
print("As you fall into unconsciousness")
input(".....")
print("You hear the man rambling angrily at you. ")
print("Even though it is mostly incoherent")
print("It seems you have taken something precious from him")
input("")
return """
"""
else :
return """
"""
class MadTile3 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(2,3)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
player.mark=player.mark+1
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print ("Gain 1 Mark of the Beast")
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
Did you come here to escape from the horror or to face it ?
"""
else:
r=random.random()
if r< 1.0:
print("You see the light at the end of the tunnel")
input(".....")
print("Your heart skips a beat as you run towards the light")
input(".....")
print ("As you reach the light")
input(".....")
print ("You wake up")
input(".....")
print("You are surrounded by mangled bodies all with contorted faces of horror" )
print("You can make out four paths.' ")
input(".....")
print ("You wake up..Again")
return """
"""
else :
return """
Bleak """
class MadTile4 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(3,5)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
player.mark=player.mark+1
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print ("Gain 1 Mark of the Beast")
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
This place reminds you of a giant pot of meaty stew.
A noisy wailing meaty stew..
"""
else:
r=random.random()
if r< 1.0:
print("You see 12 men in rags in a giant pot")
input(".....")
print("Scambling over each other to get out")
input(".....")
print("But never succeeding and instead falling to the bottom")
input(".....")
print("They repeat the cycle until their broken bodies can no longer")
input(".....")
print("You notice a 13th man surrounded by bones gnarling on a human leg")
input(".....")
print("He looks at you with a menacing smile")
input(".....")
print("With a crackling voice he mutters 'I am complete'")
input(".....")
return """
"""
else :
return """
Bleak """
class MadTile5 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(3,5)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
player.mark=player.mark+1
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print ("Gain 1 Mark of the Beast")
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
Somethings are best left unknown
You quickly move away from this cursed place
before your remember something you regret..
"""
else:
r=random.random()
if r< 1.0:
print ("You see a book with a cover that displays a contorted demonic face")
input(".....")
print("It is both grotesque yet strangely alluring")
input(".....")
print("You can not resist this strange allure and open the book")
input(".....")
print("You pry open its heavy cover trembling with both fear and delight")
input(".....")
print("In an instant, your mind is consumed with an indescribable dark ecstasy")
input(".....")
print("Deeper and deeper you fall into the abyss, time becomes meaningless")
input(".....")
print("Yet, you continue until you notice a picture of someone being eaten by a book")
input(".....")
print("You panic and attempt to snap from your feverish dream")
input(".....")
print("But alas, it is too late, you cannot move, you cannot scream...")
input(".....")
return """
"""
else :
return """
Bleak """
class MadTile6 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(3,5)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
player.gold= player.gold+30
player.mark=player.mark+1
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print("Bones: {}".format(player.gold))
print ("Gain 1 Mark of the Beast")
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
A great sense of guilt and regret overcomes you.
You continue on with burden on your shoulders
and heaviness in your heart.
"""
else:
r=random.random()
if r< 1.0:
print("You see a woman advancing towards you with a Knife")
input(".....")
print("You prepare for combat but before you can react")
input(".....")
print("She plunged the knife into her belly")
input(".....")
print("With great struggle she begins to reach inside her body")
input(".....")
print("She begins to snap pieces of her ribs and place them on the floor")
input(".....")
print("Sobbing and wailing with each crack of her bones")
input(".....")
print("Until her body could no longer support her")
input(".....")
print("She collapses with exhaustion and with frantic breathes she whispers")
input(".....")
print("My loss is your gain")
input(".....")
return """
"""
else :
return """
Bleak """
class MadTile7 (MapTile):
def __init__(self, x, y):
self.sanity = random.randint(1,3)
self.dream_claimed = False
super().__init__(x, y)
def modify_player(self, player):
if not self.dream_claimed:
player.sanity = player.sanity + self.sanity
self.dream_claimed = True
print("Your sanity level is {}".format(player.sanity))
print(" ")
else:
player.sanity = player.sanity +1
print("Your sanity level is {}".format(player.sanity))
print("")
def intro_text(self):
if self.dream_claimed:
return """
Why do you return to a place of dead memories ?
Do you enjoy being tormented by the ghost of the past ?
"""
else:
r=random.random()
if r< 0.5:
return """
You have been here for much too long.
Your sanity is in ruins, you need to escape soon!!
"""
else :
return """
Your minds starts to crack.
You only see your own damnation
"""
class StartTile(MapTile):
def intro_text(self):
print("You are surrounded by mangled bodies all with contorted faces of horror")
print("You can make out four paths.")
return """
"""
class EnemyTile(MapTile):
def __init__(self, x, y):
r = random.random()
if r < 0.40:
self.enemy = enemies.RagMan()
self.alive_text =r"""
You hear a shout in the darkness.
'More rags for the rag man !!'
"""
self.dead_text = """
A battered corpse lays on floor.
Is this the fate fo those that
enter the Woods of Yrpes ?
"""
elif r < 0.75:
self.enemy = enemies.BogImp()