You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
4.0 KiB
Python

# ------------------------
from random import choice
import time
#variables
room = ["a knife" , "a piece of bread" , "a bottle of water"]
bag = ["a prayer book"]
history = []
def here() :
room_string = ", ".join(room)
message = f"you are already there. Next to you is: { room_string }"
return message
#function ending
def defreply() :
messages = [
"woopsie, that means nothing.",
"no, try again with a different command.",
"are you serious?"
]
message = choice(messages)
return message
def winreply() :
print("despite the pain, you look up to the sky and think, I am free.")
def get() :
bag.append("a knife")
room.remove("a knife")
message = "you took a knife"
return message
def displayMsg():
print("""°❈°good morning, cult member!°❈°""")
print("""you slept in again.
quick, you must make your bed and join the others in worship or the Leader may punish you.""")
time.sleep(3)
print ("""good, you have made your bed.
you look around the communal bedroom, where two rows of neatly made single beds remind you
that everybody else rose a long time ago.
there are four doors, facing each cardinal direction. which direction do you wish to go?""")
# ------------------------
# START OF GAME
displayMsg()
while True:
reply = input()
if(reply == "back"):
reply = history[-1]
print (history)
if "north" in reply :
history.append("north")
print ("""you passed through the door north of the bedroom. you find yourself in the kitchen.
it's a spacious room, full of shiny metal and sharp sounds.
the cult member on kitchen duty for breakfast turns around to look at you, startled.""")
time.sleep(2)
print ("""cult member 20!' he exclaims.
'you are late for worship, what are you doing here? quick, hurry back'.
he nods his head towards the door facing behind you.""")
elif "east" in reply:
history.append("east")
print("""through the east-facing door you find yourself in the dining hall, where someone has started to set the table.
the sun is shining through the open window, reminding you once again of how late you are.""")
time.sleep(2)
print("""seeing the window to the east gives you a weird feeling.
it faces a tall oak tree, whose branches seem so close you could grab them.""")
time.sleep(3)
print("""would you like to go north-east through the winodw or back, to the leader?
(please type either window or back)""")
elif "window" in reply:
history.append("window")
print("""your heart starts beating faster as you make your way to the open window.
you climb the oak tree, your hands are slippery from sweat.""")
time.sleep(2)
print("""you reach for a lower branch, as your breath quickens from fear.
your hand misses,suddendly you fall all the way to the ground.""")
print(winreply())
break
elif "west" in reply:
history.append("west")
print("""you follow the faint sound of chanting throgh the west door,down a spiral staircase.
you reach an enormous cave, where a man is sitting on a big chair, facing what looks like a sea of small figures dressed in white.
The man looks up at you, he looks quite angry. you join the others in prayer. it's just another day.""")
break
elif "south" in reply :
history.append("south")
print ("""the south door leads to a cold room without windows.
there is a cage in the middle of the room, but the door to it was left empty.
with a shudder you think that a person could fit in that cage. you go back.""")
elif "here" in reply:
print (here())
elif "get" in reply:
print(get())
elif "help" in reply:
break
else:
print (defreply())
goodbye_message = """you asked for help.
weak.
you lost."""
print(goodbye_message)