#textdomain wesnoth-utbs

#!-- This event is pretty simple, with intention of giving Garak a number of walking corpses
#!-- equal to number of lost units. Point to consider is to actualy zombify the killed by storing them
#!-- and unstoring as a recruit list when Garak is posessed.

#define ELF_CORPSE

    [event]
        name=die
        first_time_only=no
        [filter]
            side=1,4
        [/filter]

        [if]
            [variable]
                name=second_unit.side
                equals=2
            [/variable]
            [variable]
                name=turn_number
                less_than=13
            [/variable]
            [then]
#ifdef HARD
                {VARIABLE_OP azkotep_casaulties.length add 1}
                [store_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    variable=azkotep_casaulties[$killed_by_azkotep].unit
                    kill=no
                [/store_unit]
                {VARIABLE azkotep_casaulties[$killed_by_azkotep].unit.side 2}
                {VARIABLE azkotep_casaulties[$killed_by_azkotep].unit.hitpoints $azkotep_casaulties[$killed_by_azkotep].unit.max_hitpoints}
                {VARIABLE azkotep_casaulties[$killed_by_azkotep].unit.status.poisoned "no"}
#endif
                {VARIABLE_OP killed_by_azkotep add 1}
            [/then]
        [/if]
        [if]
            [variable]
                name=second_unit.side
                equals=3
            [/variable]
            [variable]
                name=turn_number
                less_than=13
            [/variable]
            [then]
#ifdef HARD
                {VARIABLE_OP ystara_casaulties.length add 1}
                [store_unit]
                    [filter]
                        description=$unit.description
                    [/filter]
                    variable=ystara_casaulties[$killed_by_ystara].unit
                    kill=no
                [/store_unit]
                {VARIABLE ystara_casaulties[$killed_by_ystara].unit.side 3}
                {VARIABLE ystara_casaulties[$killed_by_ystara].unit.hitpoints $ystara_casaulties[$killed_by_ystara].unit.max_hitpoints}
                {VARIABLE ystara_casaulties[$killed_by_ystara].unit.status.poisoned "no"}
#endif
                {VARIABLE_OP killed_by_ystara add 1}
            [/then]
        [/if]
    [/event]

#enddef
