#textdomain wesnoth-nr

[scenario]
    id=08a_Elvish_Princess
    name= _ "Elvish Princess"
    map_file=08a_Elvish_Princess.map
    {TURNS 21 18 15}
    next_scenario=09a_Introductions
    victory_when_enemies_defeated=no

    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC "knalgan_theme.ogg" "breaking_the_chains.ogg"}
    {EXTRA_SCENARIO_MUSIC "elvish-theme.ogg"}
    {EXTRA_SCENARIO_MUSIC "nunc_dimittis.ogg"}

    # wmllint: local spelling Bitterhold
    [story]
        [part]
            story= _ "After securing the help of the two lich-mages, the party returned to Knalga."
            {NR_BIGMAP}
            {REVOLT_STAGE6}
        [/part]

        {STORY_PART_HAMEL (_ "Och, that was a piece o’ good work, lad, getting both the lich-mages and Stalrag on our side. Now let’s plan our way to bringing Rakshas down...")}
        [part]
            story= _ "The lich-mages sent forth gryphons to scout out the number, formation and deployment of the orcish forces, and to seek allies as well."
        [/part]
        [part]
            story= _ "One day a gryphon came screeching into the caves with the news that a large elvish force approached from the east. Messages were quickly dispatched to the elves asking their purpose. The haughty reply was that their purpose was none of any dwarf’s or human’s business, and that all would be well-advised to stay in their holes when the elves passed near."
        [/part]
        [part]
            story= _ "Before the humans and dwarves could respond to this message, another gryphon arrived with the news that the orcs were holding an elvish sorceress prisoner in the castle of Bitterhold, less than a day’s march to the northwest. The castle had attracted notice because it had been recently rebuilt and manned by a force known to include some of the hardiest and toughest of veteran orcs."
        [/part]
        [part]
            story= _ "Gryphons and a picked force of human woodsmen were sent out that very night, and less than two days later managed to ambush an orcish messenger on the road out of Bitterhold. The messenger was carrying a ransom demand to the elves — for the sorceress was, in fact, a princess of the highest rank."
        [/part]
        [part]
            story= _ "The leaders met in council, considering what to do..."
        [/part]

        {STORY_PART_TALLIN (_ "This kidnapped princess explains a great deal. It is not easy to draw the elves out of their forests.")}

        {STORY_PART_HAMEL (_ "Aye, lad. Her kin will have come either to do battle or pay ransom. By the looks of things, they’ve busked themselves for either.")}
        # wmllint: local spelling Pah
        {STORY_PART_ARTHIAN (_ "Pah! Who cares? Let the elves and orcs chop each other into mincemeat. It will just make things easier for us.")}

        {STORY_PART_STALRAG (_ "Hah! Yer brain has rotted awa’ entire. Think on it, skull-head, what would happen if the elves dinna’ fight and pay the ransom instead?")}

        {STORY_PART_ARTHIAN (_ "Do you want to die, dwarf?")}

        {STORY_PART_FATHER_MORVIN (_ "Peace, peace! If you two want to kill something, there are plenty of orcs outside.")}

        {STORY_PART_FATHER_MORVIN (_ "But you do have a point, Stalrag. That ransom will buy more troops and weapons for the orcs, and that is bad news for us.")}

        {STORY_PART_TALLIN (_ "I think we have a chance to make some new allies here...")}

        {STORY_PART_HAMEL (_ "Allies? I take it we’re to go to them and ask them to join us in return for our help in rescuing their princess? You heard their message — those elves have got their noses so high in the air they canna’ see over them. They wouldna’ ally themselves with the likes o’ us.")}

        {STORY_PART_TALLIN (_ "Of course we won’t do that. As a matter of fact I think it’s best that we don’t say anything to the elves at all.")}

        {STORY_PART_STALRAG (_ "Why d’ye say that?")}

        {STORY_PART_TALLIN (_ "Well, suppose we do join up with the elves — assuming they will let us — and we make a combined raid on the fortress, what will the orcs most likely do when the ransom slips from their grasp?")}

        {STORY_PART_HAMEL (_ "Kenning the way of orcs, they’d kill the princess, especially if it seems the rescue ha’ any chance of succeeding.")}

        {STORY_PART_TALLIN (_ "Exactly. On the other hand, if we raided the fortress while the orcs were talking ransom with the elves, the orcs might hesitate just long enough for us to free her.")}

        {STORY_PART_HAMEL (_ "Hmmm... I think you’ve the right of it, lad. Most orcs being thicker than a wood-knot, I’d lay odds on Rakshas giving strict orders that she not be touched without his direct word on the matter.")}

        {STORY_PART_TALLIN (_ "But it would be unwise to trust that the orcs will stay stupid forever. If we do go ahead with this raid, we are going to have to be in and out like lightning.")}
        #  po: My shinsplitters are invaluable for this kind of job. They are brave warriors and don't stop fighting until either they or their opponent lies dead. No fortress can stand against them.
        {STORY_PART_STALRAG (_ "My Shinsplitters be invaluable for this kind o’ job. They be braw warriors and dinna stop their assault till either they or their opponent lie dae. Nae a fortress ken stand against them.")}

        {STORY_PART_ARTHIAN (_ "Ha ha, I like this plan! Once we get our hands on this little sorceress the elves will be forced to do whatever we want them to!")}

        {STORY_PART_FATHER_MORVIN (_ "Remember, Ro’Arthian, we need willing allies rather than resentful lackeys that would turn on us at the first chance. If we rescue their princess, the elves may yet choose not to help us, but that is a risk we’ll have to take.")}

        {STORY_PART_SISTER_THERA (_ "Elves are deeply honor-bound, especially in matters that touch their kin. If we rescue the princess, I am certain the deed will not go without reward.")}

        {STORY_PART_TALLIN (_ "And at the very least, the orcs will not be able to raise troops with ransom money they don’t have.")}

        {STORY_PART_ARTHIAN (_ "Bah... weak, soft humans. Have it your way if you must.")}

        {STORY_PART_HAMEL (_ "So it shall be, Tallin, I’ll hold the caves here while you and Stalrag’s Shinsplitters fare to Bitterhold. The orcs still haven’t given up their attack on our southern tunnels.")}

        {STORY_PART_TALLIN (_ "Then to arms, men!")}
    [/story]

    {NR_TRACK {RECOVERY_STAGE1}}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit=Thug,Poacher,Spearman,Bowman,Gryphon,Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Ulfserker,Dwarvish Scout,Footpad
        team_name=knalgans
        user_team_name= _ "Knalgans"

        # wmllint: recognize Tallin
        {CHARACTER_STATS_TALLIN}
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        recruit=Orcish Grunt,Orcish Archer,Wolf Rider,Orcish Assassin,Troll Whelp
        {GOLD 300 400 500}
        {INCOME 15 20 25}
        team_name=Orcs
        user_team_name= _ "Orcs"
        {FLAG_VARIANT6 ragged}

        type=Orcish Warlord
        id=Atul
        name= _ "Atul"
        canrecruit=yes
    [/side]

    # Dummy side for guarding units
    [side]
        side=3
        no_leader=yes
        hidden=yes
        team_name=Orcs
        user_team_name= _ "Orcs"

        {GENERIC_UNIT 3 "Orcish Warlord" 4 13} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warlord" 6 18} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warlord" 15 12} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warlord" 13 20} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warlord" 8 17} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warlord" 11 17} {GUARDIAN}

        {GENERIC_UNIT 3 "Orcish Slurbow" 6 11} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Slurbow" 4 12} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Slurbow" 17 13} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Slurbow" 16 17} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Slurbow" 10 19} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Slurbow" 7 20} {GUARDIAN}

        {GENERIC_UNIT 3 "Orcish Warrior" 13 10} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 20 15} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 10 11} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 6 14} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 14 15} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 13 17} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 9 13} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 8 14} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 10 14} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 3 15} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 5 18} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 11 20} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Warrior" 14 16} {GUARDIAN}

        {GENERIC_UNIT 3 "Orcish Crossbowman" 9 15} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 14 19} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 8 13} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 10 13} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 15 14} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 4 16} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 16 19} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 14 12} {GUARDIAN}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 17 14} {GUARDIAN}
    [/side]

    {STARTING_VILLAGES 1 5}
    {STARTING_VILLAGES_AREA 2 15 17 12}

    {PLACE_PRISONER_IMAGE units/elves-wood/sorceress.png 9 14}

    {PLACE_IMAGE scenery/dwarven-doors-closed.png 19 1}

    {PLACE_IMAGE items/bonestack.png 6 13}
    {PLACE_IMAGE items/bonestack.png 7 16}
    {PLACE_IMAGE items/bonestack.png 24 15}
    {PLACE_IMAGE items/grain-sheaf.png 22 9}

    {PLACE_IMAGE scenery/oak-leaning.png 1 4}
    {PLACE_IMAGE scenery/oak-leaning.png 14 7}
    {PLACE_IMAGE scenery/oak-leaning.png 26 6}
    {PLACE_IMAGE scenery/monolith4.png 16 10}

    [event]
        name=prestart

        {RECALL_SUPPORTER}

        {RECALL_OR_REPLACE id=Abhai}

        {RECALL_OR_REPLACE id=Camerin}

        [recall]
            id=Father Morvin
        [/recall]

        [recall]
            id=Sister Thera
        [/recall]

        {RECALL_OR_REPLACE id=Krash}

        {RECALL_OR_REPLACE id=Elenia}

        [if]
            [have_unit]
                #wmllint: recognize Stalrag
                id=Stalrag
                search_recall_list=yes
            [/have_unit]
            [then]
                [recall]
                    id=Stalrag
                [/recall]
            [/then]
            [else]
                [unit]
                    type=Dwarvish Lord
                    id=Stalrag
                    name= _ "Stalrag"
                    profile=portraits/Stalrag.webp
                    x,y=15,2
                    side=1
                    [modifications]
                        {TRAIT_LOYAL}
                        {TRAIT_HEALTHY}
                    [/modifications]
                [/unit]
            [/else]
        [/if]

        [if]
            [have_unit]
                #wmllint: recognize "Ro'Arthian"
                id="Ro'Arthian"
                search_recall_list=yes
            [/have_unit]
            [then]
                [recall]
                    id="Ro'Arthian"
                [/recall]
            [/then]
            [else]
                [unit]
                    type=Ancient Lich
                    id="Ro'Arthian"
                    name= _ "Ro’Arthian"
                    profile=portraits/Arthian.webp
                    x,y=15,2
                    side=1
                    [modifications]
                        {TRAIT_UNDEAD}
                        {TRAIT_LOYAL_HERO}
                    [/modifications]
                [/unit]
            [/else]
        [/if]

        [if]
            [have_unit]
                #wmllint: recognize "Ro'Sothian"
                id="Ro'Sothian"
                search_recall_list=yes
            [/have_unit]
            [then]
                [recall]
                    id="Ro'Sothian"
                [/recall]
            [/then]
            [else]
                [unit]
                    type=Lich
                    id="Ro'Sothian"
                    name= _ "Ro’Sothian"
                    profile=portraits/Ro_Sothian.webp
                    x,y=15,2
                    side=1
                    [modifications]
                        {TRAIT_UNDEAD}
                        {TRAIT_LOYAL_HERO}
                    [/modifications]
                [/unit]
            [/else]
        [/if]

        [objectives]
            side=1
            [objective]
                description= _ "Rescue the Princess"
                condition=win
            [/objective]

            [objective]
                {ALTERNATIVE_OBJECTIVE_CAPTION}
                description= _ "Resist for as long as you can"
                show_turn_counter=yes
                condition=win
            [/objective]

            [objective]
                description= _ "Death of Tallin"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Arthian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Sothian"
                condition=lose
            [/objective]

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

            [note]
                description= _ "Even if your rescue fails, you will still advance to the next scenario."
            [/note]
            [note]
                description= _ "You will win this scenario immediately upon moving onto the hex containing the Princess’s cage."
            [/note]
        [/objectives]
    [/event]

    [event]
        name=start

        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "Upon emerging from the mouth of a hidden tunnel near the fortress, Tallin and his men surveyed the scene before them."
        [/message]

        [message]
            speaker=Tallin
            message= _ "There’s the fortress of Bitterhold. A grim and impressive pile indeed..."
        [/message]

        [message]
            role=Supporter
            message= _ "They have dammed the river to make a moat for their castle."
        [/message]

        [message]
            speaker="Ro'Arthian"
            message= _ "Are we here to sight-see or to rescue this blasted sorceress? If you really want to sight-see, then check out that orcish encampment south of us."
        [/message]

        [message]
            speaker=Tallin
            message= _ "Just our luck to be here when they’re mustering a field force — probably to attack the caves. Avoid them if you can, kill them if you can’t."
        [/message]

        [message]
            speaker=Atul
            message= _ "INTRUDERS! KILL THEM!!"
        [/message]
    [/event]

    # Freeing Eryssa event - victory proceed to introductions
    [event]
        name=moveto
        [filter]
            side=1
            x,y=9,14
        [/filter]

        [fire_event]
            name=free prisoner
        [/fire_event]
    [/event]

    [event]
        name=free prisoner

        [remove_item]
            x,y=9,14
        [/remove_item]

        [unit]
            side=1
            type=Elvish Sorceress
            id=Eryssa
            name= _ "Eryssa"
            unrenamable=yes
            profile=portraits/Eryssa.webp
            x,y=9,14
            [modifications]
                {TRAIT_LOYAL_HERO}
                {TRAIT_DEXTROUS}
            [/modifications]
        [/unit]

        [message]
            race=orc
            message= _ "The intruders are breaking in! Get to the walls and defend the fortress! And where did that elvish princess go?"
        [/message]

        [message]
            speaker=Eryssa
            message= _ "(<i>hushed</i>) Thank you, my saviors. Who has come to rescue me from vile captivity?"
        [/message]

        [message]
            speaker=Tallin
            # wmllint: local spelling outta
            message= _ "(<i>whispering</i>) Later, my lady, first let’s get outta — uh, let us take our leave of this place as swiftly as may be!"
        [/message]

        [message]
            speaker=Eryssa
            message= _ "Lead; I will follow."
        [/message]

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

    # Didn't make it in time, still victory but go to stolen gold
    [event]
        name=time over

        [if]
            [have_unit]
                side=2,3
            [/have_unit]
            [then]
                [message]
                    race=orc
                    message= _ "Hey, those intruders are going to free the elf! We can’t let that happen! Kill her! Kill the elf!"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Darn it! We weren’t fast enough."
                [/message]

                [endlevel]
                    result=victory
                    # Skipping one scenario
                    next_scenario=10a_Stolen_Gold
                [/endlevel]
            [/then]
            [else]
                # Player actually won, but didn't manage in time to free her.
                # Let's do as if he would have.
                [fire_event]
                    name=free prisoner
                [/fire_event]
            [/else]
        [/if]
    [/event]

    # Load death events
    {HERODEATH_EVERYONE}
[/scenario]
