Natasha Cooks dot DEV
#task1
wizard = "Wizard"
elf = "Elf"
human = "NatashaCooks"
wizard_hp, elf_hp, human_hp = 70, 100, 150
wizard_dmg, elf_dmg, human_dmg = 150, 100, 20
dragon_hp = 300
dragon_dmg = 50
#tasks 2,3, 4
while True:
print("1 - Wizard\n")
print("2 - Elf\n")
print("3 - Human\n")
option = input("Pick Your Player : ")
if option == "1":
print("You Chose 'Wizard'")
character = wizard
myhp = wizard_hp
mydmg = wizard_dmg
drscore = dragon_hp - wizard_dmg
wzscore = wizard_hp - dragon_dmg
print("My HP is : ", myhp)
print("My damage is : ", mydmg)
print("\n")
print("The Wizard damaged the dragon!\n")
print("The Dragon's hitpoints are", drscore)
print("\n")
print("The Dragon strikes back at the wizard!\n")
print("The wizard's hitpoints are", wzscore)
print("\n")
print("The Wizard damaged the dragon!\n")
drscore = drscore - wizard_dmg
print("The Dragon's hitpoints are", drscore)
if drscore == 0:
print("Dragon DEFEATED")
else:
print("Wizard Defeated")
elif option == "2":
print("You Chose 'Elf'")
character = elf
myhp = elf_hp
mydmg = elf_dmg
print("My HP is : ", myhp)
print("My damage is : ", mydmg)
print("Dragon HP is :", dragon_hp)
print("\n")
drscore = dragon_hp - elf_dmg
elfscore = elf_hp - dragon_dmg
print("The Elf damaged the dragon!\n")
print("The Dragon's hitpoints are", drscore)
print("\n")
print("The Dragon strikes back at the elf!\n")
print("The elf's hitpoints are", elfscore)
print("\n")
print("The Elf damaged the dragon!\n")
drscore = drscore - elf_dmg
elfscore = elfscore - dragon_dmg
print("The Dragon's hitpoints are", drscore)
print("The Dragon strikes back at the elf!\n")
print("The elf's hitpoints are", elfscore)
if drscore == 0:
print("Dragon DEFEATED")
else:
print("ELF Defeated")
elif option == "3":
print("You Chose 'Human'")
character = human
myhp = human_hp
mydmg = human_dmg
drscore = dragon_hp - human_dmg
hmnscore = human_hp - dragon_dmg
print("My HP is : ", myhp)
print("My damage is : ", mydmg)
print("Dragon HP is :", dragon_hp)
print("\n")
print("The Human damaged the dragon!\n")
print("The Dragon's hitpoints are", drscore)
print("\n")
print("The Dragon strikes back at the Human!\n")
print("The elf's hitpoints are", hmnscore)
print("\n")
print("The Human damaged the dragon!\n")
drscore = drscore - human_dmg
hmnscore = hmnscore - dragon_dmg
print("The Dragon's hitpoints are", drscore)
print("The Dragon strikes back at the human!\n")
print("The human's hitpoints are", hmnscore)
drscore = drscore - human_dmg
hmnscore = hmnscore - dragon_dmg
print("The Human damaged the dragon!\n")
print("The Dragon's hitpoints are", drscore)
print("The Dragon strikes back at the human!\n")
print("The human's hitpoints are", hmnscore)
if drscore == 0:
print("Dragon DEFEATED")
else:
print("HUMAN Defeated")
else:
print(" *************************\n ")
print(" ******Invalid Player*****\n ")
print(" *************************\n ")