Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import time
- import sys
- health = 3
- counter = 0
- Exit=random.randint(1,8)
- lock = False
- def main():
- displayIntro()
- global health
- while health > 0:
- Path = choosePath()
- def displayIntro():
- print("----------She Follows-----------")
- time.sleep(1)
- 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.")
- time.sleep(1)
- print("You arrive at the hospital, open the doors and take a look around you.")
- time.sleep(1)
- print("The walls are grimy and most of the paint is chipped and decayed.")
- time.sleep(1)
- print("You hear a faint womans laugh in the far distance as the doors close and lock behind you.")
- time.sleep(1)
- print("You step forward and notice two paths. The first leading to to the ICU, and the second leading to the Pharmacy.")
- time.sleep(1)
- print("You may choose to move ahead aswell, John could be in any room.")
- def Damage():
- global health
- damage = random.randint(1,3)
- if damage == 1:
- health = health - 1
- print("Lucy appears behind you! Digging her claws into your back before disapearing again.")
- if health == 3:
- print("You feel healthy.")
- elif health == 2:
- print("You seem weak")
- elif health == 1:
- print("You're dying!")
- elif health == 0:
- print("You fall to the ground, reaching your hand out one last time. Goodbye John..")
- time.sleep(3)
- sys.exit(0)
- return health
- def choosePath():
- global lock
- path = ""
- global counter
- while path != "Exit":
- if counter == 0:
- path = input("Where would you like to go first? (ICU, Pharmacy, Move ahead: ")
- if path != "ICU" and path != "Pharmacy" and path != "Move ahead":
- continue
- else:
- if path == "Move ahead":
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter += 1
- elif path == "ICU" or path == "Pharmacy":
- checkPath(path)
- Damage()
- Itemlist()
- sameArea = input("Would you like to stay on the same floor? Y/N: ")
- if sameArea == "Y" or "y":
- print("You decide to stay on the same floor and look around.")
- time.sleep(2)
- continue
- else:
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter+=1
- elif counter ==1:
- path = input("Where would you like to go? (Delivery room, Nursery, Move ahead or Go back): ")
- if path != "Delivery room" and path != "Nursery" and path != "Move ahead" and path != "Go back":
- continue
- else:
- if path == "Move ahead":
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter += 1
- elif path == "Go back":
- print("You go back in hopes of finding something you missed.")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter = counter - 1
- else:
- checkPath(path)
- Damage()
- Itemlist()
- sameFloor = input("Would you like to stay on the same floor? Y/N: ")
- if sameFloor == "Y" or "y":
- print("You decide to stay on in the same area and look around.")
- time.sleep(2)
- continue
- else:
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter+=1
- elif counter ==2:
- path = input("Where would you like go? (Padded cell room, Casualty room, Move ahead or Go back): ")
- if path != "Padded cell room" and path != "Casualty room" and path != "Move ahead" and path != "Go back":
- continue
- else:
- if path == "Move ahead":
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter += 1
- elif path == "Go back":
- print("You go back in hopes of finding something you missed")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter = counter - 1
- else:
- checkPath(path)
- Damage()
- Itemlist()
- sameFloor = input("Would you like to stay on the same floor? Y/N: ")
- if sameFloor == "Y":
- print("You decide to stay on in the same area and look around.")
- time.sleep(2)
- continue
- else:
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter+=1
- elif counter ==3:
- print("Would you like to exit the hospital?(Y/N): ")
- exitInput = input()
- if lock == True and exitInput == "Y":
- print("You've escaped the hospital with just a few injuries! Time to bring John home.")
- time.sleep(3)
- sys.exit(0)
- elif lock == False and exitInput == "Y":
- print("You can't leave without finding John first!")
- time.sleep(2)
- path = input("Where would you like to go? (Consulting room, Downstairs ward, or Go back?): ")
- if path != "Consulting room" and path != "Downstairs ward" and path != "Move ahead" and path != "Go back":
- continue
- else:
- if path == "Move ahead":
- print("You walk deeper into the hospital..")
- time.sleep(2)
- Damage()
- time.sleep(2)
- counter += 1
- elif path == "Go back":
- print("You go back in hopes of finding something you missed.")
- time.sleep(2)
- Damage()
- counter = counter - 1
- else:
- checkPath(path)
- Damage()
- Itemlist()
- sameFloor = input("Would you like to stay on the same floor? Y/N: ")
- if sameFloor == "Y" or "y":
- print("You decide to stay on in the same area and look around.")
- time.sleep(2)
- continue
- return path
- def checkPath(chosenPath):
- global Exit
- global lock
- if chosenPath == "ICU":
- print("You open the door and...")
- time.sleep(3)
- print("You notice a bunch of old needles and equipment scattered around.")
- if Exit == 1:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- lock = True
- elif chosenPath == "Pharmacy":
- print("You open the door and...")
- time.sleep(3)
- print("There are hundreds of prescription bottles lying on the ground.")
- if Exit == 2:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- lock = True
- elif chosenPath == "Delivery room":
- print("You open the door and...")
- time.sleep(3)
- print("You take a look at the walls. The blood stains are still fresh.")
- if Exit == 3:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- lock = True
- elif chosenPath == "Nursery":
- print("You open the door and...")
- time.sleep(3)
- print("You notice many broken baby cribs all around the room.")
- lock = True
- if Exit == 4:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- elif chosenPath == "Padded cell room":
- print("You open the door and...")
- time.sleep(3)
- print("Ugh, the smell of blood, maggots, and flies fills the air.")
- lock = True
- if Exit == 5:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- elif chosenPath == "Casualty room":
- print("You open the door and...")
- time.sleep(3)
- print("You see decaying skeletons on the hospital beds and floor. Some still look fresh. ")
- lock = True
- if Exit == 6:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- elif chosenPath == "Consulting room":
- print("You open the door and...")
- time.sleep(3)
- print("There are papers and old burnt books everywhere, what a waste.")
- lock = True
- if Exit == 7:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- elif chosenPath == "Downstairs ward":
- print("You open the door and...")
- time.sleep(3)
- print("It's dark and hard to see but you can hear the rats squeaking while scurrying away.")
- lock = True
- if Exit == 8:
- print("You found John! He's unconscious but still alive. Time to head for the exit at the end of the hospital.")
- elif chosenPath == "Move ahead":
- print("You walk further down the hospital hallway.")
- time.sleep(1)
- return lock
- def Itemlist():
- global health
- itemlist = ["Bandage"]
- item = ""
- Item = random.randint(1,3)
- if Item == 2:
- item = itemlist[0]
- print("You've found a bandage!")
- if item == "Bandage":
- heal = input("Would you like to bandage yourself? Y/N: ")
- if heal == "Y" or "y":
- health+=1
- item = ""
- return item
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement