#textdomain wesnoth-Genesis

[scenario]
    id=18_Black_Fire
    name= _ "Black Fire"
    map_data="{~add-ons/Genesis/episode1/maps/18_Black_Fire.map}"
    next_scenario=19_Twilight_Vision
    victory_when_enemies_defeated=no
    turns=27

    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {DAWN_NO_SOUND}
    {DAWN_NO_SOUND}
    {MORNING}
    {MORNING}
    {MORNING}
    {MIDDAY}
    {MIDDAY}
    {MIDDAY}
    {AFTERNOON}
    {AFTERNOON}
    {AFTERNOON}
    {DUSK}
    {DUSK_NO_SOUND}
    {DUSK_NO_SOUND}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {MIDNIGHT}
    {MIDNIGHT}
    {MIDNIGHT}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}

    {SCENARIO_MUSIC casualties_of_war.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}

    {STORYTXT_BLACK_FIRE}
    [side]
        {PLAYER_FAE}
        {FAERIE_RECRUITS}
        side=1
        {GOLD 240 200 120}
        {INCOME 2 0 -4}
        fog=yes
        shroud=no
    [/side]

    [side]
        {HUMAN_ALLY}
        type=General
        id=humanleader18
        generate_name=yes
        canrecruit=yes
        side=2
        recruit=Swordsman,Pikeman,Javelineer,Longbowman,Dragoon
        {GOLD 280 240 120}
        {INCOME 5 4 3}
        share_view=yes
        share_vision=all
        [ai]
            aggression=0.2
            caution=0.8
        [/ai]
    [/side]

    [side]
        {ETHEA_ENEMY_SIDE}
        {AGGRESSIVE_SIDE}
        type=Inferno Demon
        id=demonleader18a
        generate_name=yes
        canrecruit=yes
        side=3
        {GOLD 400 500 700}
        {INCOME 25 30 40}
        village_support=3
        recruit=Demon Grunt,Fire Demon,Demon Sword Dancer,Blood Imp
    [/side]

    [side]
        {ETHEA_ENEMY_SIDE}
        {AGGRESSIVE_SIDE}
        type=Demon Hellion
        id=demonleader18b
        generate_name=yes
        canrecruit=yes
        side=4
        {GOLD 400 500 700}
        {INCOME 25 30 40}
        village_support=3
        recruit=Demon Windlasher,Demon Zephyr,Demon Berserker,Demonic Hound
    [/side]

    {STARTING_VILLAGES_ALL 2}
    {STARTING_VILLAGES 1 8}
    {STARTING_VILLAGES 3 10}
    {STARTING_VILLAGES 4 10}

    [event]
        name=prestart
        [store_unit]
            [filter]
                id=Yumi
            [/filter]
            variable=yumi
        [/store_unit]
        [kill]
            id=Yumi
        [/kill]
        [store_unit]
            [filter]
                id=Aryel
            [/filter]
            variable=aryel
        [/store_unit]
        [kill]
            id=Yumi,Aryel
        [/kill]

        [if]
            [have_unit]
                id=Haart
            [/have_unit]
            [then][/then]
            [else]
                [unit]
                    side=1
                    id=Haart
                    name= _ "General Haart"
                    type=General
                    random_traits=no
                    [modifications]
                        {TRAIT_LOYAL}
                        {TRAIT_STRONG}
                    [/modifications]
                    x,y=recall,recall
                [/unit]
            [/else]
        [/if]
        [store_unit]
            [filter]
                id=Haart
            [/filter]
            variable=haart
        [/store_unit]
        [kill]
            id=Yumi,Aryel,Haart
        [/kill]

        {GUARDIAN_NOID "Longbowman" 2 15 21}
        {GUARDIAN_NOID "Longbowman" 2 19 10}
        {GUARDIAN_NOID "Longbowman" 2 6 25}
        {GUARDIAN_NOID "Longbowman" 2 2 25}
        {GUARDIAN_NOID "Lieutenant" 2 4 24}
        {GUARDIAN_NOID "Longbowman" 2 24 25}
        {GUARDIAN_NOID "Longbowman" 2 20 25}
        {GUARDIAN_NOID "Lieutenant" 2 22 24}
        {GUARDIAN_NOID "Shock Trooper" 2 14 11}
        {GUARDIAN_NOID "Longbowman" 2 14 14}
        {GUARDIAN_NOID "Longbowman" 2 19 14}
        {GUARDIAN_NOID "Longbowman" 2 10 15}
        {GUARDIAN_NOID "Swordsman" 2 9 25}
        {GUARDIAN_NOID "Swordsman" 2 17 25}
        [set_variable]
            name=turn_fire_dmg
            value=0
        [/set_variable]

        [unit]
            side=1
            id=fleure
            name= _ "Fleure"
            type=Red Mage
            gender=female
            random_traits=no
            animate=no
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
                {TRAIT_QUICK}
            [/modifications]
            x,y=14,29
            hitpoints=35
            experience=68
        [/unit]
        [unit]
            side=2
            generate_name=yes
            type=Swordsman
            random_traits=yes
            animate=no
            x,y=11,29
            hitpoints=12
            experience=13
        [/unit]
        [unit]
            side=2
            generate_name=yes
            type=Pikeman
            random_traits=yes
            animate=no
            x,y=12,28
            hitpoints=28
            experience=15
        [/unit]
        [unit]
            side=2
            generate_name=yes
            type=Swordsman
            random_traits=yes
            animate=no
            x,y=15,29
            hitpoints=15
            experience=25
        [/unit]
        [unit]
            side=2
            generate_name=yes
            type=Javelineer
            random_traits=yes
            animate=no
            x,y=11,31
            hitpoints=10
            experience=40
        [/unit]
        [unit]
            side=2
            generate_name=yes
            type=Shock Trooper
            random_traits=yes
            animate=no
            x,y=13,32
            hitpoints=20
            experience=34
        [/unit]
        [unit]
            side=3
            generate_name=yes
            type=Fire Demon
            random_traits=yes
            animate=no
            x,y=10,29
            hitpoints=37
            experience=55
        [/unit]
        [unit]
            side=3
            generate_name=yes
            type=Demon Sword Dancer
            random_traits=yes
            animate=no
            x,y=11,32
            hitpoints=28
            experience=76
        [/unit]
        [unit]
            side=3
            generate_name=yes
            type=Demon Grunt
            random_traits=yes
            animate=no
            x,y=12,30
            hitpoints=32
            experience=44
        [/unit]
        [unit]
            side=3
            generate_name=yes
            type=Fire Demon
            random_traits=yes
            animate=no
            x,y=14,30
            hitpoints=25
            experience=27
        [/unit]
        [unit]
            side=3
            generate_name=yes
            type=Inferno Demon
            random_traits=yes
            animate=no
            x,y=14,33
            hitpoints=42
            experience=57
        [/unit]
        [unit]
            side=4
            generate_name=yes
            type=Demon Berserker
            random_traits=yes
            animate=no
            x,y=17,30
            hitpoints=17
            experience=16
        [/unit]
        [unit]
            side=4
            generate_name=yes
            type=Demon Zephyr
            random_traits=yes
            animate=no
            x,y=18,32
            hitpoints=22
            experience=36
        [/unit]
        [unit]
            side=4
            generate_name=yes
            type=Demon Berserker
            random_traits=yes
            animate=no
            x,y=15,31
            hitpoints=26
            experience=43
        [/unit]
        [unhide_unit]
            [filter][/filter]
        [/unhide_unit]
    [/event]

    [event]
        name=start

        {RECALL_TALYA 20 20}
        [redraw]
            side=1
            clear_shroud=yes
        [/redraw]
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=9,21
            radius=3
            multiturn=no
        [/lift_fog]

        [message]
            speaker=Talya
            message= _ "General! How's the battle look?"
        [/message]
        [message]
            speaker=humanleader18
            message= _ "Not good. Where's General Haart?"
        [/message]
        [message]
            speaker=Talya
            message= _ "He went to round up more men. We probably need the rest of the armies here to actually keep these demons out of the city."
        [/message]
        [message]
            speaker=humanleader18
            message= _ "We're having enough trouble as it is, with only their advance forces here. And what about the king? There's still a warrant out for your arrest, as I believe even General Haart was imprisoned until not long ago."
        [/message]
        [message]
            speaker=Talya
            message= _ "Erm, it was actually us who broke him out. As for that warrant, well, I guess you can feel free to try and arrest me if you want."
        [/message]
        [message]
            speaker=humanleader18
            message= _ "We clearly have more pressing matters and that order was stupid anyway. I'm more concerned about our defenses. Having fought alongside the Urdemons once or twice, I am quite cognizant of how powerful they are."
        [/message]
        [message]
            speaker=Talya
            message= _ "(shrugs) General Haart will probably find a way. He said he would take a day to 'convince' them. So until he arrives, we're on our own. But I brought friends!"
        [/message]
        [message]
            speaker=humanleader18
            message= _ "Faeries, huh. This could get us in big trouble."
        [/message]
        [message]
            speaker=Esther
            message= _ "Relax. We're here to fight the demons, not you."
        [/message]
        [message]
            speaker=humanleader18
            message= _ "I am not doubting you. It's just that the Council's mandate-"
        [/message]
        [message]
            speaker=Talya
            message= _ "We, uhm, took care of that. About the king, the faerie will handle that too. We just have to focus on defending the city."
        [/message]
        [message]
            speaker=humanleader18
            message= _ "Stirring up trouble, professor? Then again, I can't say I haven't done that before. Fine. To arms! Defend the gates!"
        [/message]

        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Survive until end of turns")}
            {OBJECTIVE_VICTORY  ( _ "OR: Defeat all enemy leaders")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Esther")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Talya")}
            {OBJECTIVE_DEFEAT  ( _ "Demons reach the upper right castle")}
            {OBJECTIVE_CARRYOVER}
        [/objectives]
    [/event]
    [event]
        name=new turn
        first_time_only=no
        [if]
            [variable]
                name=turn_fire_dmg
                numerical_not_equals=0
            [/variable]
            [then]
                [store_unit]
                    [filter]
                        side=1
                        [not]
                            id=Esther
                        [/not]
                    [/filter]
                    variable=fire_dmg_unit
                [/store_unit]
                {PLAY_SOUND "fire.wav"}
            [/then]
        [/if]
        [for]
            array=fire_dmg_unit
            [do]
                [if]
                    [variable]
                        name=fire_dmg_unit[$i].hitpoints
                        greater_than=$turn_fire_dmg
                    [/variable]

                    [then]
                        {VARIABLE_OP fire_dmg_unit[$i].hitpoints sub $turn_fire_dmg}
                    [/then]
                    [else]
                        {VARIABLE fire_dmg_unit[$i].hitpoints 1}
                    [/else]
                [/if]
                [unstore_unit]
                    variable=fire_dmg_unit[$i]
                    find_vacant=no
                    text= _ "burned"
                    {COLOR_HARM}
                [/unstore_unit]
            [/do]
        [/for]
        {CLEAR_VARIABLE fire_dmg_unit}
    [/event]
    [event]
        name=turn 7

        [message]
            speaker=Talya
            message= _ "Man, there are so many of them."
        [/message]
        [message]
            speaker=Esther
            message= _ "That's how it always feels like when fighting demons. Doesn't help that each one of them is quite powerful too."
        [/message]
        [message]
            speaker=Talya
            message= _ "Yeah, you're telling me. That last guy nearly burned me to a crisp!"
        [/message]
        [message]
            speaker=Esther
            message= _ "Stay close, and I'll be able to keep them from getting to you, at least."
        [/message]
        [message]
            speaker=Talya
            message= _ "Alright, thanks."
        [/message]
    [/event]
    [event]
        name=turn 11

        [message]
            speaker=Talya
            message= _ "Is it just me, or did it just get a bit warmer?"
        [/message]
        [message]
            speaker=Esther
            message= _ "Hmm. You're right. The demons are preparing something."
        [/message]
        [message]
            speaker=Talya
            message= _ "Ugh. You're telling me they decided that bringing such a big army wasn't enough..."
        [/message]
        [message]
            speaker=Esther
            message= _ "Demons are always a pain to deal with."
        [/message]
        [message]
            speaker=Talya
            message= _ "You said it."
        [/message]
    [/event]

    [event]
        name=turn 13
        {REPEAT 2 ({QUAKE_FIXED "rumble.ogg"})}

        {SPAWN_ID ("Demon Windlasher") 3 2 38 ("demon1") ("female")}
        {SPAWN_ID ("Demon Windlasher") 4 24 38 ("demon2") ("female")}

        {SPAWN_ID ("Demon Zephyr") 3 2 37 ("demon3") ("male")}

        {SPAWN_ID ("Demon Zephyr") 4 22 39 ("demon4") ("male")}

        #ifdef NORMAL
        {SPAWN ("Demon Zephyr") 3 4 39}
        {SPAWN ("Demon Zephyr") 4 24 37}
        #endif
        #ifdef HARD
        {SPAWN ("Demon Zephyr") 3 4 39}
        {SPAWN ("Demon Zephyr") 3 3 40}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        {SPAWN ("Demon Galerunner") 4 24 36}
        #endif

        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x=2,24,2,22
            y=38,38,37,39
            multiturn=no
        [/lift_fog]
        [redraw]
            side=1
            clear_shroud=yes
        [/redraw]
        [message]
            speaker=demon1
            message= _ "Their battlements still hold."
        [/message]
        [message]
            speaker=demon3
            message= _ "Not for long."
        [/message]
        [message]
            speaker=demon2
            message= _ "The winds of war lead us to battle."
        [/message]
        [message]
            speaker=demon4
            message= _ "By the end of this day, all these humans shall be naught but ashes."
        [/message]
        [message]
            speaker=Talya
            message= _ "Oh boy. Those guys sound strong. This is going to turn into such a mess."
        [/message]
        [gold]
            amount={ON_DIFFICULTY 50 60 80}
            side=3
        [/gold]
        [gold]
            amount={ON_DIFFICULTY 50 60 80}
            side=4
        [/gold]
    [/event]
    [event]
        name=turn 14 end
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        [set_variable]
            name=turn_fire_dmg
            value=3
        [/set_variable]
    [/event]
    [event]
        name=side 1 turn 15
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        {COLOR_ADJUST 20 0 0}
        [message]
            speaker=Talya
            message= _ "Ouch- it's... hot!"
        [/message]
        [message]
            speaker=Esther
            message= _ "I've seen this trick before! There must be some lava or volcanoes nearby. The demons use the heat to power their sorcery."
        [/message]
        [message]
            speaker=Talya
            message= _ "Ugh. Can we do anything about it?"
        [/message]
        [message]
            speaker=Esther
            message= _ "We have to kill the demon channeling the magma's energies. Problem is, it's probably one of the enemy leaders doing it, so we have to get to them first."
        [/message]
        [message]
            speaker=Talya
            message= _ "That is quite a problem. Most likely we'll just have to tough it out."
        [/message]
    [/event]
    [event]
        name=turn 18
        {REPEAT 2 ({QUAKE_FIXED "rumble.ogg"})}
        {PLAY_SOUND "dragonstick.ogg"}

        [message]
            speaker=Talya
            message= _ "Uuuhhh, that sound... don't tell me, there's more of those flying demons coming."
        [/message]
        [message]
            speaker=Esther
            message= _ "Unfortunately so."
        [/message]
        [message]
            speaker=Talya
            message= _ "(groans)"
        [/message]

        {SPAWN ("Demon Windlasher") 3 2 38}
        {SPAWN ("Demon Windlasher") 4 24 38}

        {SPAWN ("Demon Zephyr") 3 2 37}
        {SPAWN ("Demon Zephyr") 4 22 39}

        #ifdef NORMAL
        {SPAWN ("Demon Zephyr") 3 4 39}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        #endif
        #ifdef HARD
        {SPAWN ("Demon Zephyr") 3 4 39}
        {SPAWN ("Demon Stormbringer") 3 3 40}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        {SPAWN ("Demon Galerunner") 4 24 36}
        #endif
        [gold]
            amount={ON_DIFFICULTY 60 70 90}
            side=3
        [/gold]
        [gold]
            amount={ON_DIFFICULTY 60 70 90}
            side=4
        [/gold]
    [/event]

    [event]
        name=turn 19 end
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        [set_variable]
            name=turn_fire_dmg
            value=4
        [/set_variable]
    [/event]
    [event]
        name=side 1 turn 20
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        {COLOR_ADJUST 30 0 0}
        [message]
            speaker=Talya
            message= _ "Ugh, feels like my skin's burning off."
        [/message]
    [/event]

    [event]
        name=turn 22
        {REPEAT 2 ({QUAKE_FIXED "rumble.ogg"})}

        [message]
            speaker=Esther
            message= _ "Here they come again."
        [/message]

        {SPAWN ("Demon Windlasher") 3 2 38}
        {SPAWN ("Demon Windlasher") 4 24 38}
        {SPAWN ("Demon Stormbringer") 3 2 37}
        {SPAWN ("Demon Zephyr") 4 22 39}

        #ifdef NORMAL
        {SPAWN ("Demon Stormbringer") 3 4 39}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        #endif
        #ifdef HARD
        {SPAWN ("Demon Zephyr") 3 4 39}
        {SPAWN ("Demon Stormbringer") 3 3 40}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        {SPAWN ("Demon Galerunner") 4 24 36}
        #endif
        [gold]
            amount={ON_DIFFICULTY 70 80 100}
            side=3
        [/gold]
        [gold]
            amount={ON_DIFFICULTY 70 80 100}
            side=4
        [/gold]
    [/event]

    [event]
        name=turn 23

        [message]
            speaker=Talya
            message= _ "Ahhh, we just have to hold out a bit more. I'm sure General Haart will be back soon with reinforcements."
        [/message]
        [message]
            speaker=Esther
            message= _ "Did he really need a whole day to find his men and convince the other generals?"
        [/message]
        [message]
            speaker=Talya
            message= _ "Well, not exactly. My guess is he was planning to, uhm, take some more drastic measures. Like, incapacitate the ones who seem unlikely to cooperate. You know how these things go."
        [/message]
        [message]
            speaker=Esther
            message= _ "Is now really the time for that? The demons are nearly overrunning us already."
        [/message]
        [message]
            speaker=Talya
            message= _ "Better now, rather than when a bunch of jerks arrive in the middle of the fight and squash us without even caring about holding off the demons."
        [/message]
        [message]
            speaker=Esther
            message= _ "So the politics have gotten that bad around here, huh."
        [/message]
        [message]
            speaker=Talya
            message= _ "Yeah..."
        [/message]
    [/event]

    [event]
        name=turn 23 end
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        [set_variable]
            name=turn_fire_dmg
            value=5
        [/set_variable]
    [/event]
    [event]
        name=side 1 turn 24
        [filter_condition]
            [have_unit]
                id=demonleader18a
            [/have_unit]
        [/filter_condition]

        {COLOR_ADJUST 40 0 0}
        [message]
            speaker=Talya
            message= _ "Owwwww..."
        [/message]
    [/event]

    [event]
        name=turn 25
        {REPEAT 2 ({QUAKE_FIXED "rumble.ogg"})}

        {SPAWN ("Demon Windlasher") 3 2 38}
        {SPAWN ("Demon Windlasher") 4 24 38}

        {SPAWN ("Demon Stormbringer") 3 2 37}
        {SPAWN ("Demon Zephyr") 4 22 39}

        #ifdef NORMAL
        {SPAWN ("Demon Stormbringer") 3 4 39}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        #endif
        #ifdef HARD
        {SPAWN ("Demon Stormbringer") 3 4 39}
        {SPAWN ("Demon Stormbringer") 3 3 40}
        {SPAWN ("Demon Stormbringer") 4 24 37}
        {SPAWN ("Demon Galerunner") 4 24 36}
        #endif
        [gold]
            amount={ON_DIFFICULTY 80 90 110}
            side=3
        [/gold]
        [gold]
            amount={ON_DIFFICULTY 80 90 110}
            side=4
        [/gold]
    [/event]

    [event]
        name=turn 26

        [message]
            speaker=Talya
            message= _ "General Haart just sent a hawk. He's sending some reinforcements our way and will join us soon."
        [/message]
        [gold]
            amount={ON_DIFFICULTY 80 70 50}
            side=1
        [/gold]
        [message]
            speaker=Esther
            message= _ "Great. Fighting off all these demons is pretty tiring."
        [/message]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=19,20
                radius=4
            [/filter_location]
        [/filter]

        [message]
            speaker=Talya
            message= _ "Uh oh. They're breaking into the city."
        [/message]
        [message]
            speaker=Esther
            message= _ "We'll either have to force them back or retreat. Can't let them swarm over us."
        [/message]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=7,12
                radius=4
            [/filter_location]
        [/filter]

        [message]
            speaker=Talya
            message= _ "They just keep coming!"
        [/message]
        [message]
            speaker=Esther
            message= _ "Don't give up! We have to keep fighting!"
        [/message]
    [/event]
    [event]
        name=last breath
        first_time_only=yes
        [filter]
            side=3,4
        [/filter]
        [filter_second]
            id=Talya
        [/filter_second]

        [message]
            speaker=unit
            message= _ "Slain... by a human..."
        [/message]
        [message]
            speaker=Talya
            message= _ "Wow, I did it! Take that, you demons!"
        [/message]
    [/event]

    [event]
        name=attack
        first_time_only=yes
        [filter]
            id=demon1,demon2
        [/filter]

        [message]
            speaker=unit
            message= _ "Your soul is mine."
        [/message]
    [/event]
    [event]
        name=attack
        first_time_only=yes
        [filter]
            id=demon3,demon4
        [/filter]

        [message]
            speaker=unit
            message= _ "Burn!"
        [/message]
    [/event]

    [event]
        name=attack
        first_time_only=yes
        [filter]
            side=3,4
        [/filter]

        [message]
            speaker=unit
            message= _ "Slay them all!"
        [/message]
    [/event]

    [event]
        name=last breath
        first_time_only=yes
        [filter]
            id=humanleader18
        [/filter]

        [message]
            speaker=humanleader18
            message= _ "Eaugh! Fight on- without me..."
        [/message]
    [/event]

    # wall breaking

    [event]
        name=wall_demolish
        first_time_only=yes

        [message]
            speaker=Esther
            message= _ "They're breaking down the walls!"
        [/message]
        [message]
            speaker=Talya
            message= _ "You're kidding me... I thought we were safe behind these things!"
        [/message]
        [message]
            speaker=Esther
            message= _ "You're never safe against these guys. We'll just need to try our best to keep them from coming through the gaps."
        [/message]
    [/event]
    [event]
        name=wall_demolish2
        first_time_only=yes

        [message]
            speaker=Talya
            message= _ "Ugh, they're going to tear down the whole city."
        [/message]
    [/event]
    [event]
        name=wall_demolish3
        first_time_only=yes

        [message]
            speaker=Talya
            message= _ "Uuuu, my poor home."
        [/message]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=5,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=5,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=5,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=7,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=7,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=7,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=3,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=3,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=3,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=19,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=19,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=19,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=9,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=9,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=9,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=17,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=17,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=17,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=21,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=21,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=21,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=23,28
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=23,27
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=23,26
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish
        [/fire_event]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=6,20
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=6,19
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=6,18
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish2
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=17,17
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=17,16
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=17,15
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish2
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=14,17
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=14,16
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=14,15
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish2
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=10,18
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=10,17
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=10,16
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish2
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=9,9
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=9,8
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=9,7
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish3
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=15,9
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=15,8
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=15,7
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish3
        [/fire_event]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=2,8
            [/filter_location]
        [/filter]
        {PLAY_SOUND "dragonstick.ogg"}
        [terrain]
            x,y=2,7
            terrain=Btym^Sy|
        [/terrain]
        [terrain]
            x,y=2,6
            terrain=Btym^Sy|
        [/terrain]
        [redraw][/redraw]

        [fire_event]
            name=wall_demolish3
        [/fire_event]
    [/event]

    # demon leader deaths
    [event]
        name=last breath
        first_time_only=yes
        [filter]
            id=demonleader18a
        [/filter]

        [message]
            speaker=demonleader18a
            message= _ "Argh! Defeated... by filthy mortals..."
        [/message]

        [set_variable]
            name=turn_fire_dmg
            value=0
        [/set_variable]
    [/event]
    [event]
        name=last breath
        first_time_only=yes
        [filter]
            id=demonleader18b
        [/filter]

        [message]
            speaker=demonleader18b
            message= _ "The power! It slips away..."
        [/message]
    [/event]

    # victory events
    [event]
        name=enemies defeated

        [message]
            speaker=Talya
            message= _ "Great! We actually managed to push the demons back!"
        [/message]
        [message]
            speaker=Esther
            message= _ "Not exactly. Look in the distance. That crimson glow on the horizon means more are coming."
        [/message]

        [message]
            speaker=Talya
            message= _ "That's fine. We managed to hold them off so far. Esther, you should go help Aryel and Yumi."
        [/message]
        [message]
            speaker=Esther
            message= _ "Erm, well... I would love to go join them, but these demons are quite powerful-"
        [/message]
        [message]
            speaker=Talya
            message= _ "Yeah, I know we're not as strong as you guys, but we humans aren't that weak either. C'mon, you have to give us a chance to stand up for ourselves. We'll be able to beat them. We already did just now."
        [/message]
        [message]
            speaker=Esther
            message= _ "I sure hope so."
        [/message]
        [message]
            speaker=Talya
            message= _ "Don't look so conflicted. They're your friends."
        [/message]
        [message]
            speaker=Esther
            message= _ "I know. (sighs) I wish I could do more, but all I can do right now is run around and hope I can help."
        [/message]
        [message]
            speaker=Talya
            message= _ "You've been plenty helpful. We wouldn't have made it out of Helemoor without you. And you know Aryel would've been in big trouble had you not found her."
        [/message]
        [message]
            speaker=Esther
            message= _ "She and Yumi have a way of getting into trouble with me not around."
        [/message]
        [message]
            speaker=Talya
            message= _ "All the more reason to go help them."
        [/message]
        [message]
            speaker=Esther
            message= _ "(nods) You'd better still be here when we get back."
        [/message]
        [message]
            speaker=Talya
            message= _ "I will! Good luck!"
        [/message]
        [message]
            speaker=Esther
            message= _ "Same to you."
        [/message]

        [endlevel]
            result=victory
            {NEW_GOLD_CARRYOVER 40}
            next_scenario=19_Twilight_Vision
        [/endlevel]
    [/event]
    [event]
        name=time over

        [store_unit]
            [filter]
                id=Talya
            [/filter]
            variable=talya
        [/store_unit]

        [unstore_unit]
            variable=haart
            find_vacant=yes
            x,y=$talya.x,$talya.y
        [/unstore_unit]
        [redraw][/redraw]

        [message]
            speaker=Haart
            message= _ "Talya, there you are! I was looking for you."
        [/message]
        [message]
            speaker=Talya
            message= _ "General Haart, just in time! How many men could you round up?"
        [/message]
        [message]
            speaker=Haart
            message= _ "I was able to convince some of the other generals to place their armies under my command. It wasn't too difficult, considering the city is under heavy assault. This way, all responsibility of aiding you or the faeries falls upon me should anyone ask."
        [/message]
        [message]
            speaker=Talya
            message= _ "Haha, I see. Esther, we'll handle things from here. You should go help Aryel and Yumi."
        [/message]
        [message]
            speaker=Esther
            message= _ "Is that... okay? I would love to go join them, but these demons are quite powerful-"
        [/message]
        [message]
            speaker=Talya
            message= _ "Yeah, I know we're not as strong as you guys, but we humans aren't that weak either. C'mon, you have to give us a chance to stand up for ourselves. We'll be able to beat them. We already did just now."
        [/message]
        [message]
            speaker=Esther
            message= _ "I sure hope so."
        [/message]
        [message]
            speaker=Talya
            message= _ "Don't look so conflicted. They're your friends."
        [/message]
        [message]
            speaker=Esther
            message= _ "I know. (sighs) I wish I could do more, but all I can do right now is run around and hope I can help."
        [/message]
        [message]
            speaker=Talya
            message= _ "You've been plenty helpful. We wouldn't have made it out of Helemoor without you. And you know Aryel would've been in big trouble had you not found her."
        [/message]
        [message]
            speaker=Esther
            message= _ "She and Yumi have a way of getting into trouble with me not around."
        [/message]
        [message]
            speaker=Talya
            message= _ "All the more reason to go help them."
        [/message]
        [message]
            speaker=Esther
            message= _ "(nods) You'd better still be here when we get back."
        [/message]
        [message]
            speaker=Talya
            message= _ "I will! Good luck!"
        [/message]
        [message]
            speaker=Esther
            message= _ "Same to you."
        [/message]

        [endlevel]
            result=victory
            {NEW_GOLD_CARRYOVER 40}
            next_scenario=19_Twilight_Vision
        [/endlevel]
    [/event]

    [event]
        name=victory
        {CLEAR_VARIABLE turn_fire_dmg}
    [/event]

    # defeat events
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=3,4
            [filter_location]
                x,y=21,2
                radius=2
            [/filter_location]
        [/filter]

        [message]
            speaker=Talya
            message= _ "Oh boy, now they're going to break into the rest of the residential areas. This is going to be a real slaughter..."
        [/message]
        [message]
            speaker=Esther
            message= _ "We really should have been able to do better than that."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Esther
        [/filter]

        [message]
            speaker=Esther
            message= _ "Ugh..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Talya
        [/filter]

        [message]
            speaker=Talya
            message= _ "Augh!"
        [/message]

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