From 34d71c66fdce605826262006b1b5a79f57467191 Mon Sep 17 00:00:00 2001 From: Toranks Date: Sat, 15 Jul 2023 08:17:24 +0200 Subject: [PATCH] More precise leeches mechanic --- utils/abilities_events.cfg | 46 ++++++++++++-------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/utils/abilities_events.cfg b/utils/abilities_events.cfg index 661cf41b..a9e74852 100644 --- a/utils/abilities_events.cfg +++ b/utils/abilities_events.cfg @@ -4161,22 +4161,13 @@ divide=10 round=ceil [/set_variable] - {VARIABLE_OP unit.hitpoints add $damage_dealt} - [if] - [variable] - name=unit.hitpoints - greater_than=$unit.max_hitpoints - [/variable] - [then] - {VARIABLE unit.hitpoints $unit.max_hitpoints} - [/then] - [/if] - [unstore_unit] - variable=unit - find_vacant=no - {COLOR_HEAL} - text= _ "$damage_dealt" - [/unstore_unit] + [heal_unit] + [filter] + id=$unit.id + [/filter] + amount=$damage_dealt + animate=yes + [/heal_unit] {CLEAR_VARIABLE damage_dealt} [/event] [event] @@ -4194,22 +4185,13 @@ divide=10 round=ceil [/set_variable] - {VARIABLE_OP second_unit.hitpoints add $damage_dealt} - [if] - [variable] - name=second_unit.hitpoints - greater_than=$second_unit.max_hitpoints - [/variable] - [then] - {VARIABLE second_unit.hitpoints $second_unit.max_hitpoints} - [/then] - [/if] - [unstore_unit] - variable=second_unit - find_vacant=no - {COLOR_HEAL} - text= _ "$damage_dealt" - [/unstore_unit] + [heal_unit] + [filter] + id=$second_unit.id + [/filter] + amount=$damage_dealt + animate=yes + [/heal_unit] {CLEAR_VARIABLE damage_dealt} [/event]