fork download
  1. from sys import exit
  2.  
  3. times_in_exchange_path = 0
  4. asked_for_help = 0
  5.  
  6. def exchange_path():
  7. print "Hola! You are about to get to the very dangerous point, kid!"
  8. print "You are independent from now. With luck..."
  9.  
  10. action = raw_input('...')
  11.  
  12. if 'what' in action:
  13. print 'I said you are on your own now. No one is gonna help you',
  14. print "with anything..."
  15. exchange_path()
  16. elif 'creepy' in action:
  17. print "I found it creepy, too. Kid. Take me out of here with you."
  18. print "Is that OK?"
  19. haunted = False
  20.  
  21. decision = raw_input()
  22.  
  23. if decision == 'agree':
  24. print "Finally. I'm free!"
  25. haunted = True
  26. times_in_exchange_path = times_in_exchange_path + 1
  27. start()
  28. else:
  29. dead("I will make you know what pain really is!!?! >:(")
  30.  
  31. else:
  32. dead("A shadow barged into you, and you broke your neck.")
  33.  
  34. def gold_room():
  35. print "This room is full of gold. How much do you take?"
  36.  
  37. choice = raw_input("> ")
  38. try:
  39. how_much = int(choice)
  40. except:
  41. dead("Man, learn to type a number.")
  42.  
  43. if how_much < 50:
  44. print "Nice, you're not greedy, you win!"
  45.  
  46. if haunted:
  47. print "\nHowever... I can't just let you get away easily like this."
  48. print '"Why??" - I asked'
  49. print "You belong to the gold mine now!!"
  50. print '"What do you mean??" - I replied in fear'
  51. print "Power requires sacrifice. Muhahahhaha!"
  52. dead(" ")
  53. else:
  54. exit(0)
  55.  
  56. else:
  57. dead("You greedy bastard! It's a trap for you!")
  58.  
  59. def bear_room():
  60. print "There is a bear here."
  61. print "The bear has a bunch of honey."
  62. print "The fat bear is in front of another door."
  63. print "How are you going to move the bear?\n"
  64. bear_moved = False
  65.  
  66. if haunted:
  67. print "...Wait. The bear suddenly shouts at you, break the window",
  68. print "and runs far far away."
  69. print "Let's go to the door, kid...\n\n"
  70. gold_room()
  71. else:
  72. while True:
  73. choice = raw_input("> ")
  74.  
  75. if choice == "take honey":
  76. dead("The bear looks at you then slaps your face off.")
  77. elif choice == "taunt bear" and not bear_moved:
  78. print "The bear has moved from the door. You can go through",
  79. print "it now."
  80. bear_moved = True
  81. elif choice == "taunt bear" and bear_moved:
  82. dead("The bear gets pissed off and chews your leg off.")
  83. elif choice == "open door" and bear_moved:
  84. gold_room()
  85. else:
  86. print "I got no idea what that means."
  87.  
  88.  
  89. def cthulhu_room():
  90. print "Here you see the great evil Cthulhu."
  91. print "He, it, whatever stares at you and goes insane."
  92. print "Do you flee for your life or he eats your head?"
  93. cthulhu_dead = False
  94.  
  95. choice = raw_input("> ")
  96.  
  97. if cthulhu_dead:
  98. print "There's nothing here, kid. Except of the light and a dead body."
  99. print "Let's go!\n...\n\n"
  100. start()
  101. else:
  102.  
  103. if "flee" in choice:
  104. start()
  105. elif "head" in choice:
  106. dead("Well that was tasty!")
  107. elif "fight" in choice:
  108.  
  109. if haunted:
  110. print "With mysterious distraction, the Cthulhu turns his back",
  111. print "at you. You use the shiny magical spear nearby to kill",
  112. print "the monster."
  113. cthulhu_dead = True
  114. print "\n...\n"
  115. start()
  116. else:
  117. dead("Awesome tasty head you have!")
  118.  
  119. else:
  120. cthulhu_room()
  121.  
  122.  
  123. def dead(why):
  124. print why, "\n\nGood job! You died."
  125. exit(0)
  126.  
  127.  
  128. def first_assist():
  129. asked_for_help += 1
  130.  
  131. if asked_for_help in range(4, 6):
  132. print "Stop! You are attracting them!"
  133. print "A portal shows up and you are walking into it...\n\n"
  134. elif asked_for_help > 5:
  135. dead("Those demons rise from the ground. And burn you down!")
  136. else:
  137. print "Hi! I am your beautiful assistance."
  138. print "As you got lost in here, I will show you the way."
  139. print "You have to know that all three paths are dangerous, and there",
  140. print "is no way out of here.\nSo, try to survive with glory."
  141. print '"left", "right" and "front" are the first three spells you use.'
  142. print "There's a mighty power near here. Have a pure heart, and know",
  143. print "that you will never have to touch that evil power..."
  144. print "Good luck from here... Be wise."
  145.  
  146. start()
  147.  
  148.  
  149. def start():
  150. print "You are in a dark room."
  151. print "There is a door to your right and left."
  152. print 'And a middle path, full of darkness, in front of you.'
  153. print "Which one do you dare to take?"
  154.  
  155. choice = raw_input("> ")
  156.  
  157. if choice == "left":
  158. bear_room()
  159. elif choice == "right":
  160. cthulhu_room()
  161. elif choice == "front":
  162.  
  163. if times_in_exchange_path == 0:
  164. exchange_path()
  165. else:
  166. print "You feel something stopping you from entering this place. \n"
  167. start()
  168.  
  169. elif "help" in choice:
  170. first_assist()
  171. else:
  172. dead("You stumble around the room until you starve.")
  173.  
  174.  
  175. start()
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError: Sorry: IndentationError: expected an indented block (prog.py, line 83)
stdout
Standard output is empty