diff options
author | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 04:09:19 -0300 |
---|---|---|
committer | Victor Andrade de Almeida <vct.a.almeida@gmail.com> | 2022-07-17 04:09:19 -0300 |
commit | 795ffde4e100b83175cdb386481fb770c82c8b77 (patch) | |
tree | 9d8cb9e3f52bbe0e03a6bc7f1720ebe707ed4ead /Scenes/PlateDamage.gd | |
parent | e5a6000694f2f27d3eac1c77b79dfd792bd9f14e (diff) | |
download | gamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.tar.gz gamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.tar.bz2 gamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.zip |
Recolor dice
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 |