#textdomain wesnoth-dm
#define MEMOIRS_VICTORY_POSITION X Y BONUS_VALUE
    [item]
        x={X}
        y={Y}
        image=scenery/signpost.png
    [/item]
    [event]
        name=moveto
        [filter]
            id=Delfador
            x={X}
            y={Y}
        [/filter]
        [endlevel]
            result=victory
            bonus={BONUS_VALUE}
        [/endlevel]
    [/event]
#enddef

#define MEMOIRS_SECRET_PASSAGE X Y TO_X TO_Y
    [item]
        x={X}
        y={Y}
        image=scenery/mine-abandoned.png
    [/item]
    [event]
        name=moveto
        [filter]
            x={X}
            y={Y}
            side=1
        [/filter]
        [message]
            speaker=unit
            message=_"A secret passage... I wonder where it leads..."
        [/message]
    [/event]
    [event]
        name=moveto
        first_time_only=no
        [filter]
            x={X}
            y={Y}
        [/filter]
        [teleport]
            [filter]
                x={X}
                y={Y}
            [/filter]
            x={TO_X}
            y={TO_Y}
        [/teleport]
        [capture_village]
            side=1
            x={TO_X}
            y={TO_Y}
        [/capture_village]
        [scroll_to_unit]
            x={TO_X}
            y={TO_Y}
        [/scroll_to_unit]
    [/event]
#enddef

### create a sidekick for a leader near to starting position

#define MEMOIRS_SIDEKICK SIDE TYPE DESCRIPTION
    [store_starting_location]
        side={SIDE}
        variable=tmp
    [/store_starting_location]
    [unit]
        type={TYPE}
        id={DESCRIPTION}
        side={SIDE}
        x=$tmp.x
        y=$tmp.y
    [/unit]
    [clear_variable]
        name=tmp
    [/clear_variable]
#enddef

### earthquake effect stolen from "The Lost General"
#define MEMOIRS_TREMOR
    [scroll]
        x=5
        y=0
    [/scroll]
    [delay]
        time=10
    [/delay]
    [scroll]
        x=-10
        y=0
    [/scroll]
    [delay]
        time=10
    [/delay]
    [scroll]
        x=0
        y=5
    [/scroll]
    [delay]
        time=10
    [/delay]
    [scroll]
        x=0
        y=-10
    [/scroll]
#enddef

#define DELFADOR_LIGHTNING
    [sound]
        name=lightning.ogg
    [/sound]

    [colour_adjust]
        red=100
        green=100
        blue=100
    [/colour_adjust]

    [delay]
        time=10
    [/delay]

    [colour_adjust]
        red=0
        green=0
        blue=0
    [/colour_adjust]
#enddef
