Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Text Adventure
- #By Sam Morris
- import random
- import time
- hunger = 100
- sleep = 100
- health = 100
- thirst = 100
- weapons = "none"
- hpotion = 0
- food = 0
- drink = 0
- arrows = 0
- gender = input("What gender are you?\n")
- while (gender != "Male") and (gender != "Female"):
- print("Please use a capital letter")
- time.sleep(1)
- gender = input("What gender are you?\n")
- if gender == "Male":
- name = random.choice(["Myron","Damien","Julius","Rodolfo","Cristobal","Odell","Sam","Roberto","Guy"])
- land = random.choice(["Aroonshire","Grimsby","Lancaster","Anghot Thom","Larcbost","Nantwich","Northpass","Taedmorden","Murrayfield","Clarcton"])
- print("Your name is",name)
- time.sleep(1)
- print("You are an adventurer from",land)
- time.sleep(1)
- if gender == "Female":
- name = random.choice(["Alisha","Bea","Alda","Loria","Georgette","Salena","Tamie","Millicent","Lavona"])
- land = random.choice(["Aroonshire","Grimsby","Lancaster","Anghot Thom","Larcbost","Nantwich","Northpass","Taedmorden","Murrayfield","Clarcton"])
- print("Your name is",name)
- time.sleep(1)
- print("You are an adventurer from",land)
- time.sleep(1)
- if land == ("Lancaster") and ("Anghot Thom"):
- print("You are of noble heritage and inherit a large sum of gold")
- gold = random.randint(300,500)
- time.sleep(1)
- print("You have",gold ,"gold")
- elif land == ("Taedmorden") and ("Grimsby"):
- print("You have a very poor family and lack any belongings. You have little gold.")
- gold = random.randint(1,100)
- time.sleep(1)
- print("You have",gold ,"gold")
- else:
- print("You are a middle class citizen and have some gold")
- gold = random.randint(100,300)
- time.sleep(1)
- print("You have",gold ,"gold")
- print("Right now you have:\n",hunger ,"hunger\n",sleep ,"sleep\n",health ,"health\n",thirst ,"thirst")
- time.sleep(0.1)
- print("\n")
- time.sleep(0.1)
- print("\n")
- time.sleep(0.1)
- print("\n")
- time.sleep(0.1)
- print("\n")
- time.sleep(0.1)
- print("\n")
- time.sleep(0.1)
- print("\n")
- time.sleep(2.5)
- print("Are you ready!!!!")
- time.sleep(2.5)
- print("Lets go!!!!!!\n")
- print("Shall you explore your hometown",land ,"Or do you want to exit the gates?")
- a = input("Explore or Exit:\n")
- time.sleep(2)
- while (a != "Explore") and (a != "Exit"):
- print("Please use a capital letter")
- time.sleep(1)
- a = input("Explore or Exit:\n")
- time.sleep(2)
- if a == "Explore":
- print("You walk out of your place of residence and stroll down towards the stream towards the markets")
- time.sleep(2)
- print("You've been dragged behind the wall and a knife to your throat, the figure is demanding gold")
- time.sleep(2)
- print("Do you scream for help? Yes or No?")
- throat = input()
- time.sleep(1)
- while (throat != "Yes") and (throat != "No"):
- print("Please use a capital letter")
- time.sleep(1)
- print("Do you scream for help? Yes or No?")
- throat = input()
- time.sleep(1)
- if throat == "Yes":
- print("Arrrrgghhhhhh!!!!")
- time.sleep(1)
- print("The bandit gets angry and slits your throat")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("You say you will give the bandit your gold")
- time.sleep(1)
- if gold < 50:
- print("The bandit demands more gold but you have none")
- time.sleep(1)
- print("The bandit gets angry and slits your throat")
- time.sleep(2)
- print("GAME OVER")
- elif gold > 50:
- print("The bandit takes 50 gold from you")
- time.sleep(1)
- gold = gold - 50
- print("You now have",gold ,"gold")
- time.sleep(2)
- sleep = sleep - 25
- print("You begin to become tired from your encounter with the bandit.\n",sleep ,"sleep left")
- time.sleep(2)
- print("Do you continue towards the market or return to your place of residence?")
- ba = input("Market or Home?\n")
- time.sleep(1)
- while (ba != "Market") and (ba != "Home"):
- print("Please use a capital letter")
- time.sleep(1)
- aa = input("Market or Home?\n")
- time.sleep(1)
- if ba == "Home":
- print("You begin the walk back towards your place of residence.")
- time.sleep(2)
- sleep = sleep - 25
- print("Due to the walk home to your place of residence you begin to feel tired\n",sleep ,"sleep left")
- time.sleep(2)
- rest = input("Do you choose to sleep? Yes or No?\n")
- while (rest != "Yes") and (rest != "No"):
- print("Please use capital letters")
- time.sleep(1)
- rest = input("Do you choose to sleep? Yes or No?\n")
- time.sleep(2)
- if rest == "Yes":
- print(name ,"is sleeping")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- sleep = 100
- print("You now have\n",sleep ,"sleep")
- time.sleep(1)
- print("You now begin to search for belongings")
- time.sleep(1)
- elif rest == "No":
- print("You go to search your house for belongings")
- time.sleep(1)
- if land == ("Lancaster") and ("Anghot Thom"):
- print("Due to your noble family heritage you find many items that will help")
- time.sleep(2)
- print("You find your family heirloom: a one handed damascus steal sword and its sheath")
- weapon = "Sword "
- time.sleep(2)
- gold = gold + 200
- print("You also find 200 gold, you now have:\n",gold ,"gold")
- time.sleep(2)
- health = 150
- print("Finally you find your light armour. Therefore your maximun health increases to\n",health ,"health")
- armour = "Light Armour"
- time.sleep(2)
- elif land == ("Taedmorden") and ("Grimsby"):
- print("Due to your very poor status you only find a few items that will help you")
- time.sleep(2)
- print("You find a basic dagger which you can use to fight")
- weapon = "Dagger "
- time.sleep(2)
- gold = gold + 50
- print("You find some spare gold coins lying around your house\n",gold ,"gold")
- time.sleep(2)
- print("Finally you do not own any other clothes except your basic clothes you have on")
- clothes = "Clothes"
- time.sleep(2)
- else:
- print("Due to your middle class status you find some items that will help you")
- time.sleep(2)
- print("You find a basic sword which you father gave you")
- weapon = "Sword "
- time.sleep(2)
- gold = gold + 100
- print("You find an extra 100 gold in your house, you now have\n",gold ,"gold")
- time.sleep(2)
- print("Finally you find your light armour")
- armour = "Light Armour"
- time.sleep(2)
- print("After searching your house for your belongings you decide to head to the markets for some foods and extra items")
- time.sleep(4)
- print("At the markets you find many diffent stalls selling different items")
- time.sleep(2)
- print("Firstly, you are asked if you want any health potions")
- time.sleep(1)
- buya = input("Yes or No?\n")
- time.sleep(1)
- while (buya != "Yes") and (buya != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want any health potions? Yes or No?\n")
- time.sleep(2)
- if buya == "Yes":
- print("The vendor asks how many health potions do you want they cost 15 gold each and there are 5 maximun")
- if gold >= 15:
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- while (buyaa != 0) and (buyaa != 1) and (buyaa != 2) and (buyaa != 3) and (buyaa != 4) and (buyaa != 5):
- print("Please enter an intreger")
- time.sleep(2)
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- print("So you want",buyaa ,"health potions?")
- time.sleep(1)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- choice = input("So you want",buyaa ,"health potions? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy and health potions")
- time.sleep(2)
- else:
- price = buyaa * 15
- gold = gold - price
- hpotion = hpotion + buyaa
- print("You now have:\n",gold ,"gold\n",hpotion ,"health potions")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- else:
- print("You do not have enough gold to purchase health potions")
- elif buya == "No":
- print("You decide not to buy any health potions")
- time.sleep(2)
- print("You continue to the next stall where a vendor is selling a bow and some arrows")
- if gold >= 85:
- print("Then you are asked if you want to buy a bow")
- time.sleep(1)
- buyb = input("Yes or No?\n")
- time.sleep(1)
- while (buyb != "Yes") and (buyb != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyb = input("Do you want a bow? Yes or No?\n")
- time.sleep(2)
- if buyb == "Yes":
- print("The vendor asks are you sure you want to buy a bow? It costs 75 gold")
- time.sleep(2)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want to buy a bow? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy a bow")
- time.sleep(2)
- else:
- price = 75 * 1
- gold = gold - price
- weapons = weapons + "Bow"
- print("You have bought a bow you now have:",weapons ,"as your weapons\n",gold ,"gold left over")
- time.sleep(2)
- print("The vendor recommends you buy at least 10 arrows which will cost 1 gold each")
- time.sleep(2)
- print("So you buy 10 arrows")
- gold = gold - 10
- arrows = arrows + 10
- time.sleep(2)
- if gold >= 10:
- print("The vendor then asks if you want any more arrows")
- time.sleep(1)
- buyba = input("Yes or No?\n")
- time.sleep(2)
- while (buyba != "Yes") and (buyba != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyba = input("Do you want to buy any more arrows? Yes or No?\n")
- time.sleep(2)
- if buyba == "Yes":
- print("The vendor has 90 more arrows, you can only buy them in sets of 10")
- time.sleep(2)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- while (buybaa != 0) and (buybaa != 10) and (buybaa != 20) and (buybaa != 30) and (buybaa != 40) and (buybaa != 50) and (buybaa != 60) and (buybaa != 70) and (buybaa != 80) and (buybaa != 90):
- print("You have to buy arrows in sets of 10")
- time.sleep(1)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- price = buybaa * 1
- gold = gold - price
- arrows = arrows + buybaa
- print("You now have:\n",arrows ,"arrows\n",gold ,"gold left")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- elif buyb == "No":
- print("You decide not to buy a bow and arrows")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase a bow and some arrows")
- print("The next stall is selling armour")
- time.sleep(1)
- if gold > 75:
- buyc = input("Do you wish to purchase some armour? Yes or No?")
- time.sleep(2)
- while (buyc != "Yes") and (buyc != "No"):
- print("Please use capital letters")
- time.sleep(2)
- buyc = input("Do you wish to pruchase some armour? Yes or No?")
- time.sleep(2)
- if buyc == "Yes":
- if armour == "Light Armour":
- print("The vendor states that they sell:\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(3)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- while (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- if choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- print("The vendor states that they sell:\n Light Armour\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Light Armour increases your health by 50 and costs 75 gold\n Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(4)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- while (choice != "Light Armour") and (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- if choice == "Light Armour":
- gold = gold - 75
- armour = "Light Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif buyc == "No":
- print("You decide not to buy armour")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase any armour")
- time.sleep(2)
- elif ba == "Market":
- print("At the markets you find many diffent stalls selling different items")
- time.sleep(2)
- print("Firstly, you are asked if you want any health potions")
- time.sleep(1)
- buya = input("Yes or No?\n")
- time.sleep(1)
- while (buya != "Yes") and (buya != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want any health potions? Yes or No?\n")
- time.sleep(2)
- if buya == "Yes":
- print("The vendor asks how many health potions do you want they cost 15 gold each and there are 5 maximun")
- if gold >= 15:
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- while (buyaa != 0) and (buyaa != 1) and (buyaa != 2) and (buyaa != 3) and (buyaa != 4) and (buyaa != 5):
- print("Please enter an intreger")
- time.sleep(2)
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- print("So you want",buyaa ,"health potions?")
- time.sleep(1)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- choice = input("So you want",buyaa ,"health potions? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy and health potions")
- time.sleep(2)
- else:
- price = buyaa * 15
- gold = gold - price
- hpotion = hpotion + buyaa
- print("You now have:\n",gold ,"gold\n",hpotion ,"health potions")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- else:
- print("You do not have enough gold to purchase health potions")
- elif buya == "No":
- print("You decide not to buy any health potions")
- time.sleep(2)
- print("You continue to the next stall where a vendor is selling a bow and some arrows")
- if gold >= 85:
- print("Then you are asked if you want to buy a bow")
- time.sleep(1)
- buyb = input("Yes or No?\n")
- time.sleep(1)
- while (buyb != "Yes") and (buyb != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyb = input("Do you want a bow? Yes or No?\n")
- time.sleep(2)
- if buyb == "Yes":
- print("The vendor asks are you sure you want to buy a bow? It costs 75 gold")
- time.sleep(2)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want to buy a bow? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy a bow")
- time.sleep(2)
- else:
- price = 75 * 1
- gold = gold - price
- weapons = weapons + "Bow"
- print("You have bought a bow you now have:",weapons ,"as your weapons\n",gold ,"gold left over")
- time.sleep(2)
- print("The vendor recommends you buy at least 10 arrows which will cost 1 gold each")
- time.sleep(2)
- print("So you buy 10 arrows")
- gold = gold - 10
- arrows = arrows + 10
- time.sleep(2)
- if gold >= 10:
- print("The vendor then asks if you want any more arrows")
- time.sleep(1)
- buyba = input("Yes or No?\n")
- time.sleep(2)
- while (buyba != "Yes") and (buyba != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyba = input("Do you want to buy any more arrows? Yes or No?\n")
- time.sleep(2)
- if buyba == "Yes":
- print("The vendor has 90 more arrows, you can only buy them in sets of 10")
- time.sleep(2)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- while (buybaa != 0) and (buybaa != 10) and (buybaa != 20) and (buybaa != 30) and (buybaa != 40) and (buybaa != 50) and (buybaa != 60) and (buybaa != 70) and (buybaa != 80) and (buybaa != 90):
- print("You have to buy arrows in sets of 10")
- time.sleep(1)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- price = buybaa * 1
- gold = gold - price
- arrows = arrows + buybaa
- print("You now have:\n",arrows ,"arrows\n",gold ,"gold left")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- elif buyb == "No":
- print("You decide not to buy a bow and arrows")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase a bow and some arrows")
- print("The next stall is selling armour")
- time.sleep(1)
- if gold > 75:
- buyc = input("Do you wish to purchase some armour? Yes or No?")
- time.sleep(2)
- while (buyc != "Yes") and (buyc != "No"):
- print("Please use capital letters")
- time.sleep(2)
- buyc = input("Do you wish to pruchase some armour? Yes or No?")
- time.sleep(2)
- if buyc == "Yes":
- if armour == "Light Armour":
- print("The vendor states that they sell:\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(3)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- while (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- if choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- print("The vendor states that they sell:\n Light Armour\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Light Armour increases your health by 50 and costs 75 gold\n Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(4)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- while (choice != "Light Armour") and (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- if choice == "Light Armour":
- gold = gold - 75
- armour = "Light Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif buyc == "No":
- print("You decide not to buy armour")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase any armour")
- time.sleep(2)
- else:
- print("The bandit takes all your gold")
- time.sleep(1)
- gold = 0
- print("You now have",gold ,"gold")
- elif a == "Exit":
- print("You start walking towards the gate, then realise you will need some items if you are exiting the safety of",land)
- time.sleep(3)
- print("Do you see if you have any items at your home or head towards the market?")
- ba = input("Home or Market?\n")
- while (ba != "Home") and (ba != "Market"):
- print("Please use a capital letter")
- time.sleep(1)
- aa = input("Home or Market?\n")
- time.sleep(1)
- if ba == "Home":
- print("You begin the walk back towards your place of residence.")
- time.sleep(2)
- sleep = sleep - 25
- print("Due to the walk home to your place of residence you begin to feel tired\n",sleep ,"sleep left")
- time.sleep(2)
- rest = input("Do you choose to sleep? Yes or No?\n")
- while (rest != "Yes") and (rest != "No"):
- print("Please use capital letters")
- time.sleep(1)
- rest = input("Do you choose to sleep? Yes or No?\n")
- time.sleep(2)
- if rest == "Yes":
- print(name ,"is sleeping")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- print("ZZZzzzzz...")
- time.sleep(1)
- sleep = 100
- print("You now have\n",sleep ,"sleep")
- time.sleep(1)
- print("You now begin to search for belongings")
- time.sleep(1)
- elif rest == "No":
- print("You go to search your house for belongings")
- time.sleep(1)
- if land == ("Lancaster") and ("Anghot Thom"):
- print("Due to your noble family heritage you find many items that will help")
- time.sleep(2)
- print("You find your family heirloom: a one handed damascus steal sword and its sheath")
- weapon = "Sword "
- time.sleep(2)
- gold = gold + 200
- print("You also find 200 gold, you now have:\n",gold ,"gold")
- time.sleep(2)
- health = 150
- print("Finally you find your light armour. Therefore your maximun health increases to\n",health ,"health")
- armour = "Light Armour"
- time.sleep(2)
- elif land == ("Taedmorden") and ("Grimsby"):
- print("Due to your very poor status you only find a few items that will help you")
- time.sleep(2)
- print("You find a basic dagger which you can use to fight")
- weapon = "Dagger "
- time.sleep(2)
- gold = gold + 50
- print("You find some spare gold coins lying around your house\n",gold ,"gold")
- time.sleep(2)
- print("Finally you do not own any other clothes except your basic clothes you have on")
- clothes = "Clothes"
- time.sleep(2)
- else:
- print("Due to your middle class status you find some items that will help you")
- time.sleep(2)
- print("You find a basic sword which you father gave you")
- weapon = "Sword "
- time.sleep(2)
- gold = gold + 100
- print("You find an extra 100 gold in your house, you now have\n",gold ,"gold")
- time.sleep(2)
- print("Finally you find your light armour")
- armour = "Light Armour"
- time.sleep(2)
- print("After searching your house for your belongings you decide to head to the markets for some foods and extra items")
- time.sleep(4)
- print("At the markets you find many diffent stalls selling different items")
- time.sleep(2)
- print("Firstly, you are asked if you want any health potions")
- time.sleep(1)
- buya = input("Yes or No?\n")
- time.sleep(1)
- while (buya != "Yes") and (buya != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want any health potions? Yes or No?\n")
- time.sleep(2)
- if buya == "Yes":
- print("The vendor asks how many health potions do you want they cost 15 gold each and there are 5 maximun")
- if gold >= 15:
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- while (buyaa != 0) and (buyaa != 1) and (buyaa != 2) and (buyaa != 3) and (buyaa != 4) and (buyaa != 5):
- print("Please enter an intreger")
- time.sleep(2)
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- print("So you want",buyaa ,"health potions?")
- time.sleep(1)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- choice = input("So you want",buyaa ,"health potions? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy and health potions")
- time.sleep(2)
- else:
- price = buyaa * 15
- gold = gold - price
- hpotion = hpotion + buyaa
- print("You now have:\n",gold ,"gold\n",hpotion ,"health potions")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- else:
- print("You do not have enough gold to purchase health potions")
- elif buya == "No":
- print("You decide not to buy any health potions")
- time.sleep(2)
- print("You continue to the next stall where a vendor is selling a bow and some arrows")
- if gold >= 85:
- print("Then you are asked if you want to buy a bow")
- time.sleep(1)
- buyb = input("Yes or No?\n")
- time.sleep(1)
- while (buyb != "Yes") and (buyb != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyb = input("Do you want a bow? Yes or No?\n")
- time.sleep(2)
- if buyb == "Yes":
- print("The vendor asks are you sure you want to buy a bow? It costs 75 gold")
- time.sleep(2)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want to buy a bow? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy a bow")
- time.sleep(2)
- else:
- price = 75 * 1
- gold = gold - price
- weapons = weapons + "Bow"
- print("You have bought a bow you now have:",weapons ,"as your weapons\n",gold ,"gold left over")
- time.sleep(2)
- print("The vendor recommends you buy at least 10 arrows which will cost 1 gold each")
- time.sleep(2)
- print("So you buy 10 arrows")
- gold = gold - 10
- arrows = arrows + 10
- time.sleep(2)
- if gold >= 10:
- print("The vendor then asks if you want any more arrows")
- time.sleep(1)
- buyba = input("Yes or No?\n")
- time.sleep(2)
- while (buyba != "Yes") and (buyba != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyba = input("Do you want to buy any more arrows? Yes or No?\n")
- time.sleep(2)
- if buyba == "Yes":
- print("The vendor has 90 more arrows, you can only buy them in sets of 10")
- time.sleep(2)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- while (buybaa != 0) and (buybaa != 10) and (buybaa != 20) and (buybaa != 30) and (buybaa != 40) and (buybaa != 50) and (buybaa != 60) and (buybaa != 70) and (buybaa != 80) and (buybaa != 90):
- print("You have to buy arrows in sets of 10")
- time.sleep(1)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- price = buybaa * 1
- gold = gold - price
- arrows = arrows + buybaa
- print("You now have:\n",arrows ,"arrows\n",gold ,"gold left")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- elif buyb == "No":
- print("You decide not to buy a bow and arrows")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase a bow and some arrows")
- print("The next stall is selling armour")
- time.sleep(1)
- if gold > 75:
- buyc = input("Do you wish to purchase some armour? Yes or No?")
- time.sleep(2)
- while (buyc != "Yes") and (buyc != "No"):
- print("Please use capital letters")
- time.sleep(2)
- buyc = input("Do you wish to pruchase some armour? Yes or No?")
- time.sleep(2)
- if buyc == "Yes":
- if armour == "Light Armour":
- print("The vendor states that they sell:\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(3)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- while (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- if choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- print("The vendor states that they sell:\n Light Armour\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Light Armour increases your health by 50 and costs 75 gold\n Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(4)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- while (choice != "Light Armour") and (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- if choice == "Light Armour":
- gold = gold - 75
- armour = "Light Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif buyc == "No":
- print("You decide not to buy armour")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase any armour")
- time.sleep(2)
- elif ba == "Market":
- print("At the markets you find many diffent stalls selling different items")
- time.sleep(2)
- print("Firstly, you are asked if you want any health potions")
- time.sleep(1)
- buya = input("Yes or No?\n")
- time.sleep(1)
- while (buya != "Yes") and (buya != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want any health potions? Yes or No?\n")
- time.sleep(2)
- if buya == "Yes":
- print("The vendor asks how many health potions do you want they cost 15 gold each and there are 5 maximun")
- if gold >= 15:
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- while (buyaa != 0) and (buyaa != 1) and (buyaa != 2) and (buyaa != 3) and (buyaa != 4) and (buyaa != 5):
- print("Please enter an intreger")
- time.sleep(2)
- buyaa = int(input("How many health potins do you want?\n"))
- time.sleep(1)
- print("So you want",buyaa ,"health potions?")
- time.sleep(1)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- choice = input("So you want",buyaa ,"health potions? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy and health potions")
- time.sleep(2)
- else:
- price = buyaa * 15
- gold = gold - price
- hpotion = hpotion + buyaa
- print("You now have:\n",gold ,"gold\n",hpotion ,"health potions")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- else:
- print("You do not have enough gold to purchase health potions")
- elif buya == "No":
- print("You decide not to buy any health potions")
- time.sleep(2)
- print("You continue to the next stall where a vendor is selling a bow and some arrows")
- if gold >= 85:
- print("Then you are asked if you want to buy a bow")
- time.sleep(1)
- buyb = input("Yes or No?\n")
- time.sleep(1)
- while (buyb != "Yes") and (buyb != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyb = input("Do you want a bow? Yes or No?\n")
- time.sleep(2)
- if buyb == "Yes":
- print("The vendor asks are you sure you want to buy a bow? It costs 75 gold")
- time.sleep(2)
- choice = input("Yes or No?\n")
- time.sleep(2)
- while (choice != "Yes") and (choice != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buya = input("Do you want to buy a bow? Yes or No?\n")
- time.sleep(2)
- if choice == "No":
- print("You decide not to buy a bow")
- time.sleep(2)
- else:
- price = 75 * 1
- gold = gold - price
- weapons = weapons + "Bow"
- print("You have bought a bow you now have:",weapons ,"as your weapons\n",gold ,"gold left over")
- time.sleep(2)
- print("The vendor recommends you buy at least 10 arrows which will cost 1 gold each")
- time.sleep(2)
- print("So you buy 10 arrows")
- gold = gold - 10
- arrows = arrows + 10
- time.sleep(2)
- if gold >= 10:
- print("The vendor then asks if you want any more arrows")
- time.sleep(1)
- buyba = input("Yes or No?\n")
- time.sleep(2)
- while (buyba != "Yes") and (buyba != "No"):
- print("Please use capital letters")
- time.sleep(1)
- buyba = input("Do you want to buy any more arrows? Yes or No?\n")
- time.sleep(2)
- if buyba == "Yes":
- print("The vendor has 90 more arrows, you can only buy them in sets of 10")
- time.sleep(2)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- while (buybaa != 0) and (buybaa != 10) and (buybaa != 20) and (buybaa != 30) and (buybaa != 40) and (buybaa != 50) and (buybaa != 60) and (buybaa != 70) and (buybaa != 80) and (buybaa != 90):
- print("You have to buy arrows in sets of 10")
- time.sleep(1)
- buybaa = int(input("How many arrows do you want?\n"))
- time.sleep(2)
- price = buybaa * 1
- gold = gold - price
- arrows = arrows + buybaa
- print("You now have:\n",arrows ,"arrows\n",gold ,"gold left")
- time.sleep(2)
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(1)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(1)
- elif buyb == "No":
- print("You decide not to buy a bow and arrows")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase a bow and some arrows")
- print("The next stall is selling armour")
- time.sleep(1)
- if gold > 75:
- buyc = input("Do you wish to purchase some armour? Yes or No?")
- time.sleep(2)
- while (buyc != "Yes") and (buyc != "No"):
- print("Please use capital letters")
- time.sleep(2)
- buyc = input("Do you wish to pruchase some armour? Yes or No?")
- time.sleep(2)
- if buyc == "Yes":
- if armour == "Light Armour":
- print("The vendor states that they sell:\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(3)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- while (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Heavy Armour or Plate Armour")
- time.sleep(2)
- if choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- print("The vendor states that they sell:\n Light Armour\n Heavy Armour\n Plate Armour")
- time.sleep(2)
- print("Light Armour increases your health by 50 and costs 75 gold\n Heavy armour increases you health by 100 and costs 125 gold\n Plate Armour increses your health by 150 and costs 200 gold")
- time.sleep(4)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- while (choice != "Light Armour") and (choice != "Heavy Armour") and (choice != "Plate Armour"):
- print("Please use capital letters")
- time.sleep(2)
- choice = input("Do you want: Light Armour, Heavy Armour or Plate Armour\n")
- time.sleep(2)
- if choice == "Light Armour":
- gold = gold - 75
- armour = "Light Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif choice == "Heavy Armour":
- gold = gold - 125
- armour = "Heavy Armour"
- health = 200
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- else:
- gold = gold - 200
- armour = "Plate Armour"
- health = 250
- print("You now have:\n",armour ,"\n",health ,"health\n",gold ,"gold left")
- if gold < 0:
- print("You can not have negative gold")
- time.sleep(2)
- print("GAME OVER")
- else:
- print("The vendor thanks you for shopping")
- time.sleep(2)
- elif buyc == "No":
- print("You decide not to buy armour")
- time.sleep(2)
- else:
- print("You do not have enough gold to purchase any armour")
- time.sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement