from time import * from random import * import os,sys, random def clear_screen(): os.system('cls' if os.name=='nt' else 'clear') def title(): print (" __ _ __ ") print (" / / ___ __ _ ___ _ __ __| | ___ / _| /\ /\___ _ __ ___ ___ ___ ") print (" / / / _ \/ _` |/ _ \ '_ \ / _` | / _ \| |_ / /_/ / _ \ '__/ _ \ / _ \/ __|") print ("/ /__| __/ (_| | __/ | | | (_| | | (_) | _| / __ / __/ | | (_) | __/\__ \ ") print ("\____/\___|\__, |\___|_| |_|\__,_| \___/|_| \/ /_/ \___|_| \___/ \___||___/") def castle(): print ("* |>>> + ") print ("+ * | * +") print (" |>>> _ _|_ _ * |>>> ") print (" * | |;| |;| |;| | *") print (" + _ _|_ _ \\. . / _ _|_ _ +") print (" * |;|_|;|_|;| \\: + / |;|_|;|_|;|") print (" \\.. / ||:+++. | \\. . / *") print (" + \\. , / ||:+++ | \\: . /") print (" ||:+ |_ _ ||_ . _ | _ _||:+ | *") print (" * ||+++.|||_|;|_|;|_|;|_|;|_|;||+++ | +") print (" ||+++ ||. . . . ||+++.| *") print ("+ * ||: . ||:. . . . , ||: | *") print (" * ||: ||: , + . ||: , | +") print (" * ||: ||:. +++++ . ||: | *") print (" + ||: ||. +++++++ . ||: . | +") print (" + ||: . ||: , +++++++ . . ||: | +") print (" ||: . ||: , +++++++ . . ||: | *") print (" ||: . ||: , +++++++ . . ||: |") def setup(): global name global HP global MP name = input("What is your name warrior? ") HP = random.randint(5,20) MP = random.randint(5,20) def north(): print ("To go north press n then enter") def east(): print ("To go east press e then enter") def south(): print ("to go south press s then enter") def west(): print ("To go west press w then enter") def display(): print( HP ) print( MP ) def space(): print( " " ) def end(): print ("You stay at home, sat in your favourite chair watching the fire grow colder. Middle Earth no longer has a hero.") space() print ("Game Over") #------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------ setup() print( "Would you like to display your HP and MP stats? (y/n)") if input() == "y": display() print ("Would you like to venture out into the land? Press y then enter to continue") if input() == "y": print ("You are in your home, with a roaring fireplace in front of you, above the fire you can see your sword and shield") print ("Would you like to take your sword and shield? Press y then enter to continue") if input () == "y": sword = "Basic sword" shield = "Basic shield" space() print("Armed with your {} and {} you swing open the door to your home and see a green valley gleaming in the sunshine.".format(sword, shield)) else: end()