Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on February 15, 2017 at 08:17 PM

New Paste 1 (Text)

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
#textdomain wesnoth-tsg
[scenario]
    id=08b_The_Tides_of_War

    name= _ "The Tides of War"
    next_scenario=09b_Bandit_Epilogue

    {SCENARIO_MUSIC knalgan_theme.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}

    map_data="{campaigns/The_South_Guard/maps/08b_The_Tides_of_War.map}"

    {DEFAULT_SCHEDULE_DAWN}

    victory_when_enemies_defeated=yes
    turns=60

    {BIGMAP_08B}

    # The South Guard

    [side]
        side=1
        type=Horseman Commander
        id=Deoran
        name= _ "Deoran"
        unrenamable=yes

        team_name=South_Guard
        user_team_name=_"South Guard"
        controller=human
        {CUSTOM_SG_FLAG}

        gold=200
        {INCOME 4 2 0}

        fog=no
        shroud=no

        canrecruit=yes
        recruit=Bowman, Spearman, Cavalryman, Footpad, Thug
    [/side]

    # The Undead Hordes

    [side]
        side=2
        type=Ancient Lich
        id="Mal M'Brin"
        name= _ "Mal M’Brin"

        team_name=The_Undead_Hordes
        user_team_name=_"Undead"
        controller=ai

        {GOLD 400 700 900}
        {INCOME 20 30 40}

        canrecruit=yes
        [ai]
            recruitment_pattern=scout,fighter,fighter,archer,scout,fighter,archer,mixed fighter
            aggression=1.0
            caution=0.0
            [goal]
                [criteria]
                    id=Deoran
                [/criteria]
                value=6.0
            [/goal]
        [/ai]
        recruit=Wraith,Shadow,Revenant,Draug,Bone Shooter,Blood Bat,Chocobone,Dark Sorcerer,Necrophage
        {FLAG_VARIANT undead}
    [/side]

    {STARTING_VILLAGES 2 5}

    [event]
        name=prestart

#define ILLUMINATING_CAMPFIRE X Y
    [terrain]
        x,y={X},{Y}
        terrain=Gd^Ecf
    [/terrain]

    [item]
        x,y={X},{Y}
        halo=halo/fire-aura.png
    [/item]

    [store_locations]
        x,y={X},{Y}
        radius=2

        variable=illuminated_locations
    [/store_locations]

    [time_area]
        find_in=illuminated_locations

        {MORNING}
        {MORNING}
        {AFTERNOON}
        {AFTERNOON}
        {DUSK}
        {DAWN}
    [/time_area]
