#textdomain wesnoth-dm

#define MEMOIRS_GENERATOR_SKELETON X Y
    # set the generator's terrain
    [event]
        name=prestart
        [item]
            x,y={X},{Y}
            image=scenery/monolith2.png
        [/item]
    [/event]

    # generate a unit each turn
    [event]
        id=generator_{X}_{Y}
        name=new turn
        first_time_only=no

        [scroll_to]
            x,y={X},{Y}
        [/scroll_to]
        [sound]
            name=magic-dark.ogg
        [/sound]
        {RANDOM (Skeleton,Skeleton Archer)}
        [unit]
            type=$random
            side=2
            x,y={X},{Y}
            animate=yes
        [/unit]
        {CLEAR_VARIABLE random}
    [/event]

    # if someone capable of destroying the generator moves there
    [event]
        name=moveto
        [filter]
            side=1
            x,y={X},{Y}
            type_adv_tree=Mage,Journeyman Mage,Paladin
        [/filter]

        [message]
            speaker=unit
            message=_"I call upon all that is holy to break the power of this evil stone!"
        [/message]
        [sound]
            name=lightning.ogg
        [/sound]
        [color_adjust]
            red=100
            green=100
            blue=100
        [/color_adjust]
        [delay]
            time=10
        [/delay]
        [color_adjust]
            red=0
            green=0
            blue=0
        [/color_adjust]
        [remove_event]
            id=generator_{X}_{Y}
        [/remove_event]
    [/event]

    # if someone who can't destroy the generator moves there
    [event]
        name=moveto
        [filter]
            x,y={X},{Y}
            side=1
            [not]
                type_adv_tree=Mage,Journeyman Mage,Paladin
            [/not]
        [/filter]

        [message]
            speaker=unit
            message=_"Evil emanates from this stone, but I have not the power to destroy it."
        [/message]
    [/event]
#enddef
