From c7ee498435273e0d6348c9991c1882d97de3748f Mon Sep 17 00:00:00 2001 From: CactiChameleon9 Date: Sun, 17 Jul 2022 19:19:32 +0100 Subject: [PATCH] Fix sending uneeded damage and movement signals --- UI/Card.gd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UI/Card.gd b/UI/Card.gd index c01208d..bffbc1b 100644 --- a/UI/Card.gd +++ b/UI/Card.gd @@ -146,13 +146,17 @@ func run_card(): var damage = card_info.damage_amount_addition for dice_number in input_dice: damage += card_info.damage_dice_multiplyer * dice_number - emit_signal("do_damage", damage, card_info.effect_damage_range) + + if damage != 0: + emit_signal("do_damage", damage, card_info.effect_damage_range) # calculate the damage amount var movement = card_info.move_amount_addition for dice_number in input_dice: movement += card_info.move_dice_multiplyer * dice_number - emit_signal("do_movement", movement) + + if movement != 0: + emit_signal("do_movement", movement) # do any utility dice returns for dice_number in input_dice: