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.

53 lines
6.7 KiB
Python

2 years ago
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. ;(")