This isn't my exact code, but I'm basically doing this
EnemyAttack = int(10) Move = input("| Cast an attack spell(1) | Cast a defense spell(2) |") if Move = ("2"): print ("You have casted a defense spell for 2 turns") EAN = 2 if EAN >= 1: EnemyAttack = EnemyAttack / 2 EAN = EAN - 1 Health = Health - EnemyAttack The code does halve the enemy's attack, however the output is not what i want it to be.
print ("You have been damaged for {}".format(EnemyAttack) This displays
84.0 I want it to output
84 I have already defined the EnemyAttack as an integer, so I'm confused why it's displayed as a real number. Any solutions? Also if you can, comment using a simple code that I can convert into my situation. Thanks.
EnemyAttackthat it's outputting, then why is it 84 instead of 10 or 5? Are you sure you've transferred your code correctly?