Repaired a bug : a variable was not declared before it was used in interfaces.py take_damage

This commit is contained in:
eichhornchen 2021-01-10 21:41:45 +01:00
parent 6cf0590586
commit 18ace5144c
1 changed files with 1 additions and 0 deletions

View File

@ -774,6 +774,7 @@ class FightingEntity(Entity):
The entity takes damage from the attacker The entity takes damage from the attacker
based on their respective stats. based on their respective stats.
""" """
damage = 0
if amount != 0 : if amount != 0 :
damage = max(1, amount - self.constitution) damage = max(1, amount - self.constitution)
self.health -= damage self.health -= damage