#textdomain wesnoth-ei
[scenario]
    id=Elven_Alliance
    name= _ "An Elven Alliance"
    map_data="{campaigns/Eastern_Invasion/maps/An_Elven_Alliance.map}"
    {TURNS 24 22 20}
    next_scenario=Northern_Outpost

    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC elf-land.ogg elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC traveling_minstrels.ogg}
    {EXTRA_SCENARIO_MUSIC revelation.ogg}

    {campaigns/Eastern_Invasion/utils/deaths.cfg}

    [story]
        [part]
            story=_ "But Gweddry and Dacyn were to find that re-entering Wesnoth would not be easy with the escape tunnel closed to them. They marched out of the foothills of the Estmarks in a direction few Wesnothians had traveled before, into unknown forest country just south of the Great River."
        [/part]
        [part]
            show_title=yes
            {TO_AN_ELVEN_ALLIANCE}
        [/part]
    [/story]
    [side]
        type=Lieutenant
        id=Gweddry
        name= _ "Gweddry"
        side=1
        canrecruit=yes
        controller=human
        team_name=good
        user_team_name=_"Allies"
        {GOLD 200 150 100}
    [/side]

    [side]
        type=Elvish Ranger
        id=Volas
        name= _ "Volas"
        side=2
        canrecruit=yes
        controller=ai
        recruit=Elvish Fighter,Elvish Shaman,Elvish Scout
        {GOLD 150 100 75}
        team_name=good
        user_team_name=_"Allies"
        [ai]
            passive_leader=yes
        [/ai]
    [/side]
    [side]
        type=Orcish Warrior
        id=Gruga-Har
        name= _ "Gruga-Har"
        side=3
        canrecruit=yes
        controller=ai
        recruit=Troll Whelp,Wolf Rider,Orcish Grunt,Orcish Archer
        {GOLD 125 150 175}
        team_name=monster
        user_team_name=_"Monsters"
    [/side]

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Gs^Fp) 20 scenery/pine1.png}

        [objectives]
            side=1
            [objective]
                description= _ "Defeat enemy leader"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Gweddry"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Dacyn"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Volas"
                condition=lose
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/event]

    [event]
        name=start
        #hide Gruga-Har until he arrives
        [hide_unit]
            x=17
            y=3
        [/hide_unit]
        [recall]
            id=Dacyn
        [/recall]
        [message]
            speaker=Volas
            message= _ "Greetings, travelers! Welcome to my realm."
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Would it be possible for us to rest in your lands for a while? We have been pursued by fell undead, although they did not dare to enter the forest... yet."
        [/message]
        [message]
            speaker=Volas
            message= _ "Certainly."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "Good. Now, you should be warned. This undead warlord is very powerful. If you choose to battle with him then, even if you are victorious, few will survive. I invite you to join us, and head north. We may be able to leave the area he wishes to conquer."
        [/message]
        [message]
            speaker=Volas
            message= _ "I thank you for your offer. But I will not leave my homeland. These undead cannot be as powerful as you say; I will fight them."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "This is not a wise choice, but it is yours to make. If you will not join us, will you at least help us reach the northern outpost? We wish to warn our comrades there."
        [/message]
        [message]
            speaker=Volas
            message= _ "I will aid you. Although, I too, think that yours is the foolish choice. You should stay, and fight."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "After we rest for a short while, we will leave. We have little time to spare."
        [/message]
        #Gruga-Har arrives

        [move_unit_fake]
            type=Orcish Warrior
            side=3
            x=17,17,17
            y=1,2,3
        [/move_unit_fake]
        [unhide_unit]
        [/unhide_unit]
        [message]
            speaker=Gruga-Har
            message= _ "Intruders!"
        [/message]
        [message]
            speaker=Dacyn
            message= _ "What? Orcs! Where did they come from?"
        [/message]
        [message]
            speaker=Volas
            message= _ "I know not. But they are right in the Northern Path. You will have to fight them to move on."
        [/message]
        [message]
            speaker=Gruga-Har
            message= _ "Bring forth the assassins, we may be able to poison them!"
        [/message]
        [move_unit_fake]
            type=Orcish Slayer
            side=3
            x=18,18,18
            y=1,2,3
        [/move_unit_fake]
        [unit]
            type=Orcish Slayer
            id=Nafga
            name= _ "Nafga"
            side=3
            x=18
            y=3
        [/unit]
        [message]
            speaker=Nafga
            # wmllint: local spelling warlordship
            message= _ "Your Warlordship, I am the only assassin left! Do you want me to go poison their leader?"
        [/message]
        [message]
            speaker=Gruga-Har
            message= _ "Perfect! Go, into the forest!"
        [/message]
        [kill]
            id=Nafga
        [/kill]
        [move_unit_fake]
            type=Orcish Slayer
            side=3
            x=18,18,18,18
            y=3,4,5,6
        [/move_unit_fake]
        [message]
            speaker=Gweddry
            message= _ "They have sent an assassin into the forest. We will have to be careful, and make sure he does not come out and attack us unexpectedly."
        [/message]
    [/event]

    [event]
        name=turn 6
        [unit]
            type=Orcish Slayer
            id=Nafga
            name= _ "Nafga"
            side=3
            x=20
            y=16
        [/unit]
        [message]
            speaker=Nafga
            message= _ "Hahaha! Nafga will kill the elves!"
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Nafga
        [/filter]
        [message]
            speaker=Nafga
            message= _ "No! This is the first time I have failed a mission, and it is my last!"
        [/message]
        [kill]
            id=Nafga
            animate=yes
        [/kill]
        [message]
            speaker=Gruga-Har
            message= _ "My assassin is dead! The elves must pay, not for his death, but for stopping him in his mission!"
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Volas
        [/filter]
        [message]
            speaker=Volas
            message= _ "You have failed me, man of Wesnoth..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=enemies defeated
        [message]
            speaker=Volas
            message= _ "We have defeated the orcs! Now you can rest, and then leave."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "We have not the time. This battle has wasted too much of it already. We must leave now."
        [/message]
        [message]
            speaker=Volas
            message= _ "Very well. I will send guides to lead you to your allies."
        [/message]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    {FOREIGN_DEFEAT}
[/scenario]
