Merge branch 'fruitual' of https://git.xpub.nl/XPUB/text-adventures into fruitual

I hope this merge doesnt break anything :0
fruitual
log 1 year ago
commit bdb461be8f

@ -5,6 +5,7 @@ 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)
@ -33,9 +34,14 @@ def get() :
def displayMsg():
print("good morning, cult member! you slept in again. quick, you must make your bed and join the others in worship or the Leader may punish you.")
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?")
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
@ -44,29 +50,51 @@ displayMsg()
while True:
reply = input()
if(reply == "back"):
reply = history[-1]
print (history)
if "north" in reply :
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.")
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.")
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:
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.")
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.")
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)")
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:
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.")
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("""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 "back" in reply:
print()
elif "west" in reply:
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.")
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 :
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.")
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:
@ -76,6 +104,8 @@ while True:
else:
print (defreply())
goodbye_message = "you asked for help. weak. you lost."
goodbye_message = """you asked for help.
weak.
you lost."""
print(goodbye_message)

@ -0,0 +1,137 @@
import random
welcome_message = "Heeyyyyyyyy! Welcome to afterlife! As you can imagine you are dead. You are in a shinning white cube. You could say that is a waiting room. You can not see the limits of this room. You can not say even if it is a cube. I tell you so and you have to believe me. This is how it works here, otherwise go away and make your own game and rules! The light can be really harmful for your eyes, so you have to move on quickly, otherwise you are going to loose your sight! And believe me, it is really important as in the real west culture. So lets find out where you belong in the after life..."
room = [ "knife", "heavy rock", "magic carpet" , "stairs" ]
bag = ["plenty of emptiness"]
def look():
room_string = " , ".join(room)
message = f"You are in this white cube room. You cannot see the boundaries. All you can see is: { room_string }"
return message
def run():
messages = [ "Wheereeee???" , "gggdddbbbfkhthgvryhftghroyh!!! You broke your leg! You are trapped in eternity!" , "..............." , "---------" , "You constantly fall onto the wall" ]
message = random.choice(messages)
return message
def get(obj):
if obj in room:
room.remove(obj)
bag.append(obj)
message = f"You took { obj }."
else:
message = f"You will not find { obj } in here!"
return message
def defaultReply():
messages = [ "Hell is the other people, ha? I cannot see anybody else in here!" ,"Be pretty. Your girlfriends comrades are coming to save you. " "Sisyphus would laugh with you", "Stop playig stupid games and return to work. The hell is out there waiting for you" , "la la la la la la ", "If you had burn the rich, now you would enjoy a place in paradise.", "The queen here is not dead." ]
message = random.choice(messages)
return message
#------------------
#START OF THE GAME
print(welcome_message)
message = "... Are you going to do something? I am bored seeing you standing like this!"
print(message)
while True:
reply = input()
# reply = "get lamp"
command = reply.split()
# command = ["get", "lamp"]
#print(f"[DEBUG] Your command: { command }")
if len(command) >= 1:
action = command[0]
else:
action = ""
if len(command) >= 2:
obj = command[1]
else:
obj = ""
##print(f"[DEBUG] Your action: { action }")
#print(f"[DEBUG] Your object: { obj }")
if "look" in action or "walk" in action:
print(look())
elif "fly" in action:
print("You are flying inside the white cube.You are still entrapped, stupid! At least is fun...")
elif "jump" in action:
print("You just broke your leg! You are staying here forever seeing yourself in pain.")
elif "under" in action:
print("There is a trap door that leads to an elevator")
reply = input()
if "open" in reply:
print("the elevator door is open!")
reply = input()
if "get in" in reply:
print("You are now inside the elevator. There is a comfortable armchair and hot chocolate. There is a button under the cup.")
reply = input()
if "press" in reply:
print("Your favourite song is playing. The ride starts. The elevator will go up and down forever. At least your package includes unlimited chocolate. Children labour will haunt you forever. Byyeee")
else:
print("?")
else:
print("What are you planning to do?")
else:
print("Do something!")
elif "go down" in action:
print("wanna go down the stairs?")
reply = input()
if "yes" in reply:
print("The stairs lead you to a mirror room. What are you going to do apart from watching your pitty self,narcissus?")
else:
print(defaultReply())
if "break" in action:
print("How???!!! Do you have something in mind?")
if "rock" in reply:
print("YEEEEESSSSS!!! You did it! You are now in a beautiful glade of a pine forest. The birds are singing. You are approaching a cluster of pine trees to sit next to the log to get some rest. You deserve it... Suddenly... Ooooooohhh! This is not a forest. This is a wallpaper. There are no trees. The birds are not real. It is a hidden speaker-sound recorder. You can at least record yourself to make you some company. What would you say?")
else:
print("get a weapon")
else:
print(defaultReply())
elif "get" in action:
if obj:
print(get(obj))
else:
print("GET A F*****NG OBJECT")
elif "exit" in action:
break
elif "inventory" in action:
print(bag)
else:
print(defaultReply())
print("byyyyeeeeee")

@ -0,0 +1,53 @@
print("The Fruitual")
print("Welcome! This text adventure game is inspired by a short Bulgarian story, 'The Most Precious Fruit'. Which one is it, tho? Let's find out. Have fun!\n\n")
print("Once upon a time, there was a father and his son. The father, nearing the end of his life, wanted to pass on his entire inheritance to his son. However, he was unsure if his son was worthy of it. So, he devised one final test for him. He summoned his son and announced, 'I will give you a bag of gold. Travel the world and find the most valuable fruit. Then, you will receive my entire fortune.'")
# Start the game
answer = input("And so, the boy took the money and went out to look for the fruit. He spent two days and three and a half nights walking. He walked and walked. Finally, he reached a beautiful meadow.\n\nIn the distance, he noticed something exciting, a dark and mysterious 'temple'!\n\nHe decided to enter the temple and explore it.\n\nHe finds himself inside and sees two doors: one to the left and one to the right. Which door will he choose? (left/right)")
# LEFT DOOR - FRUITS VS ORIGINAL ENDING
if answer == "left":
answer = input("He enters the left door and finds a room with a strange altar. He sees a ritual book on the altar. He also notices a small key on the floor.\nWhat will he do? (read/take/ignore)")
if answer == "read":
answer = input("He opens the ritual book and learns about a powerful spell. He can use the spell to become the most knowledgeable person in the whole world, but its end is missing! (finish the spell/ignore)")
#--------OK if type "finish"
if answer == "finish the spell" or "finish":
answer = input("With weird fruits, we cast our spell,\nUnusual and exotic, magic they tell,\nIn this ritual, we honour the strange,\nMay their powers bring ______________.")
if answer == "change":
print("Nice! He finished the spell, harvesting the knowledge of the world and found a way out of the temple.\n\nWhen he went back home, his father asked him “What did you bring me? Why dont you have anything?”\n\nThe son replied, 'Its true that I come with empty hands, and I didnt spend the gold you gave me on fruits you can eat. I went to a temple with books and spells. They taught me everything about the world. The fruit I have cant be seen because it is in my heart and my mind.\n\nI believe this is the most precious fruit.'\n\nWhen the father heard these words, he said happily, 'You brought me the most precious fruit, son. Now I'm sure that you deserve the inheritance because there is no fruit more precious than those which give people knowledge.'")
#-----Keeps printing the spell???
else:
print("He ignores the spell and continues exploring the temple. He eventually becomes hopelessly lost.")
if answer == "take":
answer = input("He takes the key and uses it to open a secret door. He finds a treasure chest with two exotic fruits inside: a Durian and an Ackee fruit. Which one does he choose?(durian/ackee)")
if answer == "durian":
answer = input("He picks the Durian fruit. At first glance, it doesnt seem too bizarre. While its coarse, crinkled yellow-green skin may not look the most appealing, flavorwise its sweet pulp is a sumptuous blend of sweetness with vanilla undertones, sometimes with a little bitterness and a custard-like consistency that is soft and creamy.\n\nJuicy, ha? (eat it right away/bring home)")
#--------OK if type "eat" or "eat it". shows the correct answer.
if answer == "eat it" or "eat":
print("He began peeling the skin off the fruit, but as soon as he took a bite, he started to retch and vomit. The fruit's repulsive odour was so overpowering and foul that it ultimately killed him.")
#-----elif stopped showing both endings, but now "bring" is not working. Shows only the "eat" answer.
elif answer == "bring" or "bring home":
print("He brought the Durian fruit to his father and said, 'I believe the most precious fruit is the one that is hardest to find. So, I travelled beyond our lands and brought this Durian fruit for you.'\n\nThe father praised his son's efforts and began peeling the skin off the fruit. However, as soon as he took a bite, he started to retch and vomit.\n\nThe fruit's repulsive odour was so overpowering and foul that it ultimately killed him.")
elif answer == "ackee":
answer = input("He picked the Ackee fruit. He was mesmerised by its slightly wrinkled, red bell-pepper-like appearance with a cluster of shiny black orbs staring at you like some alien species straight out of a sci-fi movie.\n\nTasty, ha? (eat it right away/bring home)")
#--------OK if type "eat" or "eat it". shows the correct answer.
if answer == "eat it" or "eat":
print("He marvelled at its yellow pulp for a brief moment, and then he began to eat it. Unfortunately, the shiny black seeds, although alluring, are highly toxic for humans, and so he got poisoned.")
#-----elif stopped showing both endings, but now "bring" is not working. Shows only the "eat" answer.
elif answer == "bring" or "bring home":
print("He brought the Ackee fruit to his father and said, 'I believe the most precious fruit is the one that is hardest to find. So, I travelled beyond our lands and brought this Ackee fruit for you.'\n\nThe father praised his son's efforts and eagerly began to eat it. Unfortunately, the shiny black seeds, although alluring, are highly toxic and the father got poisoned and died.")
else:
print("He ignores the fruits and continues exploring the temple. He eventually becomes hopelessly lost.")
else:
print("He ignores the altar and continues exploring the temple. He eventually become hopelessly lost.")
# RIGHT DOOR - BREADCUBE PUZZLE - it's OK
if answer == "right":
answer = input("He enters the right door and finds a room with a large puzzle. He sees a clue on the wall:\n\nI am small but mighty,\nIn many soups, you'll find me,\nSquared in shape, yet round in taste,\nWhat am I?")
if answer == "breadcube":
print("He thinks about the clue and realises that the answer is 'Breadcube'! A secret door opens under him and he finds a way out of the temple. He goes back home and tells his father about the magic word he found. This word is capable of opening secret doors in a blink of an eye. How cool is it to be able to escape at any moment!")
else:
print("Wrong! He ignores the puzzle and continues exploring the temple. He eventually become hopelessly lost.")
#-----------EXIT GAME
#SyntaxError: 'break' outside loop
#elif answer == "exit" or "quit":
#break
#print("Sorry to see you go. ;(")
Loading…
Cancel
Save