From 18ace5144c298add03dffb49b82d3a187566876d Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Sun, 10 Jan 2021 21:41:45 +0100 Subject: [PATCH] Repaired a bug : a variable was not declared before it was used in interfaces.py take_damage --- squirrelbattle/interfaces.py | 1 + 1 file changed, 1 insertion(+) diff --git a/squirrelbattle/interfaces.py b/squirrelbattle/interfaces.py index c71d7c8..ea59a04 100644 --- a/squirrelbattle/interfaces.py +++ b/squirrelbattle/interfaces.py @@ -774,6 +774,7 @@ class FightingEntity(Entity): The entity takes damage from the attacker based on their respective stats. """ + damage = 0 if amount != 0 : damage = max(1, amount - self.constitution) self.health -= damage