#textdomain wesnoth-trow
[scenario]
    id=04b_The_Midlands
    name= _ "The Midlands"
    next_scenario=05_The_Oldwood
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/04b_The_Midlands.map}"
    {TURNS 45 42 39}
    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC wanderer.ogg}
    {EXTRA_SCENARIO_MUSIC knolls.ogg}

    [story]
        [part]
            # Same as in 04a!
            story= _ "So it came to pass that Prince Haldric was forced from his home, never to return. With the help of his father’s noble sacrifice he has escaped through the southern pass. Haldric has left the lands of his home, and before him stretches the vast expanse of the southern kingdoms of his people."

            background=story/trow_story_04-Fall_of_Eldaric.jpg
            music=underground.ogg
        [/part]
        [part]
            story= _ "To the southwest lay the Midlands. These were prosperous kingdoms, nestled between hill and forest. These had been the breadbasket of the Green Isle, exporting lumber and gemstones as well. The Midland kingdoms fed the city of Southbay, the largest city on the Isle. The coming of the Orcs threatened to lay waste to all this."
            background=story/trow_story_04b-The_Midlands.jpg
        [/part]
    [/story]

    {TROW_GI_TRACK {JOURNEY_04B_NEW} }

    {TROW_DEATHS}

    [side]
        type=Noble Commander
        id=Prince Haldric
        name= _ "Prince Haldric"
        unrenamable=yes
        side=1
        canrecruit=yes
        gold=100
        controller=human
        team_name=Haldric
        user_team_name=_"Refugees"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Vrodis
        name= _ "Tan-Vrodis"
        #This is the nearest enemy, make him softer.
        side=2
        canrecruit=yes
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        {GOLD 70 110 160}
        user_team_name=_"Orcs"
        team_name=orcs
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Bok
        name= _ "Tan-Bok"
        profile="portraits/orcs/grunt-3.png"
        side=3
        canrecruit=yes
        {GOLD 110 150 190}
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        [ai]
            time_of_day=first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman
#endif

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

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Spearman, Goblin Impaler
#endif
        team_name=orcs
        user_team_name=_"Orcs"
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Hogar
        name= _ "Tan-Hogar"
        profile="portraits/orcs/grunt-2.png"
        side=4
        canrecruit=yes
        {GOLD 110 150 190}
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        [ai]
            time_of_day=first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman
#endif

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

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Warrior, Orcish Crossbowman, Goblin Spearman, Goblin Impaler
#endif
        team_name=orcs
        user_team_name=_"Orcs"
    [/side]

    [event]
        name=prestart
        {PLACE_IMAGE (scenery/signpost.png) 31 22}
        {PLACE_IMAGE (scenery/signpost.png) 18 15}

        [recall]
            id=Lady Outlaw
        [/recall]

        [recall]
            id=Burin the Lost
        [/recall]

        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Prince Haldric"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

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

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "Prince Haldric leads his refugee band into the Midlands and smoke is in the air."
            image=wesnoth-icon.png
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "It is as we suspected, the orcs have sacked the Midlands. This is not a civilized way to fight a war! Look there, there are still orcs about... To arms!"
            image=portraits/haldric-annoyed.png
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "All right! Charge!"
        [/message]

        [message]
            speaker=Lady Outlaw
            message= _ "Feel my wrath, you orcish scum!"
        [/message]

        [message]
            speaker=Tan-Vrodis
            message= _ "HUMANS... I see humans!"
        [/message]

        [message]
            speaker=Tan-Bok
            # wmllint: local spelling Hogar
            message= _ "Ha, Hogar! You said we wouldn’t see any action this far back from the front."
        [/message]

        [message]
            speaker=Tan-Hogar
            message= _ "Shut yer mouth! Let’s just get ’em."
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=31
            y=22
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            # wmllint: local spelling SE
            message= _ "SE — The Oldwood. Enter at Your Own Risk!"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=18
            y=15
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            # wmllint: local spelling SW
            message= _ "SW — Southbay."
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=attack

        [filter_second]
            id=Tan-Bok
        [/filter_second]

        [event]
            name=new turn

            [move_unit_fake]
                type=Goblin Knight
                side=3
                x=12,12
                y=38,37
            [/move_unit_fake]

            {NAMED_LOYAL_UNIT 3 (Goblin Knight) 12 37 (Grilg) ( _ "Grilg")}

            {LOYAL_UNIT 3 (Wolf Rider) 11 38}
            {LOYAL_UNIT 3 (Wolf Rider) 13 38}
