#textdomain wesnoth-thot
[scenario]
    name=_"The Court of Karrag"
    id="11_The_Court_of_Karrag"
    next_scenario="12_The_Underlevels"
    victory_when_enemies_defeated=yes
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/the_court_of_karrag.map}"
    {DEFAULT_SCHEDULE}
    turns=12	# BALANCE

    # This scenario will take place on a throneroom map which is, effectively,
    # all castle.  It should have two keep hexes on it, one near the front
    # for our heroes and one at the rear for Karrag. Features of the
    # map must include an indication of a doorway in the cave wall near the
    # rear dais.  The throneroom map should in general look like a distorted
    # mirror image of Hamel's, but with the braziers unlit.
    #
    # Aiglondur, Angarthing, and a few of their veteran followers face Karrag,
    # flanked by several of his followers.  Dulcatulos escorts our heroes.
    # Karrag's group should have black team disks and Dulcatulos a blue one.

    {SCENARIO_MUSIC "the_king_is_dead.ogg"}	# No story part
    {EXTRA_SCENARIO_MUSIC "revelation.ogg"}
    {EXTRA_SCENARIO_MUSIC "transience.ogg"}

    [side]
        type="Dwarvish Fighter"
        id="Aiglondur"
        name=_"Aiglondur"
        canrecruit="1"
        side="1"
        controller="human"
        team_name="good"
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}
        fog="no"
        shroud="no"
        recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 140 120 100}	# BALANCE
    [/side]

    [side]
        type="Dwarvish Rune Lord"
        id="Karrag"
        name=_"Karrag"
        profile=portraits/karrag.png
        canrecruit="1"
        side="2"
        colour=black
        facing=sw
        controller="ai"
        team_name="evil"
        user_team_name=_"Kal Karthans"
        fog="no"
        shroud="no"
        recruit="Dwarvish Masked Fighter,Dwarvish Masked Thunderer,Dwarvish Ulfserker"
        [ai]
            {NO_SCOUTS}
            passive_leader=yes
            grouping=defensive
            recruitment_pattern=fighter,fighter,mixed fighter
            {ATTACK_DEPTH 4 5 5}
        [/ai]
        {GOLD 280 240 200}	# BALANCE
    [/side]

    [side]
        # The uncorrupted Kal Karthans (which is to say Dulcatulos)
        side=3
        colour=blue
        no_leader=yes
        team_name=good
        user_team_name=_"Kal Karthans"
    [/side]

    {campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}

    {SET_RIGHTEOUS_FLAME_EVENT}

    [event]
        name="prestart"
        {PLACE_IMAGE "scenery/rune1-glow.png" 14 8}
        {PLACE_IMAGE "scenery/rune2-glow.png" 9  9}
        {PLACE_IMAGE "scenery/rune3-glow.png" 17 9}
        {PLACE_IMAGE "scenery/rune4-glow.png" 9  14}
        {PLACE_IMAGE "scenery/rune5-glow.png" 14 13}
        {PLACE_IMAGE "scenery/rune6-glow.png" 17 14}
        {PLACE_IMAGE "scenery/dwarven-doors-closed.png" 18 11}

        [recall]
            id="Angarthing"
        [/recall]

        [recall]
            id="Ratheln"
        [/recall]

        [unit]
            type=Dwarvish Steelclad
            id=Dulcatulos
            name= _ "Dulcatulos"
            profile=portraits/dulcatulos.png
            {IS_HERO}
            side=3
            x,y=10,9
        [/unit]

        {RECALL_VETERAN (Dwarvish Dragonguard) 11 11}
        {RECALL_VETERAN (Dwarvish Lord) 11 12}

        # Karrag's throne guards

        [unit]
            type=Dwarvish Masked Steelclad
            id=Gog
            name=_ "Masked Dwarf"
            side=2
            x,y=16,10
            facing=sw
        [/unit]

        [unit]
            type=Dwarvish Masked Steelclad
            id=Magog
            name=_ "Masked Dwarf"
            side=2
            x,y=16,12
            facing=sw
        [/unit]

        [unit]
            type=Dwarvish Ulfserker
            id=Hekyll
            name=_ "Masked Dwarf"
            side=2
            x,y=15,10
            facing=sw
        [/unit]

        [unit]
            type=Dwarvish Ulfserker
            id=Jekyll
            name=_ "Masked Dwarf"
            side=2
            x,y=15,13
            facing=sw
        [/unit]

        [objectives]
            side="1"
            [objective]
                description=_"Defeat Karrag"
                condition="win"
            [/objective]
            [objective]
                description=_"Death of Aiglondur"
                condition="lose"
            [/objective]
            [objective]
                description=_"Death of Angarthing"
                condition="lose"
            [/objective]
            [objective]
                description=_"Time runs out"
                condition="lose"
            [/objective]

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

    # wmllint: directory spelling Karthans
    [event]
        name="start"

        {CONDITIONAL_MAGE_RECRUITING}

        [message]
            speaker="Aiglondur"
            message={WHISPER _"Psst, Angarthing...Karrag and those dwarves on the dais, they're all <i>masked</i>."}
        [/message]

        [message]
            speaker="Angarthing"
            message={WHISPER _"I see it. There is something very wrong here."}
        [/message]

        [message]
            speaker="Karrag"
            message=_"Hail, fellow dwarves. All Kal Kartha thanks you for your timely rescue."
        [/message]

        [message]
            speaker="Aiglondur"
            message=_"We are from Knalga; your clans are kin to ours of old. We but did our duty to kin."
        [/message]

        [message]
            speaker="Karrag"
            message=_"All dwarves are kin, and must prevail against orcs and humans and other dirtgrubbers. You can be part of the fist that smites them."
        [/message]

        [message]
            speaker="Angarthing"
            message=_"We did not come to smite anyone, but to re-open contact and trade."
        [/message]

        [message]
            speaker="Karrag"
            message=_"Trade? Your destruction of the besieging orcs was a far nobler act than trade. There can be more such victories. And there will be by the power of our ancient heirloom, the Hammer of Thursagan. "
        [/message]

        [message]
            speaker="Angarthing"
            message=_"It is remembered in Knalga that Kal Kartha holds the Hammer."
        [/message]

        [message]
            speaker="Karrag"
            message=_"Yes! And the Hammer holds the soul of the dwarves, the true people. Together, we can march to greater victories! Will you of Knalga join me?"
        [/message]

        [message]
            speaker="Angarthing"
            message=_"On one condition. You must take off that mask and show your true face. I am a witness."
        [/message]

        [message]
            speaker="Karrag"
            message=_"You...do not wish to see what is beneath this mask. I was terribly wounded in an orcish attack. Disfigured."
        [/message]

        [message]
            speaker="Angarthing"
            message=_"But the Law must see. A dwarf must put his name and his face behind his deeds. I am a witness."
        [/message]

        [message]
            speaker="Karrag"
            message=_"Impertinent fool! It is not for you to dictate to a lord in his own holding, much less one who holds the very soul of the dwarves in his hand."
        [/message]

        [message]
            speaker="Angarthing"
            message=_"The Law speaks. Against him with the eyes to see, no deception can hold. I AM A WITNESS!"
        [/message]

        [store_unit]
            [filter]
                id=Karrag
            [/filter]

            kill=yes
            variable=stored_Karrag
        [/store_unit]

        [unit]
            type=Lich
            id=Karrag
            name=_"Karrag"
            canrecruit=yes
            side=2
            facing=sw
            x,y=$stored_Karrag.x,$stored_Karrag.y
        [/unit]

        [sound]
            name=lich-hit-1.ogg
        [/sound]

        {CLEAR_VARIABLE stored_Karrag}

        [redraw]
        [/redraw]

        [message]
            speaker="Dulcatulos"
            message=_"No...no...it is horrible! My lord, how did you come to this?"
        [/message]

        [message]
            speaker="Karrag"
            message=_"I lingered for weeks in agony. Only my hatred and the runelore of old sustained me, until I became as I am. I will have revenge; I will destroy the orcs, and the humans, and the elves, and all but the true people!"
        [/message]

        [message]
            speaker="Karrag"
            message=_"And you have sealed your doom. Hundreds of dirtgrubbers have already died to weave a web of blood around the Hammer and the soul of the dwarves. You and your new friends will be the last sacrifices I require to bind the entire dwarvish race to my purpose. TAKE THEM!"
        [/message]

        {MODIFY_UNIT id=Dulcatulos side 1}

        [message]
            speaker=narrator
            message=_"Neither side can recruit or recall. You must win with the troops you have."
            image=wesnoth-icon.png
        [/message]
    [/event]

    [event]
        name="die"
        [filter]
            id=Karrag
        [/filter]

        [delay]
            time=500	# Dramatic pause
        [/delay]

        [message]
            speaker=Angarthing
            message=_"Wait...the lich's apparent death was another illusion. In truth he ran through that doorway behind the throne."
        [/message]

        [message]
            speaker=Dulcatulos
            message=_"Then Karrag has fled to the underlevels. None but his masked ones go there any more."
        [/message]

        [message]
            speaker=Angarthing
            message=_"We must follow. Quickly! It may be his talk of perverting the Hammer was merely mad raving, but we cannot allow the risk that his foul spell might succeed."
        [/message]

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

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

        [message]
            speaker=Aiglondur
            message=_"Without Dulcatulos to explain our actions to the Kal Karthans we'll have to fight them, too. Our mission has failed."
        [/message]

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