diff options
Diffstat (limited to 'Scenes/PlateDamage.gd')
-rw-r--r-- | Scenes/PlateDamage.gd | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Scenes/PlateDamage.gd b/Scenes/PlateDamage.gd index 310ac39..d910f76 100644 --- a/Scenes/PlateDamage.gd +++ b/Scenes/PlateDamage.gd @@ -1,19 +1,17 @@ extends Plate -export(int) var damage - func activate(entity : Entity, dungeon): if entity is Player: entity.add_action("cor_shake", [0.2]) - Global.turns -= damage + Global.turns -= int(entity.get_top()) return if entity is Monster: - if entity.health - damage <= 0: + if entity.health - 1 <= 0: entity.alive = false entity.add_action("cor_dies", []) dungeon.kill_entity(entity) else: - entity.health -= damage + entity.health -= 1 entity.add_action("cor_shake", [0.2]) return |