Files
  • main.py
main.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
import time, random
global shards
shards = 0
global lives
lives = 3
global gem
gem = 0
global score
score = 0
global rt
rt = 0
global dumb
dumb = 0

#story shit
def start_room():
  print('''In the castle of Bobrosia sits the great Queen Marlena. You, of course, being a trusty (and replacable) knight are at her aid. Queen Marlena has tasked you with finding 3 shards. The city of Bobroisia needs 3 shards every year to keep the city powered. Looks like you're the next expendable knight to do the job. You, being the main character and obviously wanting to go on such a dangerous journey accept such quest. Queen Marlena is thrilled. You ask her of a reward. She exclaims that she may give you a reward, depending on how well you've done. Great, no up-front payment. Anyway, the shards are only located in the Meloxlexdia Cave, the deadliest cave on Pumchar. There are some shards scattered in rooms, but others are held by monsters. Either way, it's time to begin your journey in...''')
  time.sleep(7)
  print('''
   ▄▄▄▄▄    ▄  █ ██   █▄▄▄▄ ██▄      ▄▄▄▄▄   
  █     ▀▄ █   █ █ █  █  ▄▀ █  █    █     ▀▄ 
▄  ▀▀▀▀▄   ██▀▀█ █▄▄█ █▀▀▌  █   █ ▄  ▀▀▀▀▄   
 ▀▄▄▄▄▀    █   █ █  █ █  █  █  █   ▀▄▄▄▄▀    
              █     █   █   ███▀             
             ▀     █   ▀                     
                  ▀                           
  ''')


def move():
  t = input("You are moving to the next room.")


def monster():
  global lives
  global shards
  f = random.randint(1, 5) #Monster Chance
  shrc = random.randint(1, 3) #Shard Chance
  ml = ["Slime", "Witch", "Zombie", "Ghost", "Mushroom Monster"]
  yp = random.choice(ml)
  print("You approach a " + yp + "!")
  time.sleep(2)
  print("Being a knight, your will forces you to fight it.")
  time.sleep(3)
  print("By stupid luck, you will either kill it or not. Maybe get a shard.")
  time.sleep(4)
  
  if f == 1 or f == 2 or f == 3:
    print("You successfully killed the monster...somehow...")
    time.sleep(2)
    if shrc == 1 or shrc == 2:
      print("You also got a gleaming shard. Lucky you.")
      shards += 1
      time.sleep(2)
      print("You have " + str(shards) + " shard(s).")
    else:
      print("Unfortunetely, you did not get a shard. Bleth.")
      time.sleep(2)
      print("You have " + str(shards) + " shard(s).")
  else:
    print("You did not kill the monster. You lost one life.")
    lives -= 1
    
    print("You have " + str(lives) + " left.")


def plain():
  print("You enter an unremarkable room.")
  time.sleep(2)
  descriptions = ["This room is nearly bare, with dim light coming from a small green torch in the left corner.", "The room is cold and dreary. A rat scurries across the floor. Gross.", "Some moths fly around a broken lamp light.", "Uh..."]
  r = random.choice(descriptions)
  print(r)
  time.sleep(4)
  print("You move on.")
  time.sleep(1)


def shard():
  global shards
  print("You glance around the room.")
  time.sleep(2)
  print("In the center you find a very shiny shard! What a find!")
  shards += 1
  time.sleep(2)
  print("You have " + str(shards) + " shard(s).")


def level0():
  print("You move to level 0. Well, that's what you're going to call it.")
  
  r = True
  
  while r == True:
    t = input("You stand at two different paths. You can go left to a monster room, or right to a plain boring room.")
    ch = t.lower()
    if ch == "left" or ch == "l":
      monster()
      move()
      plain()
      move()
      plain()
      move()
      monster()
      print("You are now heading to level 1.")
      r = False
      level1()
    elif ch == "right" or ch == "r":
      plain()
      move()
      plain()
      move()
      monster()
      move()
      monster()
      print("You are now heading to level 1.")
      r = False
      level1()
    else:
      print("That's not a response!")
      r = True


def level1():
  print("This is level 1. You are clearly genius at naming conventions.")

  r = True

  while r == True:
    t = input("You stand at two different paths. You can go left, into a plain room, or right, also into a plain room.")
    ch = t.lower()
    if ch == "left" or ch == "l":
      plain()
      move()
      shard()
      move()
      monster()
      print("You are now heading to level 2.")
      r = False
      level2()
    elif ch == "right" or ch=="r":
      plain()
      u = True
      while u == True:
        g = input("You now have two options, you can go left, to level 2, or go right, to fight a monster.")
        e = g.lower()
        if e == "left" or e == "l":
          print("You are now heading to level 2.")
          u = False
          level2()
        elif e == "right" or e == "r":
          monster()
          move()
          plain()
          move()
          monster()
          print("You are now heading to level 2.")
          u = False
          level2()
        else:
          print("That's not a response!")
          u = True


