#textdomain wesnoth-trow
[scenario]
    id=05_The_Oldwood
    name= _ "The Oldwood"
    next_scenario=06_Temple_in_the_Deep
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/05_The_Oldwood.map}"
    {TURNS 35 32 29}
    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC suspense.ogg}
    {EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}

    # No story part
    {TROW_GI_TRACK {JOURNEY_05_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"
        fog=yes
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Gralg
        name= _ "Tan-Gralg"
        profile=portraits/orcs/grunt-3.png
        side=2
        canrecruit=yes
        {GOLD 160 220 280}
        [ai]
            {NO_SCOUTS}
#ifdef EASY
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
#else
            recruitment_pattern=scout,mixed fighter,archer
#endif
            {ATTACK_DEPTH 4 5 5}
        [/ai]
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Goblin Pillager
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Goblin Pillager
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Orcish Slayer, Goblin Pillager
#endif
        team_name=orcs
        user_team_name=_"Orcs"
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Rugar
        name= _ "Tan-Rugar"
        side=3
        canrecruit=yes
        {GOLD 160 220 280}
        [ai]
            {NO_SCOUTS}
#ifdef EASY
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
#else
            recruitment_pattern=scout,mixed fighter,archer
#endif
            {ATTACK_DEPTH 4 5 5}
        [/ai]
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Goblin Pillager
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Goblin Pillager
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Orcish Slayer, Goblin Pillager
#endif
        team_name=orcs
        user_team_name=_"Orcs"
    [/side]

    [side]
        side=4
        type=Ancient Wose
        id=Elilmaldur-Rithrandil
        # wmllint: directory spelling Elilmaldur-Rithrandil
        name= _ "Elilmaldur-Rithrandil"
        profile="portraits/rithrandil.png"
        canrecruit=yes
        recruit=Wose Sapling
        {GOLD 160 100 60}
        {INCOME 10 5 3}
        team_name=Haldric
        user_team_name=_"Refugees"
    [/side]

    [event]
        name=prestart
        {CLEAR_VARIABLE last_done,escape_choice}

        {PLACE_IMAGE (scenery/temple1.png) 23 22}
        {PLACE_IMAGE (scenery/castle-ruins.png) 5 5}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 6 5}
        {PLACE_IMAGE (scenery/castle-ruins.png) 6 6}
        {PLACE_IMAGE (scenery/castle-ruins3.png) 5 7}
        {PLACE_IMAGE (scenery/castle-ruins.png) 4 6}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 4 5}
        {PLACE_IMAGE (scenery/castle-ruins3.png) 29 2}
        {PLACE_IMAGE (scenery/castle-ruins.png) 29 3}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 27 3}
        {PLACE_IMAGE (scenery/castle-ruins3.png) 27 2}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 15 29}
        {PLACE_IMAGE (scenery/castle-ruins.png) 15 30}
        {PLACE_IMAGE (scenery/castle-ruins3.png) 13 30}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 13 29}
        {PLACE_IMAGE (scenery/castle-ruins.png) 17 16}
        {PLACE_IMAGE (scenery/castle-ruins3.png) 17 17}
        {PLACE_IMAGE (scenery/castle-ruins2.png) 15 17}
        {PLACE_IMAGE (scenery/castle-ruins.png) 15 16}

        [recall]
            id=Lady Outlaw
        [/recall]

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

        [recall]
            id=Sir Ladoc
        [/recall]

        [recall]
            id=Minister Edren
        [/recall]

