#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]
        # move the player automatically the first time they find the passage
        [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]
        # now make the secret passage for real
        [tunnel]
            [filter]
            [/filter]
            [source]
                x={X}
                y={Y}
            [/source]
            [target]
                x={TO_X}
                y={TO_Y}
            [/target]
        [/tunnel]
    [/event]
#enddef

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

#define DELFADOR_LIGHTNING
    [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]
#enddef
