UtBS: Tweaks to the support ability

Excludes level 0 units from being affected, removes the unnecessary prerecruit,prerecall part from an event name, adds handling of leveling and removes a [kill] that could possibly cause problems for other die events.
This commit is contained in:
ln-zookeeper 2017-01-05 18:54:07 +02:00
parent 4760432a59
commit cbcc4f1c29

View file

@ -616,12 +616,16 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
#define ABILITY_SUPPORT_EVENTS
[event]
name=unit placed,prerecruit,prerecall
name=unit placed
first_time_only=no
[filter]
side=1
[not]
level=0
[/not]
[filter_wml]
upkeep=full
[/filter_wml]
@ -651,6 +655,10 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
[have_unit]
x,y=$update_support_units[$i].x,$update_support_units[$i].y
[not]
level=0
[/not]
[filter_wml]
upkeep=full
[/filter_wml]
@ -671,6 +679,10 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
[have_unit]
x,y=$update_support_units[$i].x,$update_support_units[$i].y
[not]
level=0
[/not]
[filter_wml]
[variables]
upkeep_supported=yes
@ -922,7 +934,7 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
[/event]
[event]
name=die
name=die,post advance
first_time_only=no
[filter]
@ -932,11 +944,7 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
[store_unit]
[filter]
[filter_wml]
[variables]
upkeep_supported=yes
[/variables]
[/filter_wml]
side=1
[filter_adjacent]
x,y=$x1,$y1
@ -947,10 +955,33 @@ _"This unit is capable of distracting opponents, allowing allied units to trespa
variable=update_support_units
[/store_unit]
[kill]
x,y=$x1,$y1
fire_event=no
[/kill]
[fire_event]
name=set_support_upkeep
[/fire_event]
{CLEAR_VARIABLE update_support_units}
[/event]
[event]
name=post advance
first_time_only=no
[filter]
side=1
[filter_adjacent]
ability=support
[/filter_adjacent]
[/filter]
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
kill=no
variable=update_support_units
[/store_unit]
[fire_event]
name=set_support_upkeep