#textdomain wesnoth-low
{./16_The_Chief_must_die_utils.cfg}
[scenario]
    id=16_The_Chief_must_die
    name=_"The Chief must die"
    {LOW_MAP 16_The_Chief_must_die.map}
    turns=32
    disallow_recall=yes

    {INTRO_AND_SCENARIO_MUSIC love_theme.ogg the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC the_dangerous_symphony.ogg}
    {EXTRA_SCENARIO_MUSIC vengeful.ogg}

    {STARTING_VILLAGES 3 50}

    victory_when_enemies_defeated=no
    {DUSK}
    {DUSK}
    {DUSK}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {DAWN}
    next_scenario=17_Breaking_the_siege

    {LOW_PRESTART}

    [story]
        [part]
            delay=4000
            show_title=yes
            {TO_THE_CHIEF_MUST_DIE}
        [/part]
        [part]
            story= _ "With the battle of Tath over, Kalenz and Landar knew the time had come to carry out Crelanu's dangerous but necessary plan. Meanwhile Cleodil had, reluctantly, been training Kalenz in a selected few of the secrets of Crelanu's book ..."
            {TO_THE_CHIEF_MUST_DIE_BATTLE}
        [/part]
        [part]
            background=story/characters/cleodil.png
            scale_background=no
            story={CAPTION ( _ "Cleodil")} + _ "I have taught you all that I dare. My lord...Kalenz...I pray you come back safely. My heart aches when I think of you going into such danger as this. It is peril not merely to your body, but to the essence of yourself."
        [/part]
        [part]
            background=story/characters/kalenz.png
            scale_background=no
            story={CAPTION ( _ "Kalenz")} + _ "Cleodil..."
        [/part]
        [part]
            background=story/characters/cleodil.png
            scale_background=no
            story={CAPTION ( _ "Cleodil")} + _ "I do not think I could bear your death. Still less could I bear the corruption of your soul; the grief would ruin me."
        [/part]
        [part]
            background=story/characters/kalenz.png
            scale_background=no
            story={CAPTION ( _ "Kalenz")} + _ "My eyes are open. To the danger, and...to you. You glow like a star in the night, Cleodil. You will be my guide out of darkness."
        [/part]
    [/story]

    #wmllint: validate-off
    [side]
        {KALENZ}
        # wmllint: recognize Kalenz
        village_gold=0
        #This sets the income to 0
        {INCOME -2 -2 -2}
        [unit]
            {LANDAR}
            placement=leader
            # wmllint: recognize Landar
        [/unit]
    [/side]
    #wmllint: validate-on

    [side]
        type=Orcish Sovereign
        id=Great Chief Brurbar
        name=_ "Great Chief Brurbar"
        side=2
        canrecruit=no
        {GOLD 150 230 300}
        team_name=orcs
        [ai]
            ai_algorithm=idle_ai
        [/ai]
        {INCOME 4 8 12}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tamitahan
        name=_ "Tamitahan"
        profile=portraits/orcs/transparent/warlord.png
        side=3
        canrecruit=yes
        {GOLD 150 230 300}
        team_name=orcs
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif
#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman, Orcish Warrior
#endif
#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Orcish Warrior
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
            protect_leader_radius=1
        [/ai]
        [ai]
            ai_algorithm=idle_ai
        [/ai]
        {INCOME 4 8 12}
    [/side]

    [side]
        side=4
        team_name=orcs
        id=Khrubar
        type=Orcish Warlord
        name=_ "Khrubar"
        profile=portraits/orcs/transparent/warlord.png
        canrecruit=yes
        {GOLD 100 100 100 }
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif
#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman, Orcish Warrior
#endif
#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Orcish Warrior
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
            protect_leader_radius=1
        [/ai]
        [ai]
            ai_algorithm=idle_ai
        [/ai]
    [/side]
    [side]
        type=Orcish Warlord
        id=Gvur
        name=_ "Gvur"
        profile=portraits/orcs/transparent/grunt-2.png
        side=5
        canrecruit=yes
        {GOLD 100 100 100}
        team_name=orcs
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif
#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman, Orcish Warrior
#endif
#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Orcish Warrior
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
            protect_leader_radius=1
        [/ai]
        [ai]
            ai_algorithm=idle_ai
        [/ai]
        {INCOME 4 8 12}
    [/side]

    [side]
        type=Orcish Warlord
        id=Ozul
        name=_ "Ozul"
        profile=portraits/orcs/transparent/grunt-2.png
        side=6
        canrecruit=yes
        {GOLD 100 100 100}
        team_name=orcs
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif
#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman, Orcish Warrior
#endif
#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Orcish Warrior
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
            protect_leader_radius=1
        [/ai]
        [ai]
            ai_algorithm=idle_ai
        [/ai]
        {INCOME 4 8 12}
    [/side]
    [side]
        side=7
        no_leader=yes
        team_name=orcs
        [ai]
            version=10703
            [stage]
                engine=fai
                name=unit_formulas
            [/stage]
        [/ai]
    [/side]
    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _  "Kill the Orcish Great Chief and Kalenz must reach the signpost"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _  "Death of Landar"
                condition=lose
            [/objective]
            [objective]
                description= _  "Turns run out"
                condition=lose
            [/objective]
            note={NO_EARLY_FINISH_BONUS_NOTE}, {NEW_GOLD_CARRYOVER_NOTE_100}
        [/objectives]

        {ORCISH_GUARD}
    [/event]

    [event]
        name=start
        [message]
            id=Kalenz
            message= _ "Here we are at last. Landar, are you sure you want to go through with this?"
        [/message]
        [message]
            id=Landar
            message= _ "Absolutely. Let's do it!"
        [/message]
        [message]
            id=Kalenz
            message= _ "We need to kill the Great Chief and get out before the effect of the philter ends. Time to drink it down now!"
        [/message]

        [scroll_to_unit]
            id=Kalenz
        [/scroll_to_unit]

        [sound]
            name=potion.ogg
        [/sound]

        [colour_adjust]
            red=100
            green=100
            blue=100
        [/colour_adjust]

        [delay]
            time=10
        [/delay]

        [colour_adjust]
            red=0
            green=0
            blue=0
        [/colour_adjust]

        [delay]
            time=2000
        [/delay]

        [sound]
            name=lightning.ogg
        [/sound]

        {ADVANCE_UNIT (id=Kalenz) (Elvish Lord)}
        {INVISIBILITY_POTION Kalenz _"Crelanu's philter affecting Kalenz"}

        [store_unit]
            variable=landar_store
            [filter]
                id=Landar
            [/filter]
        [/store_unit]

        {ADVANCE_UNIT (id=Landar) ($landar_store.type)}
        {INVISIBILITY_POTION Landar _"Crelanu's philter affecting Landar"}

        {CLEAR_VARIABLE landar_store}

        [message]
            id=Kalenz
            message= _ "This feels passing strange! Landar, remember to stay far from the wolves-they may be able to smell us."
        [/message]

        #TODO Transfer some of the powers the unit Kalenz came from had -- eg leadership

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

        [scroll_to_unit]
            id=Kalenz
        [/scroll_to_unit]
        {LANDAR_QUAFFS_POTION}
    [/event]

    [event]
        name=die
        [filter]
            id=Great Chief Brurbar
        [/filter]
        [message]
            id=Kalenz
            message=  _ "The orcish chieftain is dead! Now we must make appear he was slain by an orcish hand!"
        [/message]
    [/event]

    [event]
        name=time over
        [message]
            id=Kalenz
            message= _ "We are too late, the potion effects have worn off and we are visible!"
        [/message]
        [message]
            id=Kalenz
            message= _ "With our ruse revealed, the orcs will attack our forests instead of fighting among themselves."
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            x=2
            y=30
            id=Kalenz
        [/filter]
        first_time_only=no

        [if]
            [not]
                [have_unit]
                    id=Great Chief Brurbar
                [/have_unit]
            [/not]
            [then]
                [message]
                    id=Kalenz
                    message=_"Done!"
                [/message]

                [endlevel]
                    carryover_percentage=100
                    result=victory
                    bonus=no
                [/endlevel]
            [/then]
        [/if]
    [/event]

    [event]
        name=victory

        [message]
            id=Ozul
            # wmllint: local spelling da
            message= _ "The Great Chief has been murdered! Whoever did it will only get da throne over my dead stinking body!"
        [/message]
        [message]
            id=Tamitahan
            message= _ "I am the strongest warlord! I will be Chief!"
        [/message]
        [message]
            id=Gvur
            message= _ "No way anyone will steal my throne!"
        [/message]
        [message]
            id=Khrubar
            message= _ "This is my time and I will kill anyone who disputes it!"
        [/message]
        [message]
            id=Kalenz
            message= _ "The plan is working! Now we will take back what's ours!"
        [/message]
    [/event]

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