Repaired a but : bears dealt 1 damage instead of 0.

This commit is contained in:
eichhornchen
2021-01-10 21:15:42 +01:00
parent a1d69203c9
commit 893a23f95c
4 changed files with 34 additions and 29 deletions

View File

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