#textdomain wesnoth-dm
[scenario]
    name=_"The Gate Between Worlds"
    id=10_the_gate_between_worlds
    next_scenario=11_wasteland
    {MEMOIRS_MAP dead2.map}
    turns=24

    {LAND_OF_THE_DEAD}

    # Could use "The Deep Path", but monotony is what we want here
    {SCENARIO_MUSIC underground.ogg}

    [side]
        {YOUNG_DELFADOR}
        type=Journeyman Mage
        canrecruit=yes
        recruit=Ghost
        team_name=goodies
    [/side]

    {STARTING_VILLAGES 1 5}

    [side]
        type=Necromancer
        id=Iliah-Malal
        name= _ "Iliah-Malal"
        side=2
        canrecruit=yes
        controller=ai
        recruit=Vampire Bat,Dark Adept,Thug
        team_name=baddies
        {GOLD 120 200 250}
        # try to stop him leaving his keep, so that the victory
        # sequence works correctly
        [ai]
            passive_leader=yes
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 5}

    {MEMOIRS_DEATHS}

    #############################
    # A bit of hackery to get the map border to look right, after
    # Iliah-Malal has opened the portal.  The map initially includes
    # a bit of grassland to the northwest.  We remove that here, but
    # when the portal opens, the grassland will appear to continue
    # off the edge of the map.
    #############################
    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description=_"Defeat Iliah-Malal"
                condition=win
            [/objective]
            [objective]
                description=_"Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description=_"Time runs out"
                condition=lose
            [/objective]
            note={EARLY_FINISH_BONUS_NOTE}
        [/objectives]
        [terrain]
            terrain=Mm
            x=1
            y=1-2
        [/terrain]
    [/event]

    #############################
    # starting dialog
    #############################
    [event]
        name=start

        [role]
            type=Ghost,Wraith,Shadow,Ghoul,Necrophage
            role=dead_sidekick
        [/role]
        [recall]
            role=dead_sidekick
        [/recall]

        [message]
            speaker=Iliah-Malal
            message=_"So, this is the one my minions told me of... the living man who walks here among the dead. You have come in time to see my greatest achievement - an end to death itself!"
        [/message]

        [message]
            speaker=Delfador
            message=_"That's impossible! You must be insane!"
        [/message]

        [message]
            speaker=Iliah-Malal
            message=_"Have not you yourself traveled between the realms of life and death? Behold!"
        [/message]

        # open the portal
        [sound]
            name=rumble.wav
        [/sound]
        {MEMOIRS_TREMOR}
        [terrain]
            terrain=_s	# wmllint: ignore
            x=1-2
            y=1-2
        [/terrain]
        {MEMOIRS_TREMOR}
        [terrain]
            terrain=_s	# wmllint: ignore
            x=1-3
            y=1-3
        [/terrain]
        [terrain]
            terrain=Gg
            x=1
            y=1
        [/terrain]
        {MEMOIRS_TREMOR}
        [terrain]
            terrain=_s	# wmllint: ignore
            x=1-4
            y=1-3
        [/terrain]
        [terrain]
            terrain=Gg
            x=1-2
            y=1-2
        [/terrain]
        {MEMOIRS_TREMOR}
        [terrain]
            terrain=Gg
            x=1-4
            y=1-3
        [/terrain]

        # pause so the user can see what's happenned
        [redraw]
        [/redraw]
        [delay]
            time=800
        [/delay]

        [message]
            role=dead_sidekick
            message=_"Iliah-Malal has created a portal to the land of the living! How I long to go through it and see the sun again..."
        [/message]

        [message]
            speaker=Iliah-Malal
            message=_"Now, my living followers, I summon you! See that death is nothing, and fear not to fight for me!"
        [/message]

        [move_unit_fake]
            type=Thug
            side=2
            x=1,2,3,4,5,6,7
            y=1,1,2,2,3,3,4
        [/move_unit_fake]
        [unit]
            type=Thug
            id=Vobryn
            side=2
            x,y=7,4
        [/unit]
        [move_unit_fake]
            type=Dark Adept
            side=2
            x=1,2,2,3,3,4,5,6
            y=1,1,2,3,4,4,5,5
        [/move_unit_fake]
        [unit]
            type=Dark Adept
            id=Tur
            side=2
            x,y=6,5
        [/unit]
        [move_unit_fake]
            type=Thug
            side=2
            x=1,2,3,4,4,5,6
            y=1,1,2,2,3,4,4
        [/move_unit_fake]
        [unit]
            type=Thug
            id=Meorraent
            side=2
            x,y=6,4
        [/unit]

        [message]
            speaker=Delfador
            message=_"This is a great evil. The dead will not find peace by passing through your gateway, Iliah-Malal, for you cannot give them life again. You have not brought an end to death, but to life itself!"
        [/message]

        [message]
            speaker=Iliah-Malal
            message=_"You will see things differently at the point of a sword, my friend. Minions! Kill the unbeliever... he will join us then."
        [/message]
    [/event]

    #############################
    # closing dialog
    #############################
    [event]
        name=last breath
        [filter]
            id=Iliah-Malal
        [/filter]

        [message]
            speaker=narrator
            message=_"Iliah-Malal's body lay still for a moment, then stirred!"
            image=wesnoth-icon.png
        [/message]

        {ADVANCE_UNIT  id=Iliah-Malal Necromancer}
        [redraw]
        [/redraw]

        [delay]
            time=800
        [/delay]

        {MOVE_UNIT id=Iliah-Malal 1 1}
        [redraw]
        [/redraw]

        [message]
            speaker=Iliah-Malal
            message=_"Follow me if you dare..."
        [/message]

        [message]
            speaker=Delfador
            message=_"This portal Iliah-Malal has created is a great and terrible work of magic. I must catch him, and somehow force him to close it!"
        [/message]
        [endlevel]
            result=victory
        [/endlevel]
    [/event]
[/scenario]
