Code Nico
Code Nico
import time
def win():
print("You Saved the Village! They thank you and make you the town leader as a
reward!")
def gameOver():
if retry == "yes":
game()
else:
quit()
def game():
gold = 50
character_hp = 125
weapon_damage = 15
monster_damage = 25
monster_payout = 80
weapons = ["fists"]
MONSTERS = {
"goblin": 55,
"zombie": 80,
"wolf": 105,
"dragon": 150
}
WEAPONS_STORE = {
"sword": 140,
"axe": 120,
"club": 75,
"bat": 45
if store == "yes":
print("\nWEAPON\t\tCOST\n")
gold -= WEAPONS_STORE[weapon_purchase]
weapons.append(weapon_purchase)
if store == "no":
print("\nMONSTERS\tHEALTH\t\n")
if monchoice in MONSTERS:
else:
print(weapon, "\n")
if weapuse in weapons:
print("\nWise choice", name, "You will use the", weapuse, "against the",
monchoice)
else:
print("\nWise choice", name, "You will use the", weapuse, "against the",
monchoice)
rand = random.randint(0, 7)
mdmg = monster_damage
time.sleep(1.5)
character_hp -= mdmg
if character_hp <= 0:
gameOver()
time.sleep(1.5)
MONSTERS[monchoice] -= pdmg
time.sleep(1.5)
print("damage!")
mdmg = monster_damage
time.sleep(1.5)
MONSTERS[monchoice] -= pdmg
time.sleep(1.5)
mdmg = monster_damage
time.sleep(1.5)
character_hp -= mdmg
if character_hp <= 0:
gameOver()
MONSTERS[monchoice] -= pdmg
time.sleep(1.5)
print("damage!")
mdmg = monster_damage
time.sleep(1.5)
character_hp -= mdmg
if character_hp <= 0:
gameOver()
time.sleep(1.5)
MONSTERS[monchoice] -= pdmg
time.sleep(1.5)
else:
print("\