Closed sevu closed 7 years ago
Code reference, might need removing name and description.
[abilities]
[leadership]
id=AE_agl_y_charm
value=-20
cumulative=yes
name= _ "charm"
description=_"This unit can charm enemy units that are next to it of all levels, distracting them, and making them fight 20% worse. Against units of level 0 and 1 the effect is cumulative."
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=0
[or]
level=1
[/or]
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=AE_agl_y_charm_noncumulative
value=-20
cumulative=no
name= _ "charm"
description=_"This unit can charm enemy units that are next to it of all levels, distracting them, and making them fight 20% worse. Against units of level 0 and 1 the effect is cumulative."
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
[not]
level=0
[/not]
[not]
level=1
[/not]
[/filter]
[/affect_adjacent]
[/leadership]
[/abilities]
Commited. I wonder why it was an issue though.
Testing showed that it was only issue for AI turns.
Maybe formula="$($this_unit.level < 2)"
would have worked. It's recommended to surround WFL with brackets using $( ), maybe it affected with case.
1.13.2 says * Fix $this_unit auto-stored variable not working correctly in most SUFs
1.13.10 release notes also mention that it's now possible to use WFL in abilities and specials.
a small reminder that the charm hotfix is not included yet