def level2():
  print("Level 2 is still a good name, you suppose.")
  time.sleep(1)
  print("Sigh.")

  r = True
  
  while r == True:
    t = input("You stand at two different paths. You can go left to a monster room, or right to....another monster room. Geez.")
    ch = t.lower()
    if ch == "left" or ch == "l":
      monster()
      move()
      plain()
      move()
      monster()
      move()
      plain()
      print("You are now heading to level 3.")
      r = False
      level3()
    elif ch == "right" or ch == "r":
      monster()
      g = True
  
      while g == True:
        t = input("Now, you can see two more paths. If you go left, you will go to a plain ol' boring room. If you head right, you can fight a monster")
        ch = t.lower()
        if ch == "left" or ch == "l":
          plain()
          move()
          monster()
          move()
          monster()
          print("You are now heading to level 3.")
          g = False
          r = False
          level3()

        elif ch == "right" or ch == "r":
          monster()
          move()
          plain()
          move()
          shard()
          print("You are now heading to level 3.")
          g = False
          r = False
          level3()
        else:
          print("That's not a response!")
          g = True
    else:
      print("That's not a response!")
      r = True


def level3():
  print("You are not naming this level 3. Not today.")
  time.sleep(2)
  print("Nope")
  time.sleep(2)
  print("...")
  time.sleep(2)
  print("Fine. You can name this level 3. You uncreative goon.")
  r = True
  
  while r == True:
    t = input("Like every time before, you can go left, which is a monster room, or right, which is a plain room.")
    ch = t.lower()
    if ch == "left" or ch == "l":
      monster()
      move()
      shard()
      move()
      plain()
      print("You are now heading to...the final stage.")
      r = False
      bossstage()
    elif ch == "right" or ch == "r":
      plain()
      
      g = True
  
      while g == True:
        t = input("You stand at two different paths. You can go left to a plain room, or right to fight a monster.")
        ch = t.lower()
        if ch == "left" or ch == "l":
          plain()
          move()
          monster()
          move()
          monster()
          print("You are now heading to...the final stage.")
          g = False
          print("g is now false")
          r = False
          bossstage()
        elif ch == "right" or ch == "r":
          monster()
          move()
          monster()
          move()
          plain()
          print("You are now heading to...the final stage.")
          g = False
          print("g is now false")
          r = False
          bossstage()
        else:
          print("That's not a response!")
          g = True
        r = False
    else:
      print("That's not a response!")
      r = True

def bossstage():
  global shards
  global gem
  print("This is it. The final stage.")
  time.sleep(2)
  print("But uh, first, let's see how many shards you have")
  print("You see, shards increase your chance against the boss.")
  print("You should have at least three if you are gonna fight it.")
  time.sleep(2)
  print("You currently have " + str(shards) + " shard(s).")
  if shards >= 3:
    print("You have enough shards to kill the boss monster!")
    time.sleep(2)
    print("Suddenly, from around the corner of the lofty dungeon room, comes a colossal dark giant. His eyes burn hot white. He grasps two enormous diamond swords in either hand. He is known only as...")
    time.sleep(3)
    print('''
     _______ _________ _______  _______          
(  ____ \\__   __/(  ___  )(  ____ \|\     /|
| (    \/   ) (   | (   ) || (    \/( \   / )
| (_____    | |   | (___) || |       \ (_) / 
(_____  )   | |   |  ___  || |        \   /  
      ) |   | |   | (   ) || |         ) (   
/\____) |   | |   | )   ( || (____/\   | |   
\_______)   )_(   |/     \|(_______/   \_/   
                                             
    ''')
    time.sleep(2)
    print("Now it's time to kill Stacy! Let's count up your shards")
    time.sleep(2)
    print("You have " + str(shards) + " shard(s)")
    time.sleep(2)
    print("Fight!")
    chance = random.randint(1, 100)
    sharchance = shards * 10
    if sharchance <= chance:
      print("You killed Stacy!")
      gem += 1
      time.sleep(2)
      print("You have " + str(gem) + " Monster Gem.")
      time.sleep(2)
      print("On to the castle")
      castle()
    else:
      print("You didn't kill Stacy...")
      time.sleep(2)
      print("Oh well, on to the castle.")
      castle()
  else:
    print("Sorry, you don't have enough shards, without getting killed.")
    time.sleep(2)
    print("Besides, it's nice not dying.")
    castle()


