Repaired a bug : a variable was not declared before it was used in interfaces.py take_damage
This commit is contained in:
parent
6cf0590586
commit
18ace5144c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue