ProditorMagnus / Ageless-for-1-11

For 1.12 wesnoth. For 1.14 see https://github.com/ProditorMagnus/Ageless-for-1-14 and https://github.com/ProditorMagnus/Ageless-Resources-1-14
4 stars 1 forks source link

charm hotfix #9

Closed sevu closed 7 years ago

sevu commented 7 years ago

a small reminder that the charm hotfix is not included yet

ProditorMagnus commented 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]
sevu commented 7 years ago

Commited. I wonder why it was an issue though.

ProditorMagnus commented 7 years ago

Testing showed that it was only issue for AI turns.

sevu commented 7 years ago

Maybe formula="$($this_unit.level < 2)" would have worked. It's recommended to surround WFL with brackets using $( ), maybe it affected with case.

ProditorMagnus commented 7 years ago

1.13.2 says * Fix $this_unit auto-stored variable not working correctly in most SUFs

sevu commented 7 years ago

1.13.10 release notes also mention that it's now possible to use WFL in abilities and specials.