def castle():
  global shards
  global lives
  global gem
  global score
  global dumb
  print("You arrive at the castle.")
  time.sleep(2)
  print("The queen is ecstatic! You finally made it!")
  print("Let's count up all your shards!")
  time.sleep(2)
  print("You have " + str(shards) + " shard(s)" )
  if gem == 1:
    print('You have the monster gem. The final gem. You will now become the god of the universe. Suddenly, debris begins to fly around you. The queen looks at you in terror. "Mercy!", she says. You swell with infinite power. The atoms, particles, quarks, and every part of the universe is absorbed into your being. You take a final breathe, and open your eyes, to see nothing, but a black, empty abyss. You are the ruler, of the Universe, forever, and omnipotent.')
  else:
    print("this")
    if shards < 3:
      print("The queen is extremely angry at you! She cannot believe that you did not collect 3 gems! She throws you in the dungeon. Only for a week, though, because next week you need to go on a quest for Dinnerland.")
    else:
      #3 or more shards
      #The minimum score here would be 8 (1 life, 3 shards), times 2
      if lives == 1 and shards == 3:
        print("You did okay. You're almost dead, but hey, you got the shards. The queen gives you a meager reward of 60 Ungcoins. Essentially, those are worthless to you, but you enjoy collecting materialistic items.")
      elif lives == 1 and shards == 4:
        print("Great! You got 4 shards, though you're almost dead. The queen gives you a deed to a sturdy house, as well as 1000 Ungcoins, which are, essentially useless, although you appreciate them.")
      elif lives == 1 and shards == 5:
        print("Awesome! 5 shards, that will supply the kingdom for quite a while! The queen gives you a large reward of 1000000000 Ungcoins, although they are essentially useless, as well as a deed to a fabulous house outside of the castle.")
      elif lives == 1 and shards >= 6:
        print("Wow, you are a hardy warrior. 6 shards? That will supply the kingdom for 2 YEARS! The queen is extremely happy, and gives you the Purple Sword for your bravery.")
      elif lives == 2 and shards == 3:
        print("Great that you got the needed amount of shards! The queen gives you 500 useless Ungcoins.")
      elif lives == 2 and shards == 4:
        print("Cool, you got a nice amount of shards. The queen grants you stock to invest in Bitungcoin. Hopefully that isn't useless.")
      elif lives == 2 and shards == 5:
        print("You are famed, glorious knight. You have massive approval within the city. The queen is delighted, and grants you 2000000000000 Ungcoins! Wow! That's a lot of useless coins!")
      elif lives == 2 and shards >= 6:
        print("The queen invites you to royal dinner, to tell the other queens of your great journey. The queens are interested. One of the queens, Queen Arlena, decides to take you as the royal guard of her kingdom. Your queen, Queen Marlena, is fine with this, as there are many other expendable knights.")
      elif lives == 3 and shards == 3:
        print("You are a strong warrior. You have collected the shards you need. The queen is very happy, and rewards you with 800 Ungcoins.")
      elif lives == 3 and shards == 4:
        print("Amazing! You managed to collect 4 shards, and not sustain an injury! The cityfolk are amazed, and you become a city celebrity. You are the most popular knight, and are granted with fame and riches. Oh, and the queen is pretty happy too.")
      elif lives == 3 and shards == 5:
        print("Your legend spreads beyond the city. People hear of your name, and make stories around you. You are remembered until the end of the land. The queen appoints you as the head of the Royal Guard.")
      elif lives == 3 and shards >= 6:
        print("You are a living god. You are the master of sword, skill, and strength. The queen is so impressed, that she decides to make you ruler of the city. You are appointed control over the entire city. Your name spreads throughout history. You are a living legend, heard by all, admired by everyone. You are the best person ever.")
      
    score = (lives + shards + gem) * 2
    time.sleep(2)
    print("Your final score: " + str(score) + ".")
    dumb = 1


def playagain():
  global rt
  s = input("Play again?")
  p = s.lower()
  if p == "Yes" or p == "yes":
    game()
  else:
    rt = 1
def gameover():
  print("You died!")
  time.sleep(2)
  playagain()


#var dumb executes the play prompt
#var rt breaks the loop if you don't wanna play

#----------Testing Shit------------------
#def test():
  #print("The purpose of this is to test the break point.")
  #time.sleep(1)
  #global dumb
  #dumb = 1

def game():
  global shards
  shards = 0
  global lives
  lives = 3
  global gem
  gem = 0
  global score
  score = 0
  global rt
  rt = 0
  global dumb
  dumb = 0
  while lives > 0:
    start_room()
    level0()
    
    if dumb == 1:
      playagain()
      if rt == 1:
        break
  if lives == 0:
    gameover()

game()

Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux