print("A beast appeared")
print("Tour health is 350")
print("The beast's health is 500")
class Hero:
hero_health = 350
hero_strength = 45
beast_health = 500
beast_damage = 20
attack = ""
while beast_health > 0:
print("Ready to attack")
attack = input("(A)ttack!!!: ")
if attack == 'A':
beast_health = beast_health - hero_strength
print("The beast is at",beast_health)
else:
print('Invalid')
import random
for x in range(1, 5):
beast_attack = random.randint(1)
if beast_attack > 1:
hero_health = hero_health - beast_damage
print("Your at",hero_health)
else:
print("The beast missed")
if hero_health < 1:
print("Game Over")
elif beast_health < 1:
print("Congrats, You win!!!")
#This code will let you choose to attack or not, and the beast attacks back based on a random number generator.
#I've got the victory done, but the code continues after you die, if you can figure out how to stop the program after you die let me know.