#enddef

        [set_variables]
            name=pebbles_defense_benefits

            [value]
                turn=6
                {MODIFY_TERRAIN Ce 30 17}
                {VARIABLE defenses some}
            [/value]
            [value]
                turn=7
                {NAMED_GENERIC_UNIT 1 (Heavy Infantryman) 30 17 () (_"Provincial Guard")} {GUARDIAN}
                {VARIABLE provincial_guard some}
            [/value]
            [value]
                turn=8
                {MODIFY_TERRAIN Ce 27 17}
            [/value]
            [value]
                turn=9
                {NAMED_GENERIC_UNIT 1 (Heavy Infantryman) 27 17 () (_"Provincial Guard")} {GUARDIAN}
            [/value]
            [value]
                turn=10
                {MODIFY_TERRAIN Re^Vct 16 9}
                {MODIFY_TERRAIN Re^Vct 16 11}
            [/value]
            [value]
                turn=11
                {MODIFY_TERRAIN Re^Vct 17 14}
                {MODIFY_TERRAIN Re^Vct 19 15}
            [/value]
            [value]
                turn=12
                {MODIFY_TERRAIN Ch 20 11}
                {MODIFY_TERRAIN Ch 22 10}
            [/value]
            [value]
                turn=13
                {MODIFY_TERRAIN Ce 25 17}
                {MODIFY_TERRAIN Gd 26 16}
                {NAMED_GENERIC_UNIT 1 (Lieutenant) 25 17 (Lt. Nilaf) (_"Lt. Nilaf")} {GUARDIAN}
            [/value]
            [value]
                turn=14
                {MODIFY_TERRAIN Ce 23 17}
                {MODIFY_TERRAIN Gd 24 16}
                {NAMED_GENERIC_UNIT 1 (Spearman) 23 17 () (_"Provincial Guard")} {GUARDIAN}
            [/value]
            [value]
                turn=15
                {MODIFY_TERRAIN Ce 14 17}
                {NAMED_GENERIC_UNIT 1 (Bowman) 14 17 () (_"Provincial Guard")} {GUARDIAN}
            [/value]
            [value]
                turn=16
                {MODIFY_TERRAIN Ce 34 17}
                {NAMED_GENERIC_UNIT 1 (Heavy Infantryman) 34 17 () (_"Provincial Guard")} {GUARDIAN}
                {VARIABLE provincial_guard full}
            [/value]
            [value]
                turn=17
                {ILLUMINATING_CAMPFIRE 20 16}
            [/value]
            [value]
                turn=18
                {ILLUMINATING_CAMPFIRE 11 14}
            [/value]
            [value]
                turn=19
                {ILLUMINATING_CAMPFIRE 26 16}
            [/value]
            [value]
                turn=20
                {ILLUMINATING_CAMPFIRE 35 17}
            [/value]
            [value]
                turn=21
                {MODIFY_TERRAIN Ce 23 21}
            [/value]
            [value]
                turn=22
                {MODIFY_TERRAIN Ce 26 21}
                {VARIABLE defenses full}
            [/value]
        [/set_variables]

        {FOREACH pebbles_defense_benefits i}
            [if]
                [variable]
                    name=pebbles_defense_length
                    greater_than_equal_to=$pebbles_defense_benefits[$i].turn
                [/variable]

                [then]
                    [insert_tag]
                        name=command
                        variable=pebbles_defense_benefits[$i]
                    [/insert_tag]
                [/then]
            [/if]
        {NEXT i}

        # the player gets 20 extra starting gold for each turn past 22
        [if]
            [variable]
                name=pebbles_defense_length
                greater_than=22
            [/variable]

            [then]
                {VARIABLE turns_past_22 $pebbles_defense_length}
                {VARIABLE_OP turns_past_22 sub 22}

                {VARIABLE extra_starting_gold 20}
                {VARIABLE_OP extra_starting_gold multiply $turns_past_22}

                [gold]
                    side=1
                    amount=$extra_starting_gold
                [/gold]
            [/then]
        [/if]

        {CLEAR_VARIABLE pebbles_defense_benefits,illuminated_locations}
    [/event]

    [event]
        name=prestart

        {VARIABLE village_radius $pebbles_defense_length}
        {VARIABLE_OP village_radius sub 5}

        [if]
            [variable]
                name=village_radius
                less_than=2
            [/variable]

            [then]
                {VARIABLE village_radius 2}
            [/then]
        [/if]

        [if]
            [variable]
                name=village_radius
                greater_than=20
            [/variable]

            [then]
                {VARIABLE village_radius 20}
            [/then]
        [/if]
    [/event]

    {STARTING_VILLAGES 1 $village_radius}
    
    [event]
        name=start
        
        [fire_event]
            name=mefel_arrived
        [/fire_event]
    [/event]
    
    # Phase one: Arrival of Mefel
    [event]
        name=mefel_arrived
        [recall]
            id=Minister Hylas
            x,y=21,11
        [/recall]
        # The proper fix to Hylas’ overlay is to add `overlays="misc/loyal-icon.png"` to his [unit] tag in 02_Proven_by_the_Sword.cfg. As of now, to make this file working:
        [unit_overlay]
            id=Minister Hylas
            image=misc/loyal-icon.png
        [/unit_overlay]
        {UNMAKE_HERO "Minister Hylas"}
        [recall]
            id=Jarek
            x,y=21,12
        [/recall]
        [recall]
            id=Moreth
            x,y=22,12
        [/recall]

        [message]
            speaker=Deoran
            message= _ "Look! The undead army has broken through Sir Gerrick’s lines! Alas, he is lost!"
        [/message]

        [message]
            speaker=Moreth
            message= _ "Since I was a boy, Gerrick was my leader, and there was no one braver. Today we shall defend our homes, and avenge him!"
        [/message]

        [if]
            [variable]
                name=provincial_guard
                equals=some
            [/variable]
            [variable]
                name=defenses
                equals=some
            [/variable]
            [then]
                [message]
                    speaker=Deoran
                    message= _ "But in the narrow window his valiant stand gave us, we have roused some of the provincial guard and reinforced our defenses!"
                [/message]
            [/then]
            [else]
                [if]
                    [variable]
                        name=provincial_guard
                        equals=full
                    [/variable]
                    [variable]
                        name=defenses
                        equals=some
                    [/variable]
                    [then]
                        [message]
                            speaker=Deoran
                            message= _ "But in the narrow window his valiant stand gave us, we have roused the whole provincial guard and reinforced our defenses!"
                        [/message]
                    [/then]
                    [else]
                        [if]
                            [variable]
                                name=provincial_guard
                                equals=full
                            [/variable]
                            [variable]
                                name=defenses
                                equals=full
                            [/variable]
                            [then]
                                [message]
                                    speaker=Deoran
                                    message= _ "But in the narrow window his valiant stand gave us, we have roused the whole provincial guard and fully embattled the city!"
                                [/message]
                            [/then]
                        [/if]
                    [/else]
                [/if]
            [/else]
        [/if]

        [message]
            speaker=Lt. Nilaf
            message= _ "Indeed, Lord, we are ready to defend our homes!"
        [/message]

        [if]
            [variable]
                name=pebbles_defense_length
                less_than=24
            [/variable]
            [then]
                [message]
                    speaker=Minister Hylas
                    message= _ "I have summoned the great Council of Westin!"
                [/message]
                # wmllint: local spelling Mefel
                {NAMED_LOYAL_UNIT 1 (Silver Mage) 11 1 (Minister Mefel) (_"Minister Mefel")}
                [message]
                    speaker=Minister Mefel
                    message= _ "Hylas, I have made all possible haste, but my Council brethren are not as swift as I. It will take more time for them to arrive."
                [/message]
                
                {VARIABLE council_arrived false}
                
                [fire_event]
                    name=waiting_for_council
                [/fire_event]
            [/then]

            [else]
                [message]
                    speaker=Minister Hylas
                    message= _ "And I have summoned the great Council of Westin! They will battle with all their might!"
                [/message]
                {NAMED_LOYAL_UNIT 1 (Silver Mage) 11 1 (Minister Mefel) (_"Minister Mefel")}
                {NAMED_LOYAL_UNIT 1 (Arch Mage) 10 1 (Minister Romand) (_"Minister Romand")}
                {NAMED_LOYAL_UNIT 1 (Red Mage) 12 1 (Minister Alanafel) (_"Minister Alanafel")}
                {NAMED_LOYAL_UNIT 1 (White Mage) 9 1 (Apprentice Mera) (_"Apprentice Mera")}
                [+unit]
                    gender=female
                [/unit]
                {NAMED_LOYAL_UNIT 1 (White Mage) 13 1 (Apprentice Lirylla) (_"Apprentice Lirylla")}
                [+unit]
                    gender=female
                [/unit]
                [message]
                    speaker=Minister Mefel
                    message= _ "We have heard your summons, and we shall send these dark foes back to the abyss that spawned them!"
                [/message]
                [message]
                    speaker=Deoran
                    message= _ "Council of Westin, we are cheered by your presence. Your aid will be most welcome."
                [/message]
                
                {VARIABLE council_arrived true}
                
                [objectives]
                    side=1
                    [objective]
                        description= _ "Defeat Mal M’Brin"
                        condition=win
                    [/objective]
                    [objective]
                        description= _ "Death of Deoran"
                        condition=lose
                    [/objective]

                    {TURNS_RUN_OUT}
                    {IS_LAST_SCENARIO}
                [/objectives]
            [/else]
        [/if]

        [message]
            speaker=Deoran
            message= _ "We have rallied all the forces that we will be able to! Let us not make Sir Gerrick’s sacrifice a vain one. For Wesnoth!"
        [/message]
        
        [fire_event]
            name=place_barriers
        [/fire_event]

    [/event]
    
    # Phase 2: Barriers placed
    [event]
        name=place_barriers
        
        # Since it is now more realistic to actually achieve those bonuses from Pebbles, we now should put some handicaps to this scenario to even things up
        [event]
            name=side 1 turn 1 end
        
            {PLACE_BARRIER 26 36 "Mal M'Brin" recruiting 300 17 29 "border_size=1
usage=map

_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f
_f,_f,_f,_f,_f,_f,Xv,Xv,Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f
_f,_f,_f,_f,Xv,Xv,_f,_f,_f,Xv,Xv,_f,_f,_f,_f,_f,_f,_f
_f,_f,Xv,Xv,_f,_f,_f,_f,_f,_f,_f,Xv,Xv,_f,_f,_f,_f,_f
Xv,Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,Xv,_f,_f,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
_f,Xv,Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,_f
_f,_f,_f,Xv,Xv,_f,_f,_f,_f,_f,_f,_f,_f,_f,Xv,Xv,_f,_f
"}
    
            [message]
                speaker=Deoran
                message=_"Will there never be an end to this heinous magic? Minister Hylas, can you tell what sort of horibleness has he surrounded his encampment with?"
            [/message]
            [message]
                speaker=Minister Hylas
                message=_"I fear I sadly can, my Lord. This most likely is the barrier Urza Afalas told us about. No man, barring these abominations, can pass it."
            [/message]
            [if]
                [variable]
                    name=council_arrived
                    equals=true
                [/variable]
                [then]
                    [message]
                        speaker=Deoran
                        message=_"This is dire news indeed. Though Wesnoth can pride itself with magnificent wizards as well. Council of Westin, can you attempt to take this barrier down?"
                    [/message]
                    # Deoran is probably a Mounted General now
                    [message]
                        speaker=Minister Romand
                        message=_"We will try as soon as we can get close enough, though this will be challenging endeavor indeed. While none of us can combat this lich alone, united we might stand a chance. Hold the undead, General, and who knows, perhaps you will see us succeed!"
                    [/message]
                    
                    [fire_event]
                        name=council_working
                    [/fire_event]
                [/then]
                
                [else]
                    [message]
                        speaker=Deoran
                        message=_"This is dire news indeed. How can we stand against a foe we cannot even touch?"
                    [/message]
                    [message]
                        speaker=Minister Mefel
                        message=_"Perhaps not all is yet lost. While none of us can combat this lich alone, united we might stand a chance. As soon as the rest of the Council arrives, we should manage to take this barrier down!"
                    [/message]
                [/else]
            [/if]
            
            [event]
                name=die
                id=loose_if_a_mage_dies
                    
                [filter]
                    type= Red Mage, Arch Mage, Great Mage, Silver Mage, White Mage, Mage of Light
                [/filter]
        
                [if]
                    [variable]
                        name=unit.id
                        equals=Minister Hylas
                    [/variable]
                    [then]
                        [if]
                     	    [have_unit]
                      		    id=Minister Romand
                       		[/have_unit]
                       		[then]
                                [message]
                                    speaker=Minister Romand
                                    message= _ "All is lost! Without the aid of " + $unit.name + " we cannot undo the evil magic of this lich!"
                                [/message]
                            [/then]
                            [else]
                                [message]
                                    speaker=Minister Mefel
                                    message=_ "All is lost! Without the aid of " + $unit.name + " we cannot undo the evil magic of this lich!"
                                [/message]
                            [/else]
                        [/if]
                    [/then]
                    [else]
                        [message]
                            speaker=Minister Hylas
                            message= _ "All is lost! Without the aid of " + $unit.name + " we cannot undo the evil magic of this lich!"
                        [/message]
                    [/else]
                [/if]
                
                [endlevel]
                    result=defeat
                [/endlevel]
            [/event]
            
            {MAKE_HERO "Minister Hylas"}
            {MAKE_HERO "Minister Mefel"}
            {MAKE_HERO "Minister Romand"}
            {MAKE_HERO "Minister Alanafel"}
            {MAKE_HERO "Apprentice Mera"}
            {MAKE_HERO "Apprentice Lirylla"}
            
            [event]
                name=recruit
                first_time_only=no
                [filter]
                    side=2
                [/filter]
        
                {CAN_PASS_BARRIER $x1 $y1}
            [/event]
            
            # For an extra handicap, disallow luring Mal M’brin outta the castle. Siege him, actually!    
            {MODIFY_UNIT id="Mal M'Brin" max_moves 0}
        [/event]
    [/event]    
                
    # Phase 2.5: Council on its way
    [event]
        name=waiting_for_council
        
        [objectives]
            side=1
            [objective]
                description= _ "Defeat Mal M’Brin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Deoran"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of any Council of Westin member"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}
            {IS_LAST_SCENARIO}

            note= _ "The Council of Westin will arrive on turn $(24 - $pebbles_defense_length + 1)."
        [/objectives]
        
        [event]
            name= "turn $(24 - $pebbles_defense_length + 1)"
                
            {NAMED_LOYAL_UNIT 1 (Arch Mage) 10 1 (Minister Romand) (_"Minister Romand")}
            {NAMED_LOYAL_UNIT 1 (Red Mage) 12 1 (Minister Alanafel) (_"Minister Alanafel")}
            {NAMED_LOYAL_UNIT 1 (White Mage) 9 1 (Apprentice Mera) (_"Apprentice Mera")}
            [+unit]
                gender=female
            [/unit]
            {NAMED_LOYAL_UNIT 1 (White Mage) 13 1 (Apprentice Lirylla) (_"Apprentice Lirylla")}
            [+unit]
                gender=female
            [/unit]
            [message]
                speaker=Minister Romand
                message= _ "We have heard your summons, and we shall send these dark foes back to the abyss that spawned them!"
            [/message]
            [message]
                speaker=Deoran
                message= _ "Council of Westin, we are cheered by your presence. Your aid will be most welcome, and most needed at this hour of trial. As you can see, the lich has surrounded himself with an enchanted barrier that makes it impossible for us to put an end to his evil ways. Can you raze his magic?"
            [/message]
            [message]
                speaker=Minister Romand
                message=_"We can try as soon as we can get close enough. Hold the undead, General, and who knows, perhaps you will see us succeed!"
            [/message]
                   
            {VARIABLE council_arrived true}
                    
            [fire_event]
                name=council_working
            [/fire_event]
           
        [/event]
    [/event]

    # Phase 3: Council arrived and working
    [event]
        name=council_working
        
        [objectives]
            side=1
            [objective]
                description= _ "Defeat Mal M’Brin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Deoran"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of any Council of Westin member"
                condition=lose
            [/objective]
                
            note= _ "Note: The mages will take the barrier down as soon as all are placed adjacent to it."

            {TURNS_RUN_OUT}
            {IS_LAST_SCENARIO}
        [/objectives]
        
        [event]
            name=moveto
            id=check_if_all_mages_hug_barrier_each_move
            
            # There is no mage who is not positioned adjacent to the barrier
            [filter_condition]
                [not]
                    [have_unit]
                        type= Red Mage, Arch Mage, Great Mage, Silver Mage, White Mage, Mage of Light
                        
                        [filter_location]
                            [not]
                                x=16,15,15,15,15,15,15,15,15,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,33,33,33,33,33,33,33
                                y=40,40,39,38,37,36,35,34,33,32,31,31,30,30,29,29,28,28,28,29,29,30,30,31,31,32,32,33,34,35,36,37,38,39,40
                            [/not]
                        [/filter_location]
                    [/have_unit]
                [/not]
            [/filter_condition]
            
            [fire_event]
                name=barriers_down
            [/fire_event]
        [/event]
    [/event]
    
    # Phase 4: Barriers down
    [event]
        name=barriers_down
        
        [message]
            speaker=Minister Romand
            message= _ "Everyone focus…"
        [/message]
        
        {UNMAKE_HERO "Minister Hylas"}
        {UNMAKE_HERO "Minister Mefel"}
        {UNMAKE_HERO "Minister Romand"}
        {UNMAKE_HERO "Minister Alanafel"}
        {UNMAKE_HERO "Apprentice Mera"}
        {UNMAKE_HERO "Apprentice Lirylla"}
        
        {PLACE_BARRIER 26 36 "Mal M'Brin" recruiting 300 17 29 "border_size=1
usage=map

     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f
     _f,     _f,     _f,     _f,     _f,     _f,     Re, Gd^Fmw,     Hhd,    _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f
     _f,     _f,     _f,     _f, Gd^Fmw, Gd^Fmw,     _f,     _f,     _f, Gs^Fmw,    Hhd,     _f,     _f,     _f,     _f,     _f,     _f,     _f
     _f,     _f,     Gd,     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,    Hhd,    Hhd,     _f,     _f,     _f,     _f,     _f
  Gs^Fp,     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     Mm,     Mm,     _f,     _f,     _f
     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     Mm,     Mm,     _f
     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     Mm,     _f
     Re,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     Mm,     _f
     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f, Gll^Fp,     _f
     Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,    Hhd,     _f
 Gll^Fp,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f, Gll^Fp,     _f
 Gll^Fp,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f, Gll^Fp,     _f
     _f,  Gll^Fp,    Gd,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,    Hhd,     _f
     _f,     _f,     _f,  Gd^Fp,  Gd^Fp,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f,     _f, Gll^Fp, Gll^Fp,     _f,     _f
"}
        
        [message]
            speaker=Minister Romand
            message= _ "I am pleased to announce you, General, that your way to the lich’s stronghold is now unobstructed."
        [/message]
        
        [event]
            id=loose_if_a_mage_dies
            remove=yes
        [/event]
        
        [event]
            name=last breath
            [filter]
                id=Minister Hylas
            [/filter]
            [message]
                speaker=unit
                image=portraits/hylas.png
                message= _ "Now I will never see Westin free again..."
            [/message]
        [/event]
        
        [objectives]
            side=1
            [objective]
                description= _ "Defeat Mal M’Brin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Deoran"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}
            {IS_LAST_SCENARIO}
        [/objectives]
    [/event]
    
    [event]
        name=die

        [filter]
            id="Mal M'Brin"
        [/filter]

        [endlevel]
            result=victory
            carryover_report=no
            save=no
            linger_mode=no
        [/endlevel]
    [/event]

    # in order to allow Hylas to die, the death events aren't included from the
    # standard location here
    [event]
        name=last breath
        [filter]
            id=Deoran
        [/filter]
        [message]
            speaker=unit
            image=portraits/deoran-sad.png
            message= _ "I have failed my kingdom and duty..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Jarek
        [/filter]
        [message]
            speaker=unit
            message= _ "Far from home I fall — but not in vain! Guard our people, Deoran!"
        [/message]
    [/event]
[/scenario]