Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.14 KB | None | 0 0
  1. import random
  2. import time
  3. import sys
  4. health = 3
  5. counter = 0
  6. Exit=random.randint(1,8)
  7. lock = False
  8. def main():
  9.  
  10.  
  11. displayIntro()
  12. global health
  13.  
  14. while health > 0:
  15. Path = choosePath()
  16.  
  17.  
  18.  
  19.  
  20.  
  21. def displayIntro():
  22. print("----------She Follows-----------")
  23. time.sleep(1)
  24. print("Your name is Zoey and you are desperate to find and rescue your husband John who never came back from his photoshoot at the vacant hospitial.")
  25. time.sleep(1)
  26. print("You arrive at the hospital, open the doors and take a look around you.")
  27. time.sleep(1)
  28. print("The walls are grimy and most of the paint is chipped and decayed.")
  29. time.sleep(1)
  30. print("You hear a faint womans laugh in the far distance as the doors close and lock behind you.")
  31. time.sleep(1)
  32. print("You step forward and notice two paths. The first leading to to the ICU, and the second leading to the Pharmacy.")
  33. time.sleep(1)
  34. print("You may choose to move ahead aswell, John could be in any room.")
  35.  
  36. def Damage():
  37. global health
  38. damage = random.randint(1,3)
  39. if damage == 1:
  40. health = health - 1
  41. print("Lucy appears behind you! Digging her claws into your back before disapearing again.")
  42.  
  43. if health == 3:
  44. print("You feel healthy.")
  45. elif health == 2:
  46. print("You seem weak")
  47. elif health == 1:
  48. print("You're dying!")
  49. elif health == 0:
  50. print("You fall to the ground, reaching your hand out one last time. Goodbye John..")
  51. time.sleep(3)
  52. sys.exit(0)
  53.  
  54. return health
  55.  
  56.  
  57. def choosePath():
  58. global lock
  59. path = ""
  60. global counter
  61. while path != "Exit":
  62. if counter == 0:
  63. path = input("Where would you like to go first? (ICU, Pharmacy, Move ahead: ")
  64. if path != "ICU" and path != "Pharmacy" and path != "Move ahead":
  65.  
  66. continue
  67. else:
  68. if path == "Move ahead":
  69. print("You walk deeper into the hospital..")
  70. time.sleep(2)
  71. Damage()
  72. time.sleep(2)
  73. counter += 1
  74.  
  75. elif path == "ICU" or path == "Pharmacy":
  76. checkPath(path)
  77. Damage()
  78. Itemlist()
  79. sameArea = input("Would you like to stay on the same floor? Y/N: ")
  80. if sameArea == "Y" or "y":
  81. print("You decide to stay on the same floor and look around.")
  82. time.sleep(2)
  83. continue
  84. else:
  85. print("You walk deeper into the hospital..")
  86. time.sleep(2)
  87. Damage()
  88. time.sleep(2)
  89. counter+=1
  90.  
  91.  
  92.  
  93. elif counter ==1:
  94. path = input("Where would you like to go? (Delivery room, Nursery, Move ahead or Go back): ")
  95. if path != "Delivery room" and path != "Nursery" and path != "Move ahead" and path != "Go back":
  96. continue
  97. else:
  98.  
  99. if path == "Move ahead":
  100. print("You walk deeper into the hospital..")
  101. time.sleep(2)
  102. Damage()
  103. time.sleep(2)
  104. counter += 1
  105. elif path == "Go back":
  106. print("You go back in hopes of finding something you missed.")
  107. time.sleep(2)
  108. Damage()
  109. time.sleep(2)
  110. counter = counter - 1
  111.  
  112.  
  113. else:
  114. checkPath(path)
  115. Damage()
  116. Itemlist()
  117. sameFloor = input("Would you like to stay on the same floor? Y/N: ")
  118. if sameFloor == "Y" or "y":
  119. print("You decide to stay on in the same area and look around.")
  120. time.sleep(2)
  121. continue
  122. else:
  123. print("You walk deeper into the hospital..")
  124. time.sleep(2)
  125. Damage()
  126. time.sleep(2)
  127. counter+=1
  128.  
  129.  
  130. elif counter ==2:
  131. path = input("Where would you like go? (Padded cell room, Casualty room, Move ahead or Go back): ")
  132. if path != "Padded cell room" and path != "Casualty room" and path != "Move ahead" and path != "Go back":
  133.  
  134. continue
  135. else:
  136.  
  137. if path == "Move ahead":
  138. print("You walk deeper into the hospital..")
  139. time.sleep(2)
  140. Damage()
  141. time.sleep(2)
  142. counter += 1
  143. elif path == "Go back":
  144. print("You go back in hopes of finding something you missed")
  145. time.sleep(2)
  146. Damage()
  147. time.sleep(2)
  148. counter = counter - 1
  149.  
  150. else:
  151. checkPath(path)
  152. Damage()
  153. Itemlist()
  154. sameFloor = input("Would you like to stay on the same floor? Y/N: ")
  155. if sameFloor == "Y":
  156. print("You decide to stay on in the same area and look around.")
  157. time.sleep(2)
  158. continue
  159. else:
  160. print("You walk deeper into the hospital..")
  161. time.sleep(2)
  162. Damage()
  163. time.sleep(2)
  164. counter+=1
  165.  
  166.  
  167. elif counter ==3:
  168. print("Would you like to exit the hospital?(Y/N): ")
  169. exitInput = input()
  170. if lock == True and exitInput == "Y":
  171. print("You've escaped the hospital with just a few injuries! Time to bring John home.")
  172. time.sleep(3)
  173. sys.exit(0)
  174. elif lock == False and exitInput == "Y":
  175. print("You can't leave without finding John first!")
  176. time.sleep(2)
  177.  
  178.  
  179.  
  180. path = input("Where would you like to go? (Consulting room, Downstairs ward, or Go back?): ")
  181. if path != "Consulting room" and path != "Downstairs ward" and path != "Move ahead" and path != "Go back":
  182.  
  183. continue
  184. else:
  185. if path == "Move ahead":
  186. print("You walk deeper into the hospital..")
  187. time.sleep(2)
  188. Damage()
  189. time.sleep(2)
  190. counter += 1
  191. elif path == "Go back":
  192. print("You go back in hopes of finding something you missed.")
  193. time.sleep(2)
  194. Damage()
  195. counter = counter - 1
  196.  
  197.  
  198. else:
  199. checkPath(path)
  200. Damage()
  201. Itemlist()
  202. sameFloor = input("Would you like to stay on the same floor? Y/N: ")
  203. if sameFloor == "Y" or "y":
  204. print("You decide to stay on in the same area and look around.")
  205. time.sleep(2)
  206. continue
  207.  
  208.  
  209. return path
  210.  
  211. def checkPath(chosenPath):
  212. global Exit
  213. global lock
  214. if chosenPath == "ICU":
  215. print("You open the door and...")
  216. time.sleep(3)
  217. print("You notice a bunch of old needles and equipment scattered around.")
  218. if Exit == 1:
  219. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  220. lock = True
  221. elif chosenPath == "Pharmacy":
  222. print("You open the door and...")
  223. time.sleep(3)
  224. print("There are hundreds of prescription bottles lying on the ground.")
  225. if Exit == 2:
  226. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  227. lock = True
  228. elif chosenPath == "Delivery room":
  229. print("You open the door and...")
  230. time.sleep(3)
  231. print("You take a look at the walls. The blood stains are still fresh.")
  232. if Exit == 3:
  233. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  234. lock = True
  235. elif chosenPath == "Nursery":
  236. print("You open the door and...")
  237. time.sleep(3)
  238. print("You notice many broken baby cribs all around the room.")
  239. lock = True
  240. if Exit == 4:
  241. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  242. elif chosenPath == "Padded cell room":
  243. print("You open the door and...")
  244. time.sleep(3)
  245. print("Ugh, the smell of blood, maggots, and flies fills the air.")
  246. lock = True
  247. if Exit == 5:
  248. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  249. elif chosenPath == "Casualty room":
  250. print("You open the door and...")
  251. time.sleep(3)
  252. print("You see decaying skeletons on the hospital beds and floor. Some still look fresh. ")
  253. lock = True
  254. if Exit == 6:
  255. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  256. elif chosenPath == "Consulting room":
  257. print("You open the door and...")
  258. time.sleep(3)
  259. print("There are papers and old burnt books everywhere, what a waste.")
  260. lock = True
  261. if Exit == 7:
  262. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  263. elif chosenPath == "Downstairs ward":
  264. print("You open the door and...")
  265. time.sleep(3)
  266. print("It's dark and hard to see but you can hear the rats squeaking while scurrying away.")
  267. lock = True
  268. if Exit == 8:
  269. print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
  270. elif chosenPath == "Move ahead":
  271. print("You walk further down the hospital hallway.")
  272. time.sleep(1)
  273.  
  274. return lock
  275.  
  276.  
  277.  
  278. def Itemlist():
  279. global health
  280. itemlist = ["Bandage"]
  281. item = ""
  282. Item = random.randint(1,3)
  283. if Item == 2:
  284. item = itemlist[0]
  285. print("You've found a bandage!")
  286.  
  287. if item == "Bandage":
  288. heal = input("Would you like to bandage yourself? Y/N: ")
  289. if heal == "Y" or "y":
  290. health+=1
  291. item = ""
  292. return item
  293.  
  294.  
  295.  
  296. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement