#textdomain wesnoth-thot

[scenario]
    id=13_Epilogue
    name= _ "Epilogue"
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/13_Epilogue.map}"
    turns=unlimited
    victory_when_enemies_defeated=no
    theme=Cutscene_Minimal

    {UNDERGROUND}

    {SCENARIO_MUSIC revelation.ogg}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        team_name=good
        user_team_name= _ "Alliance"
        {FLAG_VARIANT knalgan}

        # wmllint: recognize Aiglondur
        {CHARACTER_STATS_AIGLONDUR}

        facing=se
    [/side]

#define KAL_KARTHAN X Y TYPE ID NAME
    [unit]
        type={TYPE}
        id={ID}
        name={NAME}	# wmllint: ignore
        x,y={X},{Y}
        facing=se
    [/unit]
#enddef
    # wmllint: validate-on

    # Various uncorrupted Kal Karthans
    [side]
        side=2
        no_leader=yes
        hidden=yes
        team_name=good
        user_team_name= _ "Kal Karthans"
        {FLAG_VARIANT knalgan}

        # The Kal Karthans.  One has to be named Narithil for the dialog
        # wmllint: recognize Narithil
        {KAL_KARTHAN  6  10  (Dwarvish Fighter)      Glamcatsil ( _ "Glamcatsil")}
        {KAL_KARTHAN  6  11  (Dwarvish Fighter)      Trithdurus ( _ "Trithdurus")}
        {KAL_KARTHAN  6  12  (Dwarvish Fighter)      Althasol   ( _ "Althasol")}
        {KAL_KARTHAN  7  10  (Dwarvish Thunderer)    Dulalas    ( _ "Dulalas")}
        {KAL_KARTHAN  7  11  (Dwarvish Steelclad)    Pelalsol   ( _ "Pelalsol")}
        {KAL_KARTHAN  7  12  (Dwarvish Steelclad)    Aigthaing  ( _ "Aigthaing")}
        {KAL_KARTHAN  7  13  (Dwarvish Thunderguard) Pelcatol   ( _ "Pelcatol")}
        {KAL_KARTHAN  11 11  (Dwarvish Lord)         Narithil   ( _ "Narithil")}
        {KAL_KARTHAN  11 12  (Dwarvish Lord)         Glamdrsol  ( _ "Glamdrsol")}
        {KAL_KARTHAN  10 9   (Dwarvish Steelclad)    Pelaithil  ( _ "Pelaithil")}
        {KAL_KARTHAN  10 13  (Dwarvish Dragonguard)  Alaithus   ( _ "Alaithus")}
    [/side]

    # Pelias
    [side]
        side=3
        no_leader=yes
        hidden=yes
        team_name=good
        user_team_name= _ "Alliance"
        {FLAG_VARIANT knalgan}

        [unit]
            type=Lancer
            id=Pelias
            name=_"Pelias"
            profile=portraits/pelias.png
            x,y=12,13
            facing=ne
        [/unit]
    [/side]

    {PLACE_IMAGE "scenery/dwarven-doors-closed.png" 18 11}

    {PLACE_IMAGE "scenery/monolith2.png" 12 10}
    {PLACE_IMAGE "scenery/monolith2.png" 12 12}

    [event]
        name=prestart

        [store_unit]
            [filter]
                id=Pelias
            [/filter]
            variable=pelias_store
            kill=yes
        [/store_unit]

        [recall]
            id=Angarthing
            x,y=16,10
        [/recall]

        [recall]
            id=Ratheln
            x,y=16,12
        [/recall]

        [recall]
            id=Dulcatulos
            x,y=16,12
        [/recall]

        {RECALL_VETERAN (Dwarvish Lord)        17 10}
        {RECALL_VETERAN (Dwarvish Dragonguard) 17 13}

        {MODIFY_UNIT side=1 facing sw}

        [lock_view][/lock_view]
    [/event]

    [event]
        name=start

        [message]
            speaker=Angarthing
            message= _ "Dwarves of Kal Kartha, I speak the Law. Your house is cast down; you have harbored a great evil. Who now will take the burden of cleansing this holding of its taint?"
        [/message]

        [message]
            speaker=narrator
            message= _ "The dwarves of Kal Kartha muttered among themselves and looked at one another uneasily. None stepped forward."
            image=wesnoth-icon.png
        [/message]

        [message]
            speaker=Dulcatulos
            message= _ "Loremaster... None of us is fit to take up the lordship. Karrag fooled us all, made us the tools of his foul scheme."
        [/message]

        [delay]
            time=1000
        [/delay]

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

        [move_unit_fake]
            type=$pelias_store.type
            side=$pelias_store.side
            x= 4, 7, 7,12
            y=19,18,16,13
            force_scroll=no
        [/move_unit_fake]

        [unstore_unit]
            variable=pelias_store
        [/unstore_unit]

        [message]
            speaker=Pelias
            message=_"I was told I’d find Aiglondur of Knalga here. I bear a message from Tallin, the Lord Protector of the Alliance."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "I am he. Speak your message."
        [/message]

        [message]
            speaker=Pelias
            # wmllint: local spelling Tan-Malgar
            message= _ "I have been on your track for weeks. Word of your rout of Tan-Malgar and his allies spread, and reached Tallin. You did the Alliance better service than you knew that day; Tan-Malgar had exchanged messages with certain orcish chieftains within the Alliance, and your victory prevented a dangerous revolt."
        [/message]

        [message]
            speaker=Pelias
            message= _ "Aiglondur, the Protector dubs you a Lord Companion of the Alliance. He bids you return to Knalga as soon as convenient, for your investiture."
        [/message]

        [message]
            speaker=Dulcatulos
            message= _ "(<i>Wonderingly</i>) A Lord Companion? And kin of ours..."
        [/message]

        [message]
            speaker=Narithil
            message= _ "It would be no shame for a Lord Companion to rule this holding, as Hamel does at Knalga."
        [/message]

        [message]
            speaker=narrator
            message= _ "The Kal Karthans looked at each other, and Aiglondur, with dawning hope."
            image=wesnoth-icon.png
        [/message]

        [message]
            speaker=Angarthing
            message= _ "It would be fitting. The Loremasters will approve."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "Pelias, my thanks to the Lord Protector; I will attend him in the spring. But it seems that I have some work to do here first."
        [/message]

        [hide_unit][/hide_unit]

        [remove_item]
            x=18,12,12
            y=11,10,12
        [/remove_item]

        {FADE_TO_BLACK_HOLD 500}

        [unlock_view][/unlock_view]

        [endlevel]
            carryover_report=no
            replay_save=no
            linger_mode=no
        [/endlevel]
    [/event]
[/scenario]

#undef KAL_KARTHAN