#ifdef HARD
            {LOYAL_UNIT 3 (Goblin Pillager) 12 38}
#endif

            [message]
                speaker=Grilg
                message= _ "What? More humans here? Get them!"
            [/message]
        [/event]
    [/event]

    [event]
        name=attack

        [filter_second]
            id=Tan-Hogar
        [/filter_second]

        [event]
            name=new turn

            [move_unit_fake]
                type=Orcish Slayer
                side=4
                x=37,36
                y=38,37
            [/move_unit_fake]

            {NAMED_LOYAL_UNIT 4 (Orcish Slayer) 36 37 (Vrogar) ( _ "Vrogar")}
            [+unit]
                facing=nw
            [/unit]

            {LOYAL_UNIT 4 (Orcish Assassin) 35 38}
            {LOYAL_UNIT 4 (Orcish Assassin) 37 38}
#ifdef HARD
            {LOYAL_UNIT 4 (Orcish Crossbowman) 36 38}
#endif

            [message]
                speaker=Vrogar
                message= _ "They’re attacking the chief! Kill the meat before it gets any farther!"
            [/message]
        [/event]
    [/event]

    [event]
        name=die
        [filter]
            id=Tan-Bok
        [/filter]

        [message]
            speaker=Tan-Hogar
            message= _ "Better him than me! Reserves!"
        [/message]

        [gold]
            side=4
            amount=80
        [/gold]
    [/event]

    [event]
        name=die
        [filter]
            id=Tan-Hogar
        [/filter]

        [message]
            speaker=Tan-Bok
            message= _ "Hogar was a fool! Reserves!"
        [/message]

        [gold]
            side=3
            amount=80
        [/gold]
    [/event]

    [event]
        name=enemies defeated

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

        [unit]
            side=1
            type=Knight
            id=Sir Ladoc
            name= _ "Sir Ladoc"
            profile="portraits/ladoc.png"
            unrenamable=yes
            x=40
            y=15
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [redraw]
            side=1
        [/redraw]

        {MOVE_UNIT (id=Sir Ladoc) 35 15}

        [message]
            speaker=Sir Ladoc
            message= _ "Hold there! You cannot pass. You’ve already stumbled on the orcish rear guard. The main body of their forces is on the road to Southbay. It is an army of nightmarish size."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "I’m Haldric, my father was King Eldaric IV in the lands northwest of here. Soldier, aren’t you on the wrong side of the lines?"
        [/message]

        [message]
            speaker=Sir Ladoc
            message= _ "They overran my post. I got hit on the head pretty good. When I came to the orcish army had already passed my position."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Tell me, how fares Southbay?"
        [/message]

        [message]
            speaker=Sir Ladoc
            message= _ "Southbay won’t fall without one hell of a fight, sir. They’ll stand to the last! I only wish I was there!"
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Well, we can’t go back, and the road ahead is blocked... I guess we’ll have to risk it and go through the Oldwood forest, then make a break for Clearwater Port."
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "Oh great, now a forest. I should have stayed at home and taken my chances with the orcs!"
            image=portraits/burin-annoyed.png
        [/message]

        [message]
            speaker=Sir Ladoc
            message= _ "Sir, if you don’t mind, I’ll go with you."
        [/message]

        [message]
            speaker=Lady Outlaw
            message= _ "On we go..."
        [/message]
        [set_variable]
            name=last_done
            value="Midlands"
        [/set_variable]

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

    [event]
        name=time over
        [message]
            speaker=Prince Haldric
            message= _ "We have run out of time... We’ll be trapped in the midlands when winter comes!"
        [/message]
    [/event]
[/scenario]
