-
Notifications
You must be signed in to change notification settings - Fork 3
/
events.py
533 lines (449 loc) · 21.4 KB
/
events.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
import random
import time
from data import nothing_list,weapon_list
from items import*
import winsound
from enemy import*
def nothing():
nothing=random.choice(nothing_list)
print(nothing)
def battle_1(Player):
r= random.random()
if r < .50:
print("From the shadows a Bog Imp attacks you ")
Player.fight(BogImp())
elif r < .80:
print("A Ratling sneaks up behind you ")
Player.fight(Ratling())
elif r<.90:
print ("You see a Lesser Demon ready to feed")
Player.fight(LesserDemon())
def battle_2(Player):
r= random.random()
if r < .50:
print("From the shadows a Hell Hound attacks you ")
Player.fight(HellHound())
elif r < .80:
print("A Ratling Mage sneaks up behind you ")
Player.fight(RatlingMage())
elif r<.90:
print ("You see a Red Ettercap ready to feed")
Player.fight(RedEttercap())
def battle_3(Player):
r= random.random()
if r < .50:
print("From the shadows a Doom Speaker attacks you ")
Player.fight(DoomSpeaker())
elif r < .80:
print("A Hand of Ungas sneaks up behind you ")
Player.fight(HandofUngas())
elif r<.90:
print ("You see a Death Bloom ready to feed")
Player.fight(DeathBloom())
def treasure(): #not needing an augement because 'return' was used.
gold=random.randint(1,6)
print("you loot some dead bodies and find some gold. You find",str(gold),"gold")
return gold
def diamond(Player):
Player.diamond+=1
print("Oh how lucky you found a Diamond on the floor")
input("press Enter to continue ")
def rag_man_1(Player):
while True:
print("You see a rag man who is buying Demon Silk")
print("He will exchange 6x Demon Silk for a demonic weapon he found")
choice=input("Yes(Y) NO(N)").upper()
if choice==("Y"):
if Player.demon_silk<6:
print("You do not have enough demon silk")
print("Come back another time")
input("Press enter to continue")
break
else:
Player.demon_silk-=6
weapon=random.choice(weapon_list)
print("You gain",weapon)
print("With a sly smile the Rag man mutters 'lets do business again")
Player.inventory.append(weapon)
input("Press enter to continue")
break
elif choice==("N"):
print("Come back if you change your mind")
input("Press enter to continue")
break
else:
print("\033c", end="")
print("I didn't quite catch that")
def rag_man_2(Player):
while True:
print("You see a rag man who is buying Brimstone")
print("He will exchange 6x Brimstone for a demonic weapon he found")
choice=input("Yes(Y) NO(N)").upper()
if choice==("Y"):
if Player.brimstone<6:
print("You do not have enough Brimstone")
print("Come back another time")
input("Press enter to continue")
break
else:
Player.brimstone-=6
weapon=random.choice(weapon_list)
print("You gain",weapon)
print("With a sly smile the Rag man mutters 'lets do business again")
Player.inventory.append(weapon)
input("Press enter to continue")
break
elif choice==("N"):
print("Come back if you change your mind")
input("Press enter to continue")
break
else:
print("\033c", end="")
print("I didn't quite catch that")
def abandoned_outpost(Player):
while True:
if Player.abandoned_outpost==False:
print("You stumble upon an abandoned outpost")
print("Will you search to see if there is anything useful?")
choice=input("Yes(Y) NO(N)").upper()
if choice==("Y"):
Player.healing_potion+=5
Player.mana_potion+=2
Player.inventory.append(HereticPlateMail())
Player.abandoned_outpost=True
print("You find some magical potions and a Plate Mail Armour")
print("You gain 5 x healing potions 2x mana potions and a Heretic Plate Mail")
input("Press enter to continue")
break
elif choice==("N"):
print("You decide to leave the outpost alone")
input("Press enter to continue")
break
else:
print("Invalid option")
else:
print("You have already ransacked the abandoned outpost")
input("Press enter to continue")
break
#OPEN WORLD QUEST
def outside_sideboss_2(Player):
print("You scream out the name 'Atumbrath'and you hear a roar back")
print("You see the Sea Beast prepare for the fight of your life")
Player.fight(SeaBeast())
if Player.flee==True:
print("\033c", end="")
pass
else:
print("\033c", end="")
print("You defeat the dreaded Atumbrath, now go and collect your bounty")
Player.sideboss_2_alive=False
def doom_king(Player):
winsound.PlaySound(".\\music\\boss.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
print("You see the Doom King on his throne. He speaks, 'A new challenger, how exciting' ")
Player.fight(DoomKing())
if Player.flee==True:
winsound.PlaySound(".\\music\\background.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
print("\033c", end="")
pass
else:
print("\033c", end="")
winsound.PlaySound(".\\music\\ending.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
print("You defeated the Doom King, you have freed the land from his evil hands")
print("You have conquered the final boss, but can you find the 'true' ending ? " )
print("You gain 1 million gold")
print("You gain Doom King Plate Mail")
print("You gain Doom King Sword")
Player.inventory.append(DoomKingPlateMail())
Player.inventory.append(DoomKingSword())
print(" ")
input("Press enter to continue")
winsound.PlaySound(".\\music\\background.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
Player.doom_king_alive=False
def outside_sideboss_3(Player):
print ("You have found the dreaded hideout of Nine Dead Eyes the Shadow Stalker")
print ("You see that he is a human being. He looks back at you with a puzzled look and says")
time.sleep(1.5)
print("'You are aware the reason why they want me dead is because I beat them in a fair game of poker ?")
print("It is true I took all their belongings but they knew the risk in gambling with old Nine Dead Eyes ")
time.sleep(1.5)
print("Surely that doesn't deserve the death penalty?")
print( "If you let me live I will teach you how to spot 'secrets' that even the keeniest eyes won't be able to see")
while True:
choice=input("Kill (K) Mercy (M)").upper()
if choice==("M"):
Player.marks=True
Player.sidequest_3_escape=True
print("Nine Dead Eyes teaches you to look out for several 'marks' that indicate a secret door '")
print(" and informs you how to open them. He wishes you well and abandon the hideout")
input("Press enter to continue your adventure")
break
elif choice==("K"):
print("I didn't want to do this but i must defend with violence")
Player.fight(ShadowHunter())
if Player.flee==True:
Player.sidequest_3_escape=True
print("You escape the violent confrontation. I doubt that he will still be here next time")
input("Press enter to continue your adventure")
break
else:
Player.sideboss_3_alive=False
print("You have slain Nine Dead Eyes in combat ")
print("Go back to the Inn for your reward")
input("Press enter to continue your adventure")
break
else:
pass
def outside_doom_wizard(Player):
if Player.shadow_hunter==True or Player.holy_knight==True:
print("You see a blind old man sitting on the floor, as you approach him he looks up and says")
print("Buzz off, you mind has already been tainted by foul knowledge")
input("Press enter key to continue your adventure")
elif Player.doom_wizard==True:
print("Hello young student, have you come to visit your master ?")
input("Press enter key to continue your adventure")
else:
if Player.max_mana>19:
print("You see a blind old man sitting on the floor, as you approch him he looks up and says")
print("You have potential young one, I can feel the Mana flowing from you")
print("I can teach you how to harness your full potential ? ")
while True:
choice=input("Yes(Y) or No(N)").upper()
if choice==("Y"):
Player.doom_wizard=True
Player.player_class="Doom Wizard"
Player.max_mana+=12
print("After many months of training you become a deadly Doom Wizard ")
print("You gain 12 max mana")
Player.mana=Player.max_mana
print("All spells are unlocked")
Player.fire_bolt=True
Player.shadow_flee=True
Player.ice_blast=True
Player.divine_heal=True
Player.chaos_vortex=True
input("Press enter to continue on your adventure")
break
elif choice==("N"):
print("Have a think about it")
input("Press any key to continue on your adventure")
break
else:
print("You see a blind old man sitting on the floor, as you approch him he looks up and says")
print("You have potential young one, come back when you are wiser ")
print("Your need at least 20 Mana to upgrade CLASS to Doom Wizard")
input("Press enter key to continue your adventure")
def outside_nine_dead_eyes(Player):
while True:
if Player.sideboss_4_alive==True:
print("You see a huge demon with a large meat cleaver")
print("and in the corner 'Nine Dead Eyes in a very small cage")
print("The huge demon approaches you with an evil grin and bellow's out ")
print("'Fresh meat for the lady tonight'")
Player.fight(Butcher())
if Player.flee==True:
break
else:
Player.sideboss_4_alive=False
print("You set Nine Dead Eyes free and he thanks you")
if Player.doom_wizard==True or Player.holy_knight==True:
print ("He gives you a box of potions as a thank you")
print("he mutters 'You would have made a great student'")
print("'If you didn't pledge yourself to another master already'")
Player.healing_potion+=10
Player.mana_potion+=4
input("Press enter key to continue your adventure")
break
else:
print("Thank you for saving me, the demon took me by surprise")
print("As a reward, I will teach you the ways of the Shadow Hunter")
choice=input("Yes (Y) No (N)").upper()
if choice==("Y"):
Player.shadow_hunter=True
Player.player_class="Shadow Hunter"
Player.max_strength+=15
Player.strength=Player.max_strength
Player.inventory.append(ShadowBlade())
print("After many months of training you become a Skilled Shadow Hunter")
print("Nine Dead Eyes gifts you with the Shadow Blade ")
print("As a reward for completing your training ")
print("You gain +15 to Max Strength")
print("You gain Shadow Blade")
print("You gain Passive Skill 'Master Killer' For every attack, you make an additional 'special attack' ")
print("You gain Passive Skill 'Be Quick or be Dead'. You gain an extra melee attack with Freeze Blast")
input("Press enter key to continue your adventure")
break
else:
print("Ok, come back if you do decide to become my student")
input("Press enter key to continue your adventure")
break
else:
if Player.doom_wizard==True or Player.holy_knight==True:
print("Thank you for saving me")
input("Press enter key to continue your adventure")
break
elif Player.shadow_hunter==True:
print("Welcome back student")
input("Press enter key to continue your adventure")
break
else:
print("Have you decided to become my student?")
choice=input("Yes(Y) No(N)").upper()
if choice==("Y"):
Player.shadow_hunter=True
Player.player_class="Shadow Hunter"
Player.max_strength+=15
Player.strength=Player.max_strength
Player.inventory.append(ShadowBlade())
print("After many months of training you become a Skilled Shadow Hunter")
print("Nine Dead Eyes gifts you with the Shadow Blade ")
print("As a reward for completing your training ")
print("You gain +15 to Max Strength")
print("You gain Shadow Blade")
print("You gain Passive Skill 'Master Killer' For every attack, you make an additional 'special attack' ")
print("You gain Passive Skill 'Be Quick or be Dead'. You gain an extra melee attack with Freeze Blast")
input("Press enter key to continue your adventure")
break
else:
print("Ok, come back if you do decide to become my student")
input("Press enter key to continue your adventure")
break
def goblin_shaman(Player):
if Player.amulet==False:
while True:
print("You see a Goblin looking rather 'wise'. He whispers to you")
print("'Hey you..I heard from someone you are looking to pass the bed of souls")
print("I can sell you an Amulet that will help but I will need 10,000 gold, interested ?'")
choice=input("Yes(Y) or No(N)").upper()
if choice==("Y"):
if Player.gold<10000:
print("You do not have enough gold")
input("Press enter to continue")
break
else:
Player.gold-=10000
print("You have gain the Amulet of Ulgak Shield")
Player.inventory.append("Amulet of Ulgak Shield")
Player.amulet=True
input("Press enter to continue")
break
elif choice==("N"):
print("Come back if you change your mind")
input("Press enter to continue")
break
else:
print("I did not quite catch that")
else:
print("How nice of you to visit..I have no other gadgets that might be useful to you")
input("Press enter to continue")
def blood_pit( Player):
Player.flee=False
score=0
while True:
print("test your might and see how far you reach in the blood pit?")
Choice=input("Do you want to enter? Y or N ").upper()
if Choice==("Y"):
winsound.PlaySound(".\\music\\bloodpit.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
print("Unlike within a dungeon you can escape a dual but it will reset the arena")
print("There are 12 opponents")
input("Press enter to continue")
print("\033c", end="")
while True:
print("Your first Challenge arrives")
Player.fight(DemonTroll())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(CultistImpaler())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(GreaterDemon())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(ClockworkHorror())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(DemonWarChampion())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(HandofUngas())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(ClockworkPainTaker())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(DoomSpeaker())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(DeathBloom())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(BlackDragon())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Next Challenger arrives")
Player.fight(DeathKnight())
if Player.flee==True:
break
score+=1
print("\033c", end="")
print("Final Challenger arrives")
Player.fight(BloodPitChampion())
if Player.flee==True:
break
score+=1
print("You have survived the arena ")
input("Press enter to continue")
break
print("Your score was",score)
winsound.PlaySound(".\\music\\background.wav", winsound.SND_ALIAS | winsound.SND_ASYNC +winsound.SND_LOOP)
if score==12:
print("You have defeated the arena")
print("You have become the master of the pit !!")
print("You gain 5 Diamonds ")
print ("You gain 40 reputation")
Player.diamond+=5
Player.reputation+=40
elif score >9 and score<12:
print("That was a good show in the Blood Pit")
print("Here is your payment for the grand display ")
print("You gain 2 Diamonds ")
Player.diamond+=2
else:
print("You are too weak for the pit, You don't deserve payment ")
print("Come back when you are stronger")
input("Press enter to continue ")
break
elif Choice==("N"):
print("Ha chicken !!")
break
else:
print("\033c", end="")
("Invalid option ")