from time import * from random import * import os,sys,random import time 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 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 setup(): global name global HP global MP name = input("What is your name warrior? ") HP = randint(5,20) MP = randint(5,20) def villager(): global npcname global response responses = ["Howdy", "Have you came from the distant tilted towers?", "7grandad wouldn't like that you are here...", "Have you seen my cat? his name is Jerma!"] npcnamechoice = ["Hayden", "Fish", "Joe Swanson", "Giorno giovanna"] random.shuffle(npcnamechoice) npcname = npcnamechoice[0] print ("\n["+npcname+":] Hello, my name is "+npcname+", Would you like to talk to me?\n") random.shuffle(responses) print ("Press y to talk to the villager") if input() == "y": print ("["+npcname+":] " +responses[0]) else: print("["+npcname+":] Goodbye") def enemy(): global enemyHP global enemyMP global enemyname enemyHP = randint(5,20) enemyMP = randint(5,20) enemyname = "7Grandad" print ("\nSuddenly you hear retro voice, and from the shadows you see "+enemyname+" staring straight at you....") print ("Your enemy has " + " " + str(enemyHP) + " " + "Health Points") print ("Your enemy has " + " " + str(enemyMP) + " " + "Magic Points") clear_screen() title() castle() setup() global name global HP global MP global move global enemyHP print ("Welcome to just below middle earth!, " + name) sleep(2) print ("\nYour health is" + " " + str(HP)) print ("Your magic skill is" + " " + str(MP)) print ("Would you like to venture outside of the land of tilted towers and into a unknown direction? Press y then enter to continue") if input() == "y": print ("You are in your box, with roaring sounds of gunshots and building, above the fire you can see your sword and shield") print ("Would you like to take your pickaxe and chug chug? Press y then enter to continue") if input() == "y": weapons = [] weapons.append("pickaxe") weapons.append("chug chug") print ("You are now carrying your" + " " + weapons[0] + " " + "and your" + " " + weapons[1]) print ("Armed with your " + weapons[0] + " " + "and " + weapons[1] + " you swing open the door to your box and see lootlake gleaming in the sunshine.") else: print ("You choose not to take your weapons") print ("Armed with your sense of humour, You swing open the door to see a world of opportunity awaiting you.") else: print ("You stay in your box, sat in your favourite chair watching family guy clips. just below middle Earth no longer has a hero.") print ("Game Over") sys.exit(0) print ("In the distance to the north you can see loot lake, to the east you can see salty springs and to the west snobby shores.") print ("\n") north() east() west() move = input("Where would you like to go? ") if move == 'n': print ("\nYou move to the north, you see the beatifull shallow lake.") print ("A person is in your path and greets you") elif move == 'e': print ("\nYou walk to the chaotic town which lies to the east of your home.") print ("A person is in your path and greets you") elif move == 'w': print ("\nYou walk through the mountain range looking at the neighboring indoor football field building") print ("A person is in your path and greets you\n") villager() enemy() sleep(3) fight = input("Do you wish to commence this fight?" ) if fight == "y": while HP > 0: hit = randint(0,5) print ("You swing your pickae and cause " + str(hit) + " of damage") time.sleep(1) enemyHP = enemyHP - hit print (enemyHP) time.sleep(1) enemyhit = randint(0,5) print ("7Grandad throws clingers at you and causes " + str(enemyhit) + " of damage") HP = HP - enemyhit print (HP) time.sleep(1) else: print ("You turn and run away from 7grandad and make your escape to a launch pad") escape = input("In a hurry you quickly started to think of should you return to tilted? press y + enter") if escape == "y" : print("You head back to your box in tilted, as you look into the distance you notice the menacing 7grandad making his way to your box slowly....") else : print("You decide to head back down to 7grandad where he threw a car at you knocking you back to the ground sending you back to lobby....") print ("This is where this template ends, this is now YOUR world, build your adventure and share it with the world") print (" _ _ _") print (" /_\ __| |_ _____ _ __ | |_ _ _ _ __ ___") print (" //_\\ / _` \ \ / / _ \ '_ \| __| | | | '__/ _ \ ") print ("/ _ \ (_| |\ V / __/ | | | |_| |_| | | | __/") print ("\_/ \_/\__,_| \_/ \___|_| |_|\__|\__,_|_| \___|") print (" _ _") print (" __ ___ ____ _(_) |_ ___") print (" / _` \ \ /\ / / _` | | __/ __|") print ("| (_| |\ V V / (_| | | |_\__ \ ") print (" \__,_| \_/\_/ \__,_|_|\__|___/") print (" _ _ ___ _ _") print ("| | | |/ _ \| | | |") print ("| |_| | (_) | |_| |") print (" \__, |\___/ \__,_|") print (" |___/")