#textdomain wesnoth-trow
[scenario]
    id=12_A_Final_Spring
    name= _ "A Final Spring"
    next_scenario=13_Peoples_in_Decline
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/12_A_Final_Spring.map}"
    {TURNS 39 36 33}

    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}

    # No story part
    {TROW_GI_TRACK {JOURNEY_12_NEW} }

    {TROW_DEATHS}

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

    {STARTING_VILLAGES 1 12}

    [side]
        side=2
        type=Grand Knight
        id=King Addroran IX
        name= _ "King Addroran IX"
        profile="portraits/addroran.png"
        canrecruit=yes
        {GOLD 220 160 120}
        team_name=Haldric
        user_team_name=_"Humans"
        recruit=Bowman, Horseman, Mage, Spearman, Knight, Swordsman, Peasant
        [ai]
            {NO_SCOUTS}
            grouping=defensive
            passive_leader=yes
            recruitment_pattern=fighter,fighter,archer,mixed fighter
        [/ai]
        {FLAG_VARIANT loyalist}
    [/side]

    {AI_CONTROLLER () 1 2 ()}

    {STARTING_VILLAGES 2 10}

    [side]
        type=Orcish Warlord
        id=Tan-Harak
        name= _ "Tan-Harak"
        side=3
        canrecruit=yes
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif

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

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman
#endif
        {GOLD 210 250 290}
        team_name=orcs
        user_team_name=_"Orcs"
        [ai]
            #{NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 4 5 5}
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 2 4 8}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Hork
        name= _ "Tan-Hork"
        side=4
        canrecruit=yes
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Orcish Warrior
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer
#endif
        {GOLD 210 250 290}
        team_name=orcs
        user_team_name=_"Orcs"
        [ai]
            #{NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
            {ATTACK_DEPTH 4 5 5}
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 2 4 8}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Gulo
        name= _ "Tan-Gulo"
        side=5
        canrecruit=yes
        recruit=Naga Fighter,Vampire Bat
        {GOLD 180 220 260}
        team_name=orcs
        user_team_name=_"Orcs"
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=fighter,fighter,scout
            {ATTACK_DEPTH 4 5 5}
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 2 4 8}
    [/side]

    [side]
        side=6
        no_leader=yes
        team_name=orcs
        hidden=yes
        [ai]
            village_value=0
        [/ai]
    [/side]

    [event]
        name=prestart

        [item]
            x,y=3,18
            image=scenery/lighthouse.png
            halo=halo/lighthouse-aura.png
        [/item]

        # Time Area for the lighthouse, simulating illumination
        [time_area]
            x,y=3,18
            radius=2
            id=lighthouse
            # Schedule using the red, green, blue values from other ToDs,
            # but overriding the image to fit the current ToD, and applying a bonus.
            {MORNING} # (actually dawn)
            [+time]
                image=misc/time-schedules/default/schedule-dawn.png~BLIT(misc/tod-bright.png)
                lawful_bonus=25
            [/time]
            {MORNING}
            {AFTERNOON}
            {AFTERNOON} # (actually dusk)
            [+time]
                image=misc/time-schedules/default/schedule-dusk.png~BLIT(misc/tod-bright.png)
                lawful_bonus=25
            [/time]
            {DAWN} # (actually 1st night)
            [+time]
                image=misc/time-schedules/default/schedule-firstwatch.png~BLIT(misc/tod-bright.png)
                lawful_bonus=0
            [/time]
            {DAWN} # (actually 2nd night)
            [+time]
                image=misc/time-schedules/default/schedule-secondwatch.png~BLIT(misc/tod-bright.png)
                lawful_bonus=0
            [/time]
        [/time_area]

        {PLACE_IMAGE ("units/transport/transport-galleon.png~RC(magenta>blue)") 17 24}
        {PLACE_IMAGE ("units/transport/transport-galleon.png~RC(magenta>blue)") 20 22}
        {PLACE_IMAGE ("units/transport/galleon.png~RC(magenta>blue)") 21 25}
        {PLACE_IMAGE (scenery/trapdoor-closed.png) 16 30}
        {PLACE_IMAGE (scenery/signpost.png) 24 24}
        {PLACE_IMAGE (scenery/signpost.png) 30 44}
        {PLACE_IMAGE (scenery/signpost.png) 41 32}
        {PLACE_IMAGE (scenery/signpost.png) 16 4}
        {PLACE_IMAGE (scenery/signpost.png) 39 11}
        {PLACE_IMAGE (scenery/signpost.png) 18 17}

        [recall]
            id=Lady Jessene
            x=12
            y=27
        [/recall]
        [recall]
            id=Burin the Lost
            x=14
            y=27
        [/recall]
        [recall]
            id=Sir Ruddry
            x=13
            y=29
        [/recall]
        [recall]
            id=Sir Ladoc
            x=13
            y=29
        [/recall]
        [recall]
            id=Minister Edren
            x=14
            y=28
        [/recall]

        {GUARD_UNIT (Swordsman) (Southbay Guard 1) ( _ "Southbay Guard") 2 19 33}
        {GUARD_UNIT (Swordsman) (Southbay Guard 2) ( _ "Southbay Guard") 2 21 30}
        {GUARD_UNIT (Swordsman) (Southbay Guard 3) ( _ "Southbay Guard") 2 28 24}
        {GUARD_UNIT (Swordsman) (Southbay Guard 4) ( _ "Southbay Guard") 2 27 22}
        # wmllint: recognize Southbay Guard 1

        [object]
            id=ruby_of_fire
            description= _ "The Ruby of Fire was imbued with magic in the distant west, and can be used to scorch enemies into submission."
            silent=yes
            duration=forever
            [filter]
                id=Prince Haldric
            [/filter]
            [effect]
                apply_to=new_attack
                name=ruby of fire
                description= _ "ruby of fire"
                icon=attacks/fireball.png
                type=fire
                range=ranged
                [specials]
                    {WEAPON_SPECIAL_MAGICAL}
                [/specials]
                damage=14
                number=4
            [/effect]

            [effect]
                apply_to=new_animation
                [attack_anim]
                    [filter_attack]
                        name=ruby of fire
                    [/filter_attack]

                    {MISSILE_FRAME_FIREBALL_XY 0 0}
                    start_time=-200
                    [frame]
                        sound=fire.wav
                    [/frame]
                [/attack_anim]
            [/effect]
        [/object]

        [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 Lady Jessene"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of King Addroran IX"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Lord Typhon"
                condition=lose
                [show_if]
                    [have_unit]
                        id=Lord Typhon
                    [/have_unit]
                [/show_if]
            [/objective]

            {TURNS_RUN_OUT}

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

            {AI_CONTROLLER_NOTE}
        [/objectives]
    [/event]

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "Several months pass. Jessene has translated Lich-Lord Caror’s Book of Fire and Darkness. Prince Haldric is busy probing the secrets of the Ruby of Fire."
            image=wesnoth-icon.png
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "I think I’ve figured something out. Look."
            image=portraits/haldric-annoyed.png
        [/message]

        [animate_unit]
            [filter]
                id=Prince Haldric
            [/filter]

            [facing]
                x,y=12,28
            [/facing]

            flag=attack

            [primary_attack]
                name=ruby of fire
            [/primary_attack]

            hits=yes
        [/animate_unit]

        [message]
            speaker=Prince Haldric
            message= _ "Ouch! Hot, hot, hot! Gee, somebody should really attach this thing to a scepter or something! I think I’ll save it for closer-ranged combat for now."
            image=portraits/haldric-mad.png
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "Watch it! Well, at least you’re improving."
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "Humph. Fool of a boy’s just gonna burn us all up. Humans, always playing at being wizards."
            image=portraits/burin-annoyed.png
        [/message]
        [message]
            speaker=Southbay Guard 1
            message= _ "Orcs sighted! They’ve seized the frontier! To arms! To arms!"
        [/message]
        [message]
            speaker=Sir Ladoc
            message= _ "For the glory of Southbay!"
        [/message]
        [message]
            speaker=King Addroran IX
            message= _ "Prince Haldric, I’ll concentrate on holding Southbay. You must defeat the orcs. The ships aren’t ready yet. We must defeat this army of orcs to buy us more time. Try not to kill us all with that ruby!"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "Very well. I’ll do my best."
        [/message]
    [/event]

    [event]
        name=turn 5
        [move_unit_fake]
            type=Merman Warrior
            side=1
            x=1,2,3
            y=21,20,20
        [/move_unit_fake]

        {HERO (Merman Warrior) (Lord Typhon) ( _ "Lord Typhon") 1 3 20 ("portraits/typhon.png")}
        {LOYAL_UNIT 1 (Merman Fighter) 2 20}
        {LOYAL_UNIT 1 (Merman Hunter) 4 19}

        [message]
            speaker=Lord Typhon
            message= _ "I come seeking the Crown Prince!"
        [/message]
        [message]
            speaker=King Addroran IX
            message= _ "Who is this fish man?"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "He’s a large part of the reason your son made it to the lands of the east. Lord Typhon provided us with pearls and an escort for our voyages in exchange for steel trident points and fishhooks. It’s difficult to be a blacksmith when you live underwater."
        [/message]
        [message]
            speaker=Lord Typhon
            message= _ "Indeed it is. But where is the Prince?"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "The Crown Prince is dead. But we have need of your services again—"
        [/message]
        [message]
            speaker=Lord Typhon
            message= _ "Under the same terms?"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "Agreed."
        [/message]
        [message]
            speaker=Lord Typhon
            message= _ "Good. We need the steel for our own war in the deep. I formally place the might of the Merfolk at your disposal!"
        [/message]

        [message]
            speaker=narrator
            message= _ "You can now recruit merfolk!"
            image=wesnoth-icon.png
        [/message]

        [allow_recruit]
            side=1
            type=Merman Fighter,Merman Hunter
        [/allow_recruit]
        [show_objectives]
        [/show_objectives]
    [/event]

    [event]
        name=turn 30
        [message]
            speaker=King Addroran IX
            message= _ "Make haste. We must secure the frontier or it’s all over!"
        [/message]
    [/event]

    [event]
        name=turn 4

        [move_unit_fake]
            type=Familiar
            side=6
            x=45,44,43,42
            y=22,22,23,23
        [/move_unit_fake]

        # wmllint: whofield LIVING_INTEL 2
        {LIVING_INTEL (Familiar) (Familiar) ( _ "Familiar") "portraits/familiar.png" 6 42 23}
        [+unit]
            facing=sw
        [/unit]

        [move_unit_fake]
            type=Ancient Lich
            side=6
            x=45,44,43,42,42
            y=22,22,23,23,24
        [/move_unit_fake]

        # wmllint: whofield UNDEAD_INTEL 2
        {UNDEAD_INTEL (Ancient Lich) (Lich-Lord Jevyan) ( _ "Lich-Lord Jevyan") "portraits/jevyan.png" 6 42 24}
        [+unit]
            facing=sw
        [/unit]

        [message]
            speaker=Lich-Lord Jevyan
            message= _ "King Addroran, your day is done. Prepare to be ground to dust. If you’re lucky I may raise you from death for my own amusement. Oh, and what’s this? I sense, I sense the Ruby of Fire."
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "You monster! You’ve betrayed our people — to ally yourself with these orcs?!"
        [/message]

        {UNDEAD_INTEL (Death Knight) (Fool Prince) ( _ "Fool Prince") "portraits/undead/death-knight.png" 6 43 24}

        [message]
            speaker=Lich-Lord Jevyan
            message= _ "Fool girl! My ambition is boundless; I will survive to rule the orcs and all else. That is more than can be said for you. King Addroran, meet your son — you’ll be joining him soon enough."
        [/message]
        [message]
            speaker=King Addroran IX
            message= _ "NO!"
        [/message]
        [message]
            speaker=Fool Prince
            message= _ "Fath-er! Join... us..." # wmllint: no spellcheck
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "His older brother was more attractive..."
        [/message]

        [kill]
            id=Lich-Lord Jevyan
        [/kill]

        [move_unit_fake]
            type=Ancient Lich
            side=6
            x=42,42,43,44,45
            y=24,23,23,22,22
        [/move_unit_fake]

        {LOYAL_UNIT 6 (Revenant) 41 22}
        {LOYAL_UNIT 6 (Bone Shooter) 43 24}
#ifdef NORMAL
        {LOYAL_UNIT 6 (Chocobone) 42 23}
        {LOYAL_UNIT 6 (Chocobone) 43 23}
#endif

#ifdef HARD
        {LOYAL_UNIT 6 (Chocobone) 42 23}
        {LOYAL_UNIT 6 (Chocobone) 43 23}
        {LOYAL_UNIT 6 (Necrophage) 44 23}
        {LOYAL_UNIT 6 (Necrophage) 44 22}
#endif
        [kill]
            id=Familiar
        [/kill]

        [move_unit_fake]
            type=Familiar
            side=6
            x=42,43,44,45
            y=23,23,22,22
        [/move_unit_fake]
    [/event]

    [event]
        name=time over
        [message]
            speaker=Lady Jessene
            message= _ "Their reserves are arriving, and we haven’t secured the frontier! We’re dead!"
        [/message]
    [/event]

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

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "Southbay"
            image=wesnoth-icon.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=30
            y=44
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "To Clearwater Port"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=41
            y=32
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "To the Midlands &amp; Oldwood"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=16
            y=4
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "To the Northrun"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=39
            y=11
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "To the Midlands"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

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

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "New Southbay"
            image=wesnoth-icon.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=16
            y=30
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            message= _ "They sealed it, there is no escape for you!"
            image=wesnoth-icon.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

    [event]
        name=last breath
        [filter]
            id=King Addroran IX
        [/filter]
        [message]
            speaker=unit
            message= _ "I am finished."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "We needed him to hold Southbay. We’re done for!"
            image=portraits/haldric-surprised.png
        [/message]

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

    [event]
        name=enemies defeated
        [message]
            speaker=Prince Haldric
            message= _ "We’ve defeated the orcs. Let’s rig the ships and get out of here."
        [/message]
        [message]
            speaker=King Addroran IX
            message= _ "Oh, for my sons... — As we agreed. I will hold Southbay until my last breath."
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "With the help of the Merfolk, and my knowledge of an island that will make a good re-provisioning point, we should be able to embark for the great lands that are to the east."
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "What I don’t like is the fact that Lich-Lord Jevyan, after whom our very capital is named, betrayed my people. To make matters worse, he knows that you have that ruby."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "There’s not much we can do about that now. I dub this fine ship the Eldaric, in honor of my father. About that island..."
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "Great, more boats, and now an ocean!"
        [/message]
        [message]
            speaker=King Addroran IX
            message= _ "After you make it to this new land, send some of the ships back, for there may still be survivors in Southbay."
        [/message]

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

    [event]
        name=die
        [filter]
            id=Fool Prince
        [/filter]

        [message]
            speaker=King Addroran IX
            message= _ "My son!"
        [/message]
    [/event]

    [event]
        name=attack

        [filter]
            id=King Addroran IX
        [/filter]

        [message]
            speaker=King Addroran IX
            message= _ "For the glory of Southbay!"
        [/message]
    [/event]
[/scenario]
