#textdomain wesnoth-low
[scenario]
    id=23_End_of_War
    name= _ "End of War"
    {LOW_MAP 23_End_of_War.map}
    {TURNS 18 21 24}

    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC sad.ogg heroes_rite.ogg}
    {EXTRA_SCENARIO_MUSIC elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}

    #TODO music

    next_scenario=24_Epilogue
    [story]
        [part]
            # wmllint: local spelling Gitamoth
            story= _ "It is said that the battle with the North Elves was the beginning of the end for Landar's revolt. But civil war smoldered on for many more years, neither side mustering enough strength to achieve a decisive victory. Until, eventually, Landar's increasingly harsh and arrogant ways drove away many of his followers. After assembling all the troops he could, Kalenz marched against his old friend and now mortal enemy, Landar, in the forest of Gitamoth... "
            {TO_END_OF_WAR}
        [/part]
    [/story]

    #wmllint: validate-off
    [side]
        {KALENZ}
        # wmllint: recognize Kalenz
        recruit={ELVES}
        {GOLD 200 160 160}
    [/side]
    #wmllint: validate-on
    [side]
        side=2
        no_leader=yes
        canrecruit=yes
#ifdef EASY
        recruit=Elvish Archer, Elvish Fighter
#endif

#ifdef NORMAL
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero, Elvish Ranger
#endif

#ifdef HARD
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero, Elvish Ranger, Elvish Avenger
#endif

        {GOLD 250 520 710}
        team_name=assasins
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
#ifdef EASY
            recruitment_pattern=fighter,fighter,archer
#else
            recruitment_pattern=fighter,mixed fighter,archer
#endif
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
    [/side]

    # wmllint: recognize Landar
    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Defeat Landar"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Cleodil"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
        [/objectives]

        {RECALL_LOYALS}

        {CHECK_CLEODIL}
        {CHECK_LANDAR_STORE ()}

        {VARIABLE landar_store.x 33}
        {VARIABLE landar_store.y 29}
        {VARIABLE landar_store.side 2}

        [unstore_unit]
            variable=landar_store # wmllint: recognize Landar
        [/unstore_unit]
        {CLEAR_VARIABLE landar_store}
    [/event]
    [event]
        name=start
        [message]
            id=Kalenz
            message= _ "Landar, let us not spill any more elvish blood. Give up. We can help you!"
        [/message]
        [message]
            id=Landar
            message= _ "No! It all ends here!"
        [/message]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Landar
        [/filter]
        [message]
            id=Landar
            message= _ "I'm done. Now I can rest!"
        [/message]
        [message]
            id=Kalenz
            message= _ "I'm deeply grieved that it came to this, Landar. You were my best friend. I was blind to what the potion was doing to you. I was fighting it myself!"
        [/message]
        [message]
            id=Landar
            message= _ "I know. But you are not at fault, for I did not take just one bottle. I wanted to make sure we could kill the orcish Great Chief, so I went back for a second and drank that one, too. Now I have driven our dwarvish allies away and brought death and disaster to our own people. I have even tried to kill my own friend. I am a disgrace to elven-kind."
        [/message]
        [message]
            id=Kalenz
            message= _ "It was not all your fault. May be the curse of Aquagar struck true, or may be yours was the blood-price fate required of us for victory. Rest well, my friend. Rest well Landar, Hero of the Elves!"
        [/message]
        [kill]
            id=Landar
        [/kill]
        [endlevel]
            result=victory
        [/endlevel]
    [/event]

    {@campaigns/Legend_of_Wesmere/utils/deaths.cfg}
[/scenario]
