#Knights and Fighters
Knight_HP = int(input("Enter the Knight's HP: "))
Knight_Damage = int(input( "Enter the Knight's Damage Attack: "))
Knight_Special = int(input("Enter the Knight's Special Attack damage: "))
Fighter_HP = int(input("Enter the Fighter's HP: "))
Fighter_Damage = int(input( "Enter the Fighter's Damage Attack: "))
Fighter_Special = int(input("Enter the Fighter's Special Attack damage: "))
print (" ")
Round_N = 0
while Knight_HP and Fighter_HP > 0:
print (" ")
print ("Round: " + str(Round_N))
for i in range(2):
if i == 0:
print ("The Knight goes first")
Fighter_HP = Fighter_HP - Knight_Damage
print ("Fighter: " + str(Fighter_HP))
print ("Knight: " + str(Knight_HP))
print ("")
else:
print ("The Fighter goes first")
Knight_HP = Knight_HP - Fighter_Damage
print ("Knight: " + str(Knight_HP))
print ("Fighter: " + str(Fighter_HP))
print (" ")
Round_N = Round_N + 1
if Knight_HP < Fighter_Special:
print ("Fighter Has Used Special Attack.")
print ("Knight Has Been Defeated.")
print ("Round Over")
break
elif Fighter_HP < Knight_Special:
print ("Knight Has Used Special Attack")
print ("Fighter Has Been Defeated.")
print ("Round Over")
break
I want both loops to break when either's HP is 0 (i.e. when it uses the special attack), but for some reason, it continues making rounds, not breaking the loop when I need it to. The round number also skips some rounds (goes 0, 2, 4, 6, etc.), which is also bugging me out.