#textdomain wesnoth-utbs
# check to see if the Dust Devil is the unit
# triggering the event, and if it is, use Nym
# as the speaker
#define CHECK_EXPLORER
    [if]
        [variable]
            name=unit.type
            equals=Dust Devil
        [/variable]
        [or]
            [variable]
                name=unit.type
                equals="Flesh Golem"
            [/variable]
        [/or]
        [then]
            [store_unit]
                variable=explorer
                kill=no
                [filter]
                    id=Nym
                [/filter]
            [/store_unit]
        [/then]
        [else]
            [store_unit]
                variable=explorer
                kill=no
                [filter]
                    x=$unit.x
                    y=$unit.y
                [/filter]
            [/store_unit]
        [/else]
    [/if]
#enddef
# for second_unit
#define CHECK_SPEAKER
    [if]
        [variable]
            name=second_unit.type
            equals=Dust Devil
        [/variable]
        [or]
            [variable]
                name=second_unit.type
                equals="Flesh Golem"
            [/variable]
        [/or]
        [then]
            [store_unit]
                variable=speaking_unit
                kill=no
                [filter]
                    id=Nym
                [/filter]
            [/store_unit]
        [/then]
        [else]
            [store_unit]
                variable=speaking_unit
                kill=no
                [filter]
                    x=$second_unit.x
                    y=$second_unit.y
                [/filter]
            [/store_unit]
        [/else]
    [/if]
#enddef
