#textdomain wesnoth-thot

[scenario]
    id=10_The_Siege_of_Kal_Kartha
    name= _ "The Siege of Kal Kartha"
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/10_The_Siege_of_Kal_Kartha.map}"
    turns=35
    next_scenario=11_The_Court_of_Karrag
    victory_when_enemies_defeated=yes

    {DEFAULT_SCHEDULE}

    # The map should be thematically something like a reflection of the one
    # for "At The East Gate", but on a larger scale.  The player’s
    # encampment should be at the west edge.  Kal Kartha will be
    # represented by an underground keep (the West Gate) set into
    # high mountains at the east edge of the map.

    {SCENARIO_MUSIC       the_dangerous_symphony.ogg}
    {EXTRA_SCENARIO_MUSIC loyalists.ogg}
    {EXTRA_SCENARIO_MUSIC northerners.ogg}

    {THOT_TRACK {JOURNEY_STAGE10}}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 140 120 100}
        team_name=good
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}

        # wmllint: recognize Aiglondur
        {CHARACTER_STATS_AIGLONDUR}

        facing=ne
    [/side]

    [side]
        side=2
        controller=ai
        recruit="Dwarvish Fighter,Dwarvish Thunderer"
        {GOLD 320 320 320}
        team_name=good
        user_team_name= _ "Alliance"
        {FLAG_VARIANT knalgan}

        # wmllint: recognize Dulcatulos
        {CHARACTER_STATS_DULCATULOS_AS_LEADER}

        facing=sw

        [ai]
            {NO_SCOUTS}
            passive_leader=yes
            grouping=defensive
            caution=2.0
            recruitment_pattern=fighter,fighter,mixed fighter
            {ATTACK_DEPTH 4 5 5}
        [/ai]
    [/side]
    # wmllint: validate-on

    [side]
        side=3
        controller=ai
#ifdef EASY
        recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Pillager, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Goblin Impaler
#endif
        {GOLD 160 200 240}
        team_name=orcs
        user_team_name=_"Orcs"
        {FLAG_VARIANT6 ragged}

        type=Orcish Warlord
        id=Tan-Morgh
        name= _ "Tan-Morgh"
        profile=portraits/orcs/grunt-2.png
        canrecruit=yes

        facing=sw

        [ai]
            {NO_SCOUTS}
#ifndef HARD
            recruitment_pattern=scout,fighter,fighter,archer
#else
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
#endif
            {ATTACK_DEPTH 4 5 5}

            [leader_goal]
                x,y=44,15   # wants to take the Kal Karthans' keep.
            [/leader_goal]

            [goal]
                name=target
                [criteria]
                    side=2 # wants to kill Kal Karthans
                [/criteria]
                value=4.0
            [/goal]
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
    [/side]

    [side]
        side=4
        controller=ai
        recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Spearman
        {GOLD 160 200 240}
        team_name=orcs
        user_team_name= _ "Orcs"
        {FLAG_VARIANT6 ragged}

        type=Orcish Warlord
        id=Tan-Garukh
        name= _ "Tan-Garukh"
        profile=portraits/orcs/grunt-2.png
        canrecruit=yes

        facing=ne

        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,archer
            {ATTACK_DEPTH 4 5 5}

            [leader_goal]
                x,y=44,15  # wants to take the Kal Karthans' keep.
            [/leader_goal]

            [goal]
                name=target
                value=4.0
                [criteria]
                    side=2 # wants to kill Kal Karthans
                [/criteria]
            [/goal]
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
    [/side]

    [side]
        side=5
        controller=ai
        recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Warrior, Goblin Spearman
        {GOLD 160 200 240}
        team_name=orcs
        user_team_name= _ "Orcs"
        {FLAG_VARIANT6 ragged}

        type=Orcish Warlord
        id=Tan-Wagran
        name= _ "Tan-Wagran"
        profile=portraits/orcs/warlord.png
        canrecruit=yes

        facing=ne

        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,archer
            {ATTACK_DEPTH 4 5 5}

            [leader_goal]
                x,y=44,15  # wants to take the Kal Karthans' keep.
            [/leader_goal]

            [goal]
                name=target
                value=4.0
                [criteria]
                    side=2 # wants to kill Kal Karthans
                [/criteria]
            [/goal]
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 5}

    [label]
        x,y=44,15
        text= _ "West Gate"
    [/label]

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Defeat the orcish leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Aiglondur"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Angarthing"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Dulcatulos"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]

        [recall]
            id=Angarthing
        [/recall]

        [recall]
            id=Ratheln
        [/recall]

        [recall]
            id=Darchas
        [/recall]

        [recall]
            id=Lorinne
        [/recall]

        {MODIFY_UNIT (side=1) facing ne}
    [/event]

    {CONDITIONAL_MAGE_RECRUITING}

    [event]
        name=start

        [message]
            speaker=Angarthing
            message= _ "Behold! The West Gate of Kal Kartha!"
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "And under siege, I see. There is a mighty host of orcs between us and that gate."
        [/message]

        [message]
            speaker=Tan-Morgh
            message= _ "Ahhh... more stinky-midgets, come to get killed just like these cowards in their den."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "Let us bring our kin that orc’s head as a guesting-gift."
        [/message]
    [/event]

    # Dulcatulos gets a castle of reinforcements about the
    # time the orcs will have killed off his first wave.
    [event]
        name=turn 7

        [gold]
            amount=120
            side=2
        [/gold]

        [message]
            speaker=Dulcatulos
            message= _ "Kal Kartha shall not fall!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Dulcatulos
        [/filter]

        [message]
            speaker=Aiglondur
            message= _ "Kal Kartha is taken. Our mission has failed."
        [/message]

        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=enemies defeated

        [message]
            speaker=Dulcatulos
            message=_"Well fought, and our thanks; we were sore pressed. You are our honored guests, and I will show you to the best quarters we have myself. Our lord, the runemaster Karrag, will want to have speech with you on the morrow."
        [/message]

        [message]
            speaker=Angarthing
            message=_"A runemaster? There have been none such since Thursagan’s day. And for one to lead a holding was unheard-of; they tended towards the solitary life."
        [/message]

        [message]
            speaker=Dulcatulos
            message=_"Aye? Well, you’d know such things better than I, loremaster. Our Karrag toiled for long years to recover the craft lore. He was elevated when our old lord fell in battle against the besieging orcs. Karrag himself was wounded near to death; none thought he would recover. But he leads us today, and his runelore has oft been the only shield between us and the orcs."
        [/message]

        [message]
            speaker=Angarthing
            message=_"He has grasped the Hammer of Thursagan, then?"
        [/message]

        [message]
            speaker=Dulcatulos
            message=_"Aye. Toils over it in a workshop in the underlevels with his personal followers. He has promised all of us that the Hammer’s power will smash and scatter all our enemies."
        [/message]

        [message]
            speaker=Angarthing
            message=_"That is strange. The Hammer is a tool of crafting and making, not a weapon. What can he mean to do with it?"
        [/message]

        [message]
            speaker=Dulcatulos
            message=_"That’s for lords and loremasters to worry about, not the likes of me. I must see to my troop’s care. Food will be brought to you; rest well. We will speak again."
        [/message]

        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    {HERODEATH_AIGLONDUR}
    {HERODEATH_ANGARTHING}
    {HERODEATH_RATHELN}
[/scenario]