#ifdef EASY
        {GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
        {GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
        {GUARD_UNIT (Elder Wose) (Bolwuldelman) ( _ "Bolwuldelman") 4 7 18}
        {GUARD_UNIT (Elder Wose) (Laffalialomdium) ( _ "Laffalialomdium") 4 24 7}
        {GUARD_UNIT (Elder Wose) (Wonrunmaldin) ( _ "Wonrunmaldin") 4 16 22}
        {GUARD_UNIT (Elder Wose) (Lassemista) ( _ "Lassemista") 4 23 6}
#endif
#ifdef NORMAL
        {GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
        {GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
        {GUARD_UNIT (Elder Wose) (Bolwuldelman) ( _ "Bolwuldelman") 4 7 18}
        {GUARD_UNIT (Elder Wose) (Laffalialomdium) ( _ "Laffalialomdium") 4 24 7}
#endif
#ifdef HARD
        {GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
        {GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
#endif

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

            {TURNS_RUN_OUT}

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

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "Haldric’s band finds itself at the heart of the Oldwood Forest. The road quickly narrows and becomes little more than a path. Branches reach high overhead, blocking almost all of the light... The ominous noises of the deep woods echo all around."
            image=wesnoth-icon.png
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "Will this evil forest ever end! There are mosquitoes as big as my fist in here, and these nasty old trees are giving me the creeps."
            image=portraits/burin-annoyed.png
        [/message]
        [message]
            speaker=Lady Outlaw
            message= _ "This isn’t so bad. Haldric’s kind are such a suspicious lot when it comes to these sorts of things."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "Quiet. Listen, I think I hear something."
        [/message]

        {CLEAR_FOG 1 16 15 1}

        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "All I hear are more tree-foes!"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "That tree, it speaks! No— No— We are tree-friends, really!"
            image=portraits/haldric-surprised.png
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "Your kind has long come with your axes, some tree-friends you are. Still, you seem less of a menace than these new monsters that have come to plague us. They cut the trees, and burn the trees for no reason at all!"
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "You claim to be a tree-friend; show it to be true. For we are in dire need, or you may meet your fate with the rest of these monsters."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "We will help." + " " + {WHISPER _"quietly^Be careful with the trees."}
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "What? What are you looking at me for?"
        [/message]

        {UNCLEAR_FOG}
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=23
            y=22
        [/filter]
        [message]
            speaker=unit
            message= _ "The temple has already been looted, but the entrance to its catacombs seems to be blocked by a wall of magical energy."
        [/message]

        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=turn 4
        [message]
            speaker=Tan-Rugar
            message= _ "Stupid stinking trees, we’ll show you!"
        [/message]
    [/event]

    [event]
        name=turn 6
        [message]
            speaker=Tan-Gralg
            message= _ "Chop ’em down. It’s cool in these woods, I think we need a fire!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Elilmaldur-Rithrandil
        [/filter]
        [message]
            speaker=Prince Haldric
            message= _ "Without the help of these tree-folk we’ll be trapped in these woods till we die! There will be nothing to hold the orcs back!"
            image=portraits/haldric-surprised.png
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "Stupid tree-folk."
            image=portraits/burin-annoyed.png
        [/message]

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

    [event]
        name=enemies defeated
        [message]
            speaker=Prince Haldric
            message= _ "We’ve defeated the orcs!"
        [/message]

        [modify_side]
            side=4
            fog=yes
            share_vision=all
        [/modify_side]
        [redraw]
            side=1,4
        [/redraw]

        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "On this day you have proved yourself to be a tree-friend. For so long your kind has only come with sharp blades to harm my kind. You come to build these buildings of stone. Our roots may be slow, but they are strong. We will eventually claim all of the stones back for the earth."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "Well, I suspect you won’t have to worry about my kind for much longer. The orcs have come, and they are taking this Isle!"
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "Hmmmm— my kind were here before your kind, and we will be here after the orcs are gone as well. We were here before all others, and I suspect that we will be here in the end."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "Can you help us fight the orcs?"
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "My kind are bound to the forest, we would be of little help to you beyond our borders. Maybe we could still be of some aid to you. In a war of your people some time ago one of your kings trapped an evil lich in the catacombs of the temple at the heart of the wood. We were there, we were watching."
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "After we drove your kind off we figured out how to break the spell that holds the Evil in the catacombs, and keeps others from entering them."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "This helps us how?"
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "The lich was carrying a powerful artifact. We know, we can feel it. This artifact may aid you in your quest."
        [/message]
        [message]
            speaker=Lady Outlaw
            # wmllint: directory spelling Lenvan
            message= _ "He must mean the Ruby of Fire. It was our most powerful artifact. We brought it with us from the Old Continent, long ago. We thought it was lost in the war with your people, when Lich-Lord Lenvan fell!"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "At this point we need all of the help we can get!"
        [/message]
        [message]
            speaker=Elilmaldur-Rithrandil
            message= _ "Then I will open the catacombs for you..."
        [/message]
        [if]
            [variable]
                name=have_lady
                numerical_equals=1
            [/variable]
            [then]
                [message]
                    speaker=Lady Outlaw
                    message= _ "Young Prince, while the lich-lords have betrayed us by allying themselves with that orcish scum, I can’t bring myself to fight against one of the greatest leaders of my people."
                [/message]
                [message]
                    speaker=Prince Haldric
                    message= _ "Lady, why would you let those monsters lead your people?"
                [/message]
                [message]
                    speaker=Lady Outlaw
                    message= _ "Haldric, we are an ancient people who lived in a land filled with all manner of man and beast. We needed vision that extended beyond the meager span of human years. The art of necromancy allowed our best and brightest to live forever, and our worst got to serve as mindless slaves."
                [/message]
                [message]
                    speaker=Lady Outlaw
                    message= _ "Other than losing our war in the far West, then our refugee war to your people, and this orc thing, it wasn’t such a bad deal. Lich-Lord Lenvan was one of our greatest leaders. He led our escape to this land. Albeit, after being down in that hole for so long I don’t imagine he’s too happy."
                [/message]
                [message]
                    speaker=Prince Haldric
                    message= _ "Uh-huh. Have you considered the possibility that the unholy act of turning your best and brightest into undead is what causes them to fall into darkness?"
                [/message]
                [message]
                    speaker=Lady Outlaw
                    message= _ "We should save the debate for later. I can still be of use to you. I shall scout the road ahead. We need to know if we can make it to Southbay. I’ll return in a few days."
                [/message]
            [/then]
        [/if]

        [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 these woods until we die!"
            image=portraits/haldric-mad.png
        [/message]
    [/event]

    [event]
        name=victory

        [if]
            [variable]
                name=have_lady
                numerical_equals=1
            [/variable]
            [then]
                [store_unit]
                    [filter]
                        id=Lady Outlaw
                    [/filter]
                    variable=lady_store
                    kill=yes
                [/store_unit]
            [/then]
        [/if]
    [/event]
[/scenario]
