Skip to content

Commit

Permalink
More precise leeches mechanic
Browse files Browse the repository at this point in the history
  • Loading branch information
Toranks authored and Dugy committed Jul 15, 2023
1 parent d2aec9a commit 34d71c6
Showing 1 changed file with 14 additions and 32 deletions.
46 changes: 14 additions & 32 deletions utils/abilities_events.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]

Expand Down

0 comments on commit 34d71c6

Please sign in to comment.