101 lines
2.7 KiB
Python
101 lines
2.7 KiB
Python
|
|
def start():
|
|
print("\nYou wake up in a dark room. The only light comes from a crack in the door.")
|
|
print("1. Try to open the door")
|
|
print("2. Look around the room")
|
|
|
|
choice = input("What do you do? ")
|
|
|
|
if choice == "1":
|
|
door_scene()
|
|
elif choice == "2":
|
|
room_scene()
|
|
else:
|
|
print("Not a option. Try again.")
|
|
start()
|
|
|
|
def door_scene():
|
|
print("\nYou slowly push the door open. It creeks loudly.")
|
|
print("1. Walk into the hallway")
|
|
print("2. Go back into the room")
|
|
|
|
choice = input("Whats your next move? ")
|
|
|
|
if choice == "1":
|
|
hallway_scene()
|
|
elif choice == "2":
|
|
print("\nYou decide to stay. You sit and wait... nothing changes.")
|
|
print("Game over.")
|
|
else:
|
|
print("Wrong choose. Try again.")
|
|
door_scene()
|
|
|
|
def room_scene():
|
|
print("\nYou search the room and find a small rusty key under a loose stone.")
|
|
print("1. Use the key on the door")
|
|
print("2. Ignore it and sit down")
|
|
|
|
choice = input("Choose your action: ")
|
|
|
|
if choice == "1":
|
|
hallway_scene()
|
|
elif choice == "2":
|
|
print("\nYou give up and sit down. You fall asleep and never wake up.")
|
|
print("Game over.")
|
|
else:
|
|
print("Invalid input. Try again.")
|
|
room_scene()
|
|
|
|
def hallway_scene():
|
|
print("\nYou step into a long hallway with flickering lights.")
|
|
print("1. Go left towards a faint light")
|
|
print("2. Go right into the shadows")
|
|
|
|
choice = input("Which way? ")
|
|
|
|
if choice == "1":
|
|
light_scene()
|
|
elif choice == "2":
|
|
shadow_scene()
|
|
else:
|
|
print("Not a option.")
|
|
hallway_scene()
|
|
|
|
def light_scene():
|
|
print("\nYou follow the light and find an old wooden door.")
|
|
print("1. Open the door")
|
|
print("2. Turn back")
|
|
|
|
choice = input("What do you do? ")
|
|
|
|
if choice == "1":
|
|
print("\nYou walk outside and feel the warm sun on your face.")
|
|
print("You win!")
|
|
elif choice == "2":
|
|
print("\nYou turn back but get lost. You wander until you collapse.")
|
|
print("Game over.")
|
|
else:
|
|
print("Invalid choose.")
|
|
light_scene()
|
|
|
|
def shadow_scene():
|
|
print("\nYou walk into the shadows and hear heavy breathing behind you.")
|
|
print("1. Run away")
|
|
print("2. Slowly turn around")
|
|
|
|
choice = input("What will you do? ")
|
|
|
|
if choice == "1":
|
|
print("\nYou trip over a stone and fall. The shadow grabs you.")
|
|
print("Game over.")
|
|
elif choice == "2":
|
|
print("\nYou turn and see... nothing. The hallway is empty. You continue forward and escape.")
|
|
print("You win!")
|
|
else:
|
|
print("Wrong choose.")
|
|
shadow_scene()
|
|
|
|
|
|
print("Welcome to the DES!")
|
|
start()
|