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.
4.3 KiB
4.3 KiB
In [ ]:
import time import sys a = 0.2 b = 2 def inventoryWipe(): file = open("inventory.txt", "w") file.close() inventoryWipe() print(" _________") print(" / ======= .") print(" / __________. ") print(" | ___________ |") print(" | | words | |") print(" | | for | |") print(" | |_the_____| |________________________") print(" \=____________/ future )") print(" / =========== \ /") print("/ ::::::::::::: \ =D-'") print("(________________)") s = '"Hello Traveler"' for character in s: sys.stdout.write(character) sys.stdout.flush() time.sleep(a) time.sleep(b) print() print('Enter your name:') name = input() count = 0 def select_element(): global count print('Hello, ' + name + ". Welcome to ***Earthrise***. Are you ready to set sail to the land of the future? If yes, pick one of these elements to start: water, fire, wind") time.sleep(b) while True: print('Type your choice below, ' + name + '!') element = input() if element.lower().strip() == "water": print('Great work, ' + name + ', Captain Atata picked you up with his ferry! Where should we go from here? (north/west)') count = count + 1 print(count) elif element.lower().strip() == "fire": print('Great work, ' + name + ', You find yourself at the foot of an active volcano. Where do we go from here? (north/west)') count = count + 1 elif element.lower().strip() == "wind": print('You lift off the earth into the skies now, ' + name + ', you are floating. Where do we go from here? (north/west)') count = count + 1 else: print("this spell has no power here.") direction = input() if direction.lower().strip() == "west" and count == 1: print("You are walking along a " + element + " stream until you see a big book.") elif direction.lower().strip() == "north": print("You find yourself in a dense forest. By your feet you see a magic elixier and a whistle. You only have space for one, which one do you pick? (elixier/whistle)") count = count + 1 else: print("this spell has no power here.") object = input() if object.lower().strip() == "elixier" and count == 2: print("You don't understand what to use it for yet, so you keep on walking.") elif direction.lower().strip() == "whistle": print("You try to make sounds with it, until you finally suceed. You hear the whistle sound being echoed from far. (follow)") else: print("this spell has no power here.") select_element()
In [ ]:
In [ ]:
In [ ]: