#textdomain wesnoth-trow
[scenario]
    id=The_River_Road
    name= _ "The Swamp of Esten"
    next_scenario=The_Oldwood
    bonus=yes
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/The_River_Road.map}"
    {TURNS 39 36 33}
    {DEFAULT_SCHEDULE}

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

    {TROW_NOHOME_STORY}
    {THE_RIVER_ROAD_BIGMAP}

    {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=Dark Sorcerer
        id=Cleon
        name= _ "Cleon"
        #This is the nearest enemy, make him softer.
        side=2
        canrecruit=yes
        #He's fodder boy
        recruit=Vampire Bat, Walking Corpse, Dark Adept
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,fighter,archer
            recruitment_ignore_bad_movement=yes
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        {GOLD 80 120 160}
        team_name=cult
        user_team_name=_"Cultists"
        {FLAG_VARIANT undead}
    [/side]

    [side]
        type=Dark Sorcerer
        id=Lollyra
        name= _ "Lollyra"
        gender=female
        side=3
        canrecruit=yes
        {GOLD 130 170 210}
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_combat=yes
            recruitment_pattern=scout,fighter,fighter,fighter,archer
            {ATTACK_DEPTH 3 4 5}
        [/ai]
#ifdef EASY
        recruit=Dark Adept, Ghoul, Ghost, Skeleton, Skeleton Archer, Vampire Bat, Walking Corpse, Mudcrawler
#endif
#ifdef NORMAL
        recruit=Dark Adept, Necrophage, Ghost, Skeleton, Skeleton Archer, Blood Bat, Soulless, Giant Mudcrawler
#endif
#ifdef HARD
        recruit=Dark Adept, Necrophage, Wraith, Shadow, Revenant, Deathblade, Bone Shooter, Blood Bat, Soulless
#endif
        team_name=cult
        user_team_name=_"Cultists"
        {FLAG_VARIANT undead}
    [/side]

    [side]
        type=Dark Sorcerer
        id=Clurka
        name= _ "Clurka"
        gender=female
        side=4
        canrecruit=yes
        {GOLD 130 170 210}
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,fighter,archer
            {ATTACK_DEPTH 3 4 5}
        [/ai]

#ifdef EASY
        recruit=Dark Adept, Ghoul, Ghost, Skeleton, Skeleton Archer, Vampire Bat, Walking Corpse, Mudcrawler
#endif
#ifdef NORMAL
        recruit=Dark Adept, Necrophage, Ghost, Skeleton, Skeleton Archer, Blood Bat, Soulless, Giant Mudcrawler
#endif
#ifdef HARD
        recruit=Dark Adept, Necrophage, Wraith, Shadow, Revenant, Deathblade, Bone Shooter, Blood Bat, Soulless
#endif
        team_name=cult
        user_team_name=_"Cultists"
        {FLAG_VARIANT undead}
    [/side]

    [event]
        name=prestart

        {PLACE_IMAGE (scenery/signpost.png) 15 31}
        {PLACE_IMAGE (scenery/temple1.png) 19 5}
        {PLACE_IMAGE (scenery/temple1.png) 30 10}
        {PLACE_IMAGE (scenery/temple1.png) 34 36}
        {PLACE_IMAGE (scenery/temple1.png) 1 26}
        {PLACE_IMAGE (scenery/temple1.png) 5 12}

        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 2 26 4}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 3 32 27}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 4 17 35}
#ifdef NORMAL
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 2 13 8}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 3 32 31}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 4 9 34}
#endif
#ifdef HARD
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 2 13 8}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 2 15 3}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 3 32 31}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 3 33 36}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 4 9 34}
        {GUARD_UNIT (Giant Scorpion) () ( _ "Scorpion") 4 20 32}
#endif
        [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]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

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

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "With great trepidation, Prince Haldric leads his refugee band into the Swamp of Esten. In the center of that very swamp a shroud of fog descends over young Prince Haldric."
            image=wesnoth-icon.png
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "I have a very bad feeling about this. This awful swamp and its crazy cult... Before these troubles started we used to have to clear the swamp every spring and fall."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "I suppose with the rampaging bands of murderous orcs roaming about that hasn't been done in a while."
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "I miss the orcs... We go all this way, and (SNIFF) what a lovely smell we have discovered."
        [/message]

        [message]
            speaker=Lady Outlaw
            message= _ "This is too quiet. I don't like this one bit, not one bit at all."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Wait, I think I hear something... To arms!"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            x=13
            y=6
            side=1
        [/filter]
        {NAMED_LOYAL_UNIT 2 (Giant Scorpion) 16 5 () ( _ "Scorpion")}
    [/event]

    [event]
        name=moveto
        [filter]
            x=10
            y=25
            side=1
        [/filter]
        {NAMED_LOYAL_UNIT 3 (Giant Scorpion) 10 27 () ( _ "Scorpion")}
    [/event]

    [event]
        name=moveto
        [filter]
            x=28
            y=33
            side=1
        [/filter]
        {NAMED_LOYAL_UNIT 4 (Giant Scorpion) 32 33 () ( _ "Scorpion")}
    [/event]

#define TEMPLE_HELP X Y
    [event]
        name=moveto
        [filter]
            side=1
            x={X}
            y={Y}
        [/filter]
        [message]
            speaker=Prince Haldric
            message= _ "Careful, you don't know what's lurking in there!"
        [/message]
        [unit]
            side=1
            type=White Mage
            id=Minister Edren
            name= _ "Minister Edren"
            profile="portraits/edmond.png"
            unrenamable=yes
            x={X}
            y={Y}
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
            {IS_LOYAL}
        [/unit]
        [message]
            speaker=Minister Edren
            message= _ "Back you vile--- Oh, sorry I thought you were undead. When are those goofs in Clearwater Port going to clear the swamp again?"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "Maybe they'll clear it some time after the APOCALYPSE is OVER!"
            image=portraits/haldric-mad.png
        [/message]
        [message]
            speaker=Minister Edren
            message= _ "Oooh! I take it you wouldn't mind if I helped out?"
        [/message]
    [/event]
#enddef

#define TEMPLE_TRAP X Y
    [event]
        name=moveto
        [filter]
            side=1
            x={X}
            y={Y}
        [/filter]
        [message]
            speaker=unit
            message= _ "Hey, there's somebody hidden in the temple. Ack! Hold there!"
        [/message]
        {LOYAL_UNIT 2 (Vampire Bat) ({X}) ({Y})}
        {LOYAL_UNDEAD_UNIT 3 (Walking Corpse) ({X}) ({Y})}
        {LOYAL_UNDEAD_UNIT 4 (Walking Corpse) ({X}) ({Y})}

#ifdef HARD
        {LOYAL_UNDEAD_UNIT 2 (Ghost) ({X}) ({Y})}
#endif
    [/event]
#enddef

#define TEMPLE_LOOT X Y
    [event]
        name=moveto
        [filter]
            side=1
            x={X}
            y={Y}
        [/filter]

        {LOOT 50 1}
    [/event]
#enddef

    [event]
        name=start
        {RANDOM 1..3}
        [if]
            [variable]
                name=random
                numerical_equals=1
            [/variable]
            [then]
                {TEMPLE_HELP 5 12}
                {TEMPLE_TRAP 34 36}
                {TEMPLE_TRAP 19 5}
                {TEMPLE_LOOT 1 26}
                {TEMPLE_LOOT 30 10}
            [/then]
        [/if]
        [if]
            [variable]
                name=random
                numerical_equals=2
            [/variable]
            [then]
                {TEMPLE_HELP 1 26}
                {TEMPLE_TRAP 34 36}
                {TEMPLE_TRAP 5 12}
                {TEMPLE_LOOT 19 5}
                {TEMPLE_LOOT 30 10}
            [/then]
        [/if]
        [if]
            [variable]
                name=random
                numerical_equals=3
            [/variable]
            [then]
                {TEMPLE_HELP 19 5}
                {TEMPLE_TRAP 34 36}
                {TEMPLE_TRAP 1 26}
                {TEMPLE_LOOT 5 12}
                {TEMPLE_LOOT 30 10}
            [/then]
        [/if]
    [/event]

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

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            # wmllint: local spelling SW
            #wmllint: display on
            message= _ "SW - The Oldwood Forest.
Enter at Your Own Risk!"
            #wmllint: display off
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Lollyra
        [/filter]
        [message]
            speaker=Lollyra
            # wmllint: local spelling Un-death
            message= _ "May I live forever in Un-death!"
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Clurka
        [/filter]
        [message]
            speaker=Clurka
            message= _ "Ohh! To be risen again!"
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Cleon
        [/filter]
        [message]
            speaker=Cleon
            message= _ "A prayer for life immortal!"
        [/message]
    [/event]

    [event]
        name=enemies defeated

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

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

        [redraw]
            side=1
        [/redraw]

        {MOVE_UNIT (id=Sir Ruddry) 30 33}

        [message]
            speaker=Sir Ruddry
            message= _ "I don't know who you are, but you can't continue down this road! There is a horde of those orcs bigger than any army I've ever seen just down the road!"
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "I'm Haldric; my father was King Eldaric IV in the lands northwest of here. Soldier, have you deserted your post?"
        [/message]

        [message]
            speaker=Sir Ruddry
            message= _ "No, Sir! I'm the sole survivor of the Clearwater Port expeditionary force. Trust me, you can't continue down this road, Sir. Especially with the refugees, you'll be slaughtered."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Tell me, does Clearwater Port still stand? Is the port free?"
        [/message]

        [message]
            speaker=Sir Ruddry
            message= _ "As far as I know, Sir. We have a large army, and they were pressing all able bodied men and boys into service when I left. That orcish army is huge, but they haven't met the main body of our forces yet."
        [/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 or Southbay."
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "Oh great, now a forest... I should have stayed at home and took my chances with the orcs!"
        [/message]

        [message]
            speaker=Sir Ruddry
            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="River"
        [/set_variable]

        {CLEAR_VARIABLE random}

        [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 this swamp when winter arrives!"
        [/message]
    [/event]
[/scenario]
