#textdomain wesnoth-low

#define HIGH_PRIORITY_TARGETS
    [target]
        id=Kalenz
        value=200
    [/target]
#enddef

[scenario]
    id=21_Elvish_Assassins
    name= _ "Elvish Assassins"
    {LOW_MAP  Lintanir.map}
    {LOW_MASK 21_Elvish_Assassins.mask}

    {TURNS 20 16 12}

    {INTRO_AND_SCENARIO_MUSIC revelation.ogg the_dangerous_symphony.ogg}
    {EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
    {EXTRA_SCENARIO_MUSIC sad.ogg}

    {DEFAULT_SCHEDULE}

    next_scenario=22_Northern_Battle
    [story]
        [part]
            delay=4000
            show_title=yes
            {TO_ELVISH_ASSASSINS}
        [/part]
        [part]
            story= _ "After the council's decision, Kalenz and Cleodil retired in the North."
            {TO_ELVISH_ASSASSINS_BATTLE}
        [/part]
        [part]
            story= _ "Free of the pressure of war, they took delight in each other. The heart-bond they had formed amidst peril and death grew closer, and all but vanquished the remnant evil Crelanu's philter had left in Kalenz. The two began to think of having children."
            delay=8000
        [/part]
        [part]
            story= _ "But their peace was not to last. In the outer world, the blood tides were rising. And in the heart of Landar, who had once been their friend, evil was not vanquished, but festered and grew..."
            delay=8000
        [/part]
    [/story]

    # wmllint: validate-off
    [side]
        side=1
        no_leader=yes
        save_id=Kalenz
        controller=human
        team_name=kalenz
        recruit={ELVES}
        {GOLD 100 100 100}
    [/side]
    # wmllint: validate-on
    # wmllint: recognize Kalenz
    {RECALL_KALENZ 17 14}

    [side]
        side=2
        no_leader=yes
        team_name=assassins
        [unit]
            type=Elvish Ranger
            id=Antaril
            name=_ "Antaril"
            canrecruit=yes
            x=5
            y=15
        [/unit]
        recruit=Elvish Fighter,Elvish Archer
        {GOLD 200 320 350}
        [ai]
            recruitment_pattern=archer,fighter
            #	    {NO_SCOUTS}
            {HIGH_PRIORITY_TARGETS}
        [/ai]
    [/side]

    [side]
        side=3
        no_leader=yes
        team_name=assassins
        [unit]
            type=Elvish Captain
            id=Crintil
            name=_ "Crintil"
            canrecruit=yes
            x=27
            y=14
        [/unit]
#ifdef EASY
        recruit=Elvish Archer, Elvish Fighter
#endif
#ifdef NORMAL
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero
#endif
#ifdef HARD
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero, Elvish Ranger
#endif
        #	{NO_SCOUTS}
        {GOLD 200 320 380}

        [ai]
            {HIGH_PRIORITY_TARGETS}
            recruitment_ignore_bad_movement=yes
#ifndef HARD
            recruitment_pattern=archer,fighter
#else
            recruitment_pattern=archer,fighter,mixed fighter
#endif
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=1.0
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
    [/side]

    [side]
        side=4
        no_leader=yes
        team_name=assassins
        [unit]
            type=Elvish Hero
            id=Oblil
            name=_ "Oblil"
            canrecruit=yes
            x=7
            y=29
        [/unit]
#ifdef EASY
        recruit=Elvish Archer, Elvish Fighter
#endif
#ifdef NORMAL
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero
#endif
#ifdef HARD
        recruit=Elvish Archer, Elvish Fighter, Elvish Hero, Elvish Ranger
#endif
        {NO_SCOUTS}
        {GOLD 100 120 150}

        [ai]
            {HIGH_PRIORITY_TARGETS}
            recruitment_ignore_bad_movement=yes
#ifndef HARD
            recruitment_pattern=archer,fighter
#else
            recruitment_pattern=archer,fighter,mixed fighter
#endif
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=1.0
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
    [/side]
#undef HIGH_PRIORITY_TARGETS

    {STARTING_VILLAGES_ALL 1}

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Kalenz reaches the signpost"
                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]

        [store_unit]
            variable=healer_store
            kill=yes
            [filter]
                side=1
                type=Elvish Shyde, Elvish Enchantress, Elvish Sorceress, Elvish Sylph, Elvish Druid
                [not]
                    # wmllint: recognize Cleodil
                    id=Cleodil
                [/not]
            [/filter]
        [/store_unit]

        [store_unit]
            variable=landar_store
            kill=yes
            [filter]
                # wmllint: recognize Landar
                id=Landar
            [/filter]
        [/store_unit]

        # wmllint: recognize Kalenz
        [store_unit]
            variable=troop_store
            kill=yes
            [filter]
                side=1
                [not]
                    id=Kalenz
                [/not]
                [not]
                    [filter_wml]
                        upkeep="loyal"
                    [/filter_wml]
                [/not]
            [/filter]
        [/store_unit]

        {RECALL_LOYALS}

        {CHECK_CLEODIL}
    [/event]

    [event]
        name=start
        [sound]
            name=horse-canter.wav
        [/sound]

        [move_unit_fake]
            type=Elvish Scout
            x=10,11,12,13,14,15
            y=25,24,23,22,21,20
        [/move_unit_fake]

        [unit]
            id=Galenor
            name=_ "Galenor"
            type=Elvish Scout
            side=1
            x=15
            y=20
            facing=sw
        [/unit]

        [message]
            id=Galenor
            message= _ "My lord Kalenz, you are in great danger! You must leave here immediately."
        [/message]
        [message]
            id=Kalenz
            message= _ "What?!"
        [/message]
        [message]
            id=Galenor
            message= _ "Landar has seized control of the army. He has eliminated the council and proclaimed himself High Warlord of the Elves. What is worse, there is word out that he has already ordered your assassination."
        [/message]
        [message]
            id=Crintil
            message= _ "Too late! All traitors will die!"
        [/message]
        [message]
            id=Kalenz
            message= _ "Listen to me! We have fought and bled side by side. We must trust in each other and face the orcs together!"
        [/message]

        [message]
            id=Oblil
            message= _ "Do not listen to this traitor! You have all heard the order!"
        [/message]

        [message]
            id=Galenor
            message= _ "You should try to reach Uradredia and the North Elves. He too, has refused to join Landar. Word is that some troops still loyal to you are heading there."
        [/message]

        {HIGHLIGHT_IMAGE 1 30 scenery/signpost.png ()}

        [scroll_to_unit]
            id=Kalenz
        [/scroll_to_unit]
    [/event]

    [event]
        name=moveto
        [filter]
            x=1
            y=30
            id=Kalenz
        [/filter]
        [message]
            speaker=unit
            message= _ "Now we must fare swiftly to the North Elves!"
        [/message]
        [endlevel]
            result=victory
            bonus=yes
        [/endlevel]
    [/event]

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