#textdomain wesnoth-Genesis

[scenario]
    id=22_Moonlit_Night
    name= _ "Moonlit Night"
    map_data="{~add-ons/Genesis/episode1/maps/22_Moonlit_Night.map}"
    next_scenario=23_Dawn
    victory_when_enemies_defeated=no
    disallow_recall=no
    turns=-1
    {ETERNALDARK3}

    {SCENARIO_MUSIC into_the_shadows.ogg}

    [side]
        {PLAYER_FAE}
        {NO_INCOME_SIDE}
        {UNDEAD_RECRUITS}
        side=1
        {GOLD 600 500 300}
        fog=yes
        shroud=yes
    [/side]

    [side]
        {YUURE_SIDE}
        {AGGRESSIVE_SIDE}
        side=2
        fog=no
        hidden=yes
        shroud=no
    [/side]

    [side]
        side=3
        no_leader=yes
        team_name=yuure
        user_team_name= _ "team_name^Copies"
        hidden=yes
        controller=ai
        fog=no
        shroud=no
        color=green
        {AGGRESSIVE_SIDE}
    [/side]

#define CAVE_WALL_SEED
        [store_locations]
            variable=blood_hex
            terrain=Woby
            [and]
                [not]
                    [filter_adjacent_location]
                        terrain=Wuyb
                    [/filter_adjacent_location]
                [/not]
            [/and]
            [and]
                [not]
                    [filter]
                    [/filter]
                [/not]
            [/and]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..50
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wuyb
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

#define DRAW_WALLS
        [store_locations]
            variable=blood_hex
            terrain=Woby
            [filter_adjacent_location]
                terrain=Wuyb
                count=1
            [/filter_adjacent_location]
            [and]
                [not]
                    [filter]
                    [/filter]
                [/not]
            [/and]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..50
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wuyb
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

#define DRAW_WALLS2
        [store_locations]
            variable=blood_hex
            terrain=Woby
            [filter_adjacent_location]
                terrain=Wuyb
                count=2
            [/filter_adjacent_location]
            [and]
                [not]
                    [filter]
                    [/filter]
                [/not]
            [/and]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..150
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wuyb
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

#define DRAW_WALLS3
        [store_locations]
            variable=blood_hex
            terrain=Woby
            [filter_adjacent_location]
                terrain=Wuyb
                count=3
            [/filter_adjacent_location]
            [and]
                [not]
                    [filter]
                    [/filter]
                [/not]
            [/and]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..200
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wuyb
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

#define DRAW_WALLS4
        [store_locations]
            variable=blood_hex
            terrain=Woby
            [filter_adjacent_location]
                terrain=Wuyb
                count=4
            [/filter_adjacent_location]
            [and]
                [not]
                    [filter]
                    [/filter]
                [/not]
            [/and]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..300
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wuyb
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

#define BREAK_WALLS
        [store_locations]
            variable=blood_hex
            terrain=Wuyb
            [filter_adjacent_location]
                terrain=Woby
                count=2,3,4
            [/filter_adjacent_location]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..65
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Woby
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef

    [event]
        name=unit placed
        first_time_only=no
        [filter]
            side=1
        [/filter]

        [object]
            silent=yes
            duration=scenario
            [filter]
                x,y=$x1,$y1
            [/filter]
            [effect]
                apply_to=loyal
            [/effect]
        [/object]
    [/event]

# enemy spawns

    #spawns
    [event]
        name=new turn
        first_time_only=no

        [filter_condition]
            [variable]
                name=boss_battle
                greater_than=0
            [/variable]
        [/filter_condition]

        [store_locations]
            variable=hex
            terrain=Woby
        [/store_locations]
        [for]
            array=hex
            [do]
                #ifdef HARD
                [set_variable]
                    name=spawn_val
                    rand=1..900
                [/set_variable]
                #endif
                #ifdef NORMAL
                [set_variable]
                    name=spawn_val
                    rand=1..1500
                [/set_variable]
                #endif
                #ifdef EASY
                [set_variable]
                    name=spawn_val
                    rand=1..1800
                [/set_variable]
                #endif
                [if]
                    [variable]
                        name=spawn_val
                        less_than=3
                    [/variable]
                    [then]
                        {SPAWN_NOID ("Demon Nightmare") 2 $hex[$i].x $hex[$i].y}
                    [/then]
                [/if]
                [if]
                    [variable]
                        name=spawn_val
                        numerical_equals=5
                    [/variable]
                    [then]
                        {SPAWN_NOID ("Demon Dreamweaver") 2 $hex[$i].x $hex[$i].y}
                    [/then]
                [/if]
                {CLEAR_VARIABLE spawn_val}
            [/do]
        [/for]
        {CLEAR_VARIABLE hex}
        [store_locations]
            variable=hex
            terrain=Woby
        [/store_locations]
        [for]
            array=hex
            [do]
                #ifdef HARD
                [set_variable]
                    name=spawn_val
                    rand=1..1700
                [/set_variable]
                #endif
                #ifdef NORMAL
                [set_variable]
                    name=spawn_val
                    rand=1..2700
                [/set_variable]
                #endif
                #ifdef EASY
                [set_variable]
                    name=spawn_val
                    rand=1..3000
                [/set_variable]
                #endif
                [if]
                    [variable]
                        name=spawn_val
                        numerical_equals=4
                    [/variable]
                    [then]
                        {SPAWN_NOID ("Shadow Demon") 2 $hex[$i].x $hex[$i].y}
                    [/then]
                [/if]
                {CLEAR_VARIABLE spawn_val}
            [/do]
        [/for]
        {CLEAR_VARIABLE hex}
    [/event]

#define DRAW_VOID
        [store_locations]
            variable=blood_hex
            terrain=Woby,Wuyb
            [filter_adjacent_location]
                terrain=Qxu,Qxu^*
                count=1-3
            [/filter_adjacent_location]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..25
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Qxu
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [store_locations]
            variable=blood_hex
            terrain=Woby,Wuyb
            [filter_adjacent_location]
                terrain=Qxu,Qxu^*
                count=4-6
            [/filter_adjacent_location]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..50
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                            x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Qxu
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [redraw][/redraw]
#enddef
#define DRAW_WATER
        [store_locations]
            variable=blood_hex
            terrain=Woby,Wuyb
            [filter_adjacent_location]
                terrain=Wo
                count=1-3
            [/filter_adjacent_location]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..16
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                             x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wo
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
        [store_locations]
            variable=blood_hex
            terrain=Woby,Wuyb
            [filter_adjacent_location]
                terrain=Wo
                count=4-6
            [/filter_adjacent_location]
        [/store_locations]
        [for]
            array=blood_hex
            [do]
                [set_variable]
                    name=change_terrain
                    rand=1..21
                [/set_variable]
                [if]
                    [variable]
                        name=change_terrain
                        less_than=6
                    [/variable]
                    [then]
                        [terrain]
                            x,y=$blood_hex[$i].x,$blood_hex[$i].y
                            terrain=Wo
                        [/terrain]
                    [/then]
                [/if]
                {CLEAR_VARIABLE change_terrain}
            [/do]
        [/for]
        {CLEAR_VARIABLE blood_hex}
#enddef
    #REDRAW THE MAZE
    [event]
        name=new turn
        first_time_only=no

        {BREAK_WALLS}
        {DRAW_WALLS}
        {DRAW_WALLS}
        {DRAW_WALLS2}
        {BREAK_WALLS}
        {DRAW_WALLS2}
        {DRAW_WALLS3}
        {DRAW_WALLS3}
        {DRAW_WALLS4}
        {BREAK_WALLS}

        [if]
            [variable]
                name=boss_battle
                numerical_equals=2
            [/variable]
            [then]
                {DRAW_VOID}
                {VARIABLE_OP turn_count add 1}
                {VARIABLE turn_dmg $turn_count}
                #ifdef HARD
                {VARIABLE_OP turn_dmg multiply 5}
                #endif
                #ifdef NORMAL
                {VARIABLE_OP turn_dmg multiply 8}
                #endif
                #ifdef EASY
                {VARIABLE_OP turn_dmg multiply 10}
                #endif
                [harm_unit]
                    [filter]
                        id=Luna
                    [/filter]
                    animate=no
                    kill=no
                    amount=$turn_dmg
                [/harm_unit]
                {CLEAR_VARIABLE turn_dmg}
            [/then]
        [/if]
    [/event]

    [event]
        name=prestart

        {CAVE_WALL_SEED}
        {CAVE_WALL_SEED}
        {DRAW_WALLS}
        {DRAW_WALLS}
        {DRAW_WALLS2}

        [set_variable]
            name=boss_battle
            value=0
        [/set_variable]

        {FADE_SCREEN}

        [store_unit]
            [filter]
                id=Talya
            [/filter]
            variable=talya
        [/store_unit]
        [kill]
            id=Aryel,Yumi,Esther,Talya
        [/kill]
        [unstore_unit]
            variable=yumi
            x,y=16,8
        [/unstore_unit]
        [unstore_unit]
            variable=aryel
            x,y=15,8
        [/unstore_unit]

        {CLEAR_VARIABLE aryel}
        {CLEAR_VARIABLE yumi}
        [redraw]
            side=1
            clear_shroud=yes
        [/redraw]

        # recruiting code for this scenario
        [set_menu_item]
            id=recruit_manifestation
            description= _ "Recruit Manifestation"
            image="attacks/wail.png~SCALE(18,18)"
            [show_if]
                [variable]
                    name=side_number
                    numerical_equals=1
                [/variable]
            [/show_if]
            [filter_location]
                [not]
                    [filter][/filter]
                [/not]
                [filter_adjacent_location]
                    [filter]
                        side=1
                        id=Yumi
                    [/filter]
                [/filter_adjacent_location]
            [/filter_location]
            [command]
                [store_gold]
                    [filter_side]
                        side=1
                    [/filter_side]
                    variable=side1gold
                [/store_gold]
                [if]
                    [variable]
                        name=side1gold
                        less_than=5
                    [/variable]
                    [then]
                        {MESSAGE_NOT_ENOUGH_GOLD}
                    [/then]
                    [else]
                        [unit]
                            side=1
                            type=Manifestation
                            x,y=$x1,$y1
                            moves,attacks_left=0,0
                            animate=yes
                            upkeep=free
                            [modifications]
                                {TRAIT_LOYAL}
                            [/modifications]
                        [/unit]
                        {VARIABLE_OP side1gold sub 5}
                        [modify_side]
                            side=1
                            gold=$side1gold
                        [/modify_side]
                        {CLEAR_VARIABLE side1gold}
                    [/else]
                [/if]
            [/command]
        [/set_menu_item]
        [sound_source]
            id=s22dark2
            x=14
            y=14
            sounds="dark-2.ogg"
            full_range=100
            delay=0
            loop=-1
            check_fogged=no
            check_shrouded=no
        [/sound_source]
        [sound_source]
            id=s22dark1
            x=14
            y=14
            sounds="dark-1.ogg"
            full_range=100
            delay=0
            loop=-1
            check_fogged=no
            check_shrouded=no
        [/sound_source]
    [/event]

    [event]
        name=recall
        first_time_only=no
        [filter]
            side=1
        [/filter]
        [object]
            silent=yes
            [filter]
                x,y=$x1,$y1
            [/filter]
            [effect]
                apply_to=movement_costs
                replace=yes
                [movement_costs]
                    deep_water=2
                    unwalkable=3
                [/movement_costs]
            [/effect]
            [effect]
                apply_to=defense
                replace=yes
                [defense]
                    deep_water=70
                    unwalkable=70
                [/defense]
            [/effect]
        [/object]
    [/event]

    [event]
        name=start

        {UNFADE_SCREEN}
        [unhide_unit]
            [filter][/filter]
        [/unhide_unit]
        {DELAY 1000}

        [message]
            speaker=Yumi
            message= _ "She can't run anymore."
        [/message]
        {TURN_UNIT5 "Aryel"}
        [message]
            speaker=Aryel
            message= _ "That may be so, but..."
        [/message]
        [message]
            speaker=Aryel
            message= _ "(<i>rubs arms</i>) <i>It's really cold down here. I don't feel good about this.</i>"
        [/message]

        {DELAY 1500}

        [unit]
            type=Fake Fire Fae2
            random_traits=no
            name= _ "Esther"
            x,y=14,7
            animate=yes
            side=1
        [/unit]
        [unit]
            type=Mistral Maiden
            random_traits=no
            name= _ "Talya"
            x,y=15,7
            animate=yes
            side=1
        [/unit]
        [unstore_unit]
            variable=esther
            x,y=14,7
        [/unstore_unit]
        [unstore_unit]
            variable=talya
            x,y=15,7
        [/unstore_unit]

        {CLEAR_VARIABLE esther}
        {CLEAR_VARIABLE talya}

        [heal_unit]
            [filter]
                side=1
            [/filter]
            amount=full
            animate=no
            restore_attacks=no
            restore_statuses=yes
        [/heal_unit]

        [unhide_unit]
            [filter][/filter]
        [/unhide_unit]

        {TURN_UNIT5 "Esther"}
        {DELAY 500}
        [message]
            speaker=Esther
            message= _ "<i>Everything's so still. The darkness here is so thick, I can barely see anything. Talya looks really uncomfortable. Even Aryel seems scared.</i>"
        [/message]
        [message]
            speaker=Esther
            message= _ "Yumi, I know we beat her before, but do you think we can actually fight her down here?"
        [/message]
        [message]
            speaker=Yumi
            message= _ "Mmm."
        [/message]
        [message]
            speaker=Talya
            message= _ "That last fight was scary enough, but this place... really gives me the creeps."
        [/message]
        [message]
            speaker=Aryel
            message= _ "We can't just let her run free. And besides, <i>Yumi</i> can take her."
        [/message]
        [message]
            speaker=Talya
            message= _ "(<i>whispers</i>) You think so? Yumi's the last person I'd want to fight a demon lady alone. And even you seem unsure of fighting down here."
        [/message]
        [message]
            speaker=Esther
            message= _ "(<i>whispers</i>) Don't underestimate her. If Yumi has her heart set on it, we need to back her up. Besides, she most certainly can handle herself. Aryel and I just look after her because we want to protect her, not because she needs to be babied."
        [/message]
        {DELAY 500}
        [move_unit]
            id=Yumi
            to_x,to_y=17,12
        [/move_unit]
        {DELAY 500}
        [message]
            speaker=Talya
            message= _ "(<i>whispers</i>) Alright. I guess it looks like she's going to go fight, with or without our help."
        [/message]
        [message]
            speaker=Aryel
            message= _ "(<i>whispers</i>) Yeah. If she actually makes up her mind about something, you'll never be able to talk her out of it. Let's just follow her for now."
        [/message]
        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Explore")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Yumi")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Aryel")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Esther")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Talya")}
            {OBJECTIVE_NOTE ( _ "You may recruit by right clicking on a hex next to Yumi or Aryel.")}
            {OBJECTIVE_NOTE ( _ "You may also recruit from the starting area.")}
        [/objectives]
    [/event]

    [event]
        name=moveto
        [filter]
            [filter_location]
                x,y=15,30
                radius=9
            [/filter_location]
            side=1
        [/filter]

        [message]
            speaker=Aryel
            message= _ "Wait up."
        [/message]
        [message]
            speaker=Aryel
            message= _ "You feel that?"
        [/message]
        [message]
            speaker=Aryel
            message= _ "I think we found our little pest."
        [/message]
        {DELAY 500}
        [remove_shroud]
            side=1
            x=15
            y=30
            radius=7
        [/remove_shroud]
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x=15
            y=30
            radius=7
            multiturn=no
        [/lift_fog]
        {SCROLL_TO 15 30}
        {DELAY 500}
        [fade_out_music][/fade_out_music]

        [unit]
            id=Luna
            type=Ephemeral Angel
            animate=yes
            side=2
            x,y=15,30
            random_traits=no
            generate_name=no
            gender=female
        [/unit]

        {REPLACE_SCENARIO_MUSIC silence.ogg}

        [message]
            speaker=Luna
            message= _ "<i>This charade has gone on long enough.</i>"
        [/message]
        [message]
            speaker=Aryel
            message= _ "Yes, it has. We're not letting you get away again."
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>On the contrary, you are the ones who will be trying to escape when I'm through with you-</i>"
        [/message]
        {PLAY_SOUND "magic-faeriefire.ogg"}
        {DELAY 250}

        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=1
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "<i>Wha-</i>"
        [/message]
        [message]
            speaker=Yumi
            message= _ "(<i>eyes glow</i>)"
        [/message]
        {PLAY_SOUND "magic-faeriefire.ogg"}
        {DELAY 250}
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=5
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]
        {DELAY 250}
        {PLAY_SOUND "magic-faeriefire.ogg"}
        {DELAY 250}
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=6
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]
        {DELAY 250}
        [message]
            speaker=Talya
            message= _ "(<i>whispers</i>) Looks like Yumi means business. I didn't even realize she was going to attack."
        [/message]
        [message]
            speaker=Aryel
            message= _ "(<i>whispers</i>) Yumi can be pretty scary, you know. If she actually feels like fighting, she never wastes time by trying to talk it out."
        [/message]
        [message]
            speaker=Esther
            message= _ "She has the right idea. There's no point in talking anymore. I hate to do it, but we need to bring this demon down."
        [/message]
        {DELAY 250}
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=2
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "(<i>shifts</i>)"
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>I...</i>"
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>It hurts...</i>"
        [/message]
        {DELAY 250}
        #ifdef HARD
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=9
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        #ifdef NORMAL
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=29
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        #ifdef EASY
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=37
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "<i>Agh!</i>"
        [/message]
        [message]
            speaker=narrator
            message= _ "<i>You will fight, Luna.</i>"
        [/message]
        {DELAY 500}
        {PLAY_SOUND "magic-dark-big.ogg"}
        {DELAY 500}
        [message]
            speaker=Luna
            message= _ "<i>Yes... I will fight. Since you have ordered it, I must fight...</i>"
        [/message]

        [fade_out_music][/fade_out_music]

        [unit]
            id=incubus1
            type=Demon Incubus
            animate=yes
            side=2
            x,y=15,28
            random_traits=no
            generate_name=yes
        [/unit]
        [unit]
            id=incubus2
            type=Demon Incubus
            animate=yes
            side=2
            x,y=13,31
            random_traits=no
            generate_name=yes
        [/unit]
        [unit]
            id=incubus3
            type=Demon Incubus
            animate=yes
            side=2
            x,y=17,31
            random_traits=no
            generate_name=yes
        [/unit]

        {REPLACE_SCENARIO_MUSIC frantic.ogg}
        {APPEND_MUSIC           siege_of_laurelmor.ogg}

        [message]
            speaker=incubus3
            message= _ "They step through the mirror of reality into the domain of dreams."
        [/message]
        [message]
            speaker=incubus2
            message= _ "Though we hold sovereignty over the plane of nightmares, eyes of darkness shield their minds from our power."
        [/message]
        [message]
            speaker=incubus1
            message= _ "It is no matter. What cannot be fought with the mind can be subdued by force."
        [/message]
        [message]
            speaker=Aryel
            message= _ "If it's a fight you want, it's a fight you're going to get. Actually, I take that back. We'll show them. Let's make this a slaughter, girls."
        [/message]
        [message]
            speaker=Talya
            message= _ "You got it."
        [/message]
        [message]
            speaker=Esther
            message= _ "Always so dramatic, Aryel. But this time, I agree with you."
        [/message]
        [heal_unit]
            [filter]
                side=1
            [/filter]
            amount=full
            animate=no
            restore_attacks=yes
            restore_statuses=yes
        [/heal_unit]
        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Defeat the Ephemeral Angel")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Yumi")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Aryel")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Esther")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Talya")}
            {OBJECTIVE_NOTE ( _ "You may recruit by right clicking on a hex next to Yumi.")}
        [/objectives]

        [set_variable]
            name=boss_battle
            value=1
        [/set_variable]
    [/event]
    [event]
        name=side 2 turn
        first_time_only=no
        [filter_condition]
            [variable]
                name=boss_battle
                numerical_equals=1
            [/variable]
        [/filter_condition]
        [store_unit]
            [filter]
                [filter_adjacent]
                    is_enemy=yes
                    ability=dreamweave
                [/filter_adjacent]
            [/filter]
            variable=copy_unit
        [/store_unit]
        [for]
            array=copy_unit
            [do]
                [switch]
                    variable=copy_unit[$i].id
                    [case]
                        value="Esther"

                        [unit]
                            side=3
                            animate=yes
                            type=Fake Fire Fae
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/case]
                    [case]
                        value="Aryel"

                        [unit]
                            side=3
                            animate=yes
                            type=Fake Blood Fae
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/case]
                    [case]
                        value="Yumi"
                    [/case]
                    [else]
                        [unit]
                            side=3
                            animate=yes
                            type=$copy_unit[$i].type
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/else]
                [/switch]
            [/do]
        [/for]
        {CLEAR_VARIABLE copy_unit}
    [/event]

    [event]
        name=last breath
        [filter]
            id=Luna
        [/filter]
        [filter_condition]
            [variable]
                name=boss_battle
                numerical_equals=1
            [/variable]
        [/filter_condition]

        {PLAY_SOUND "magic-dark-miss.ogg"}
        {DELAY 750}
        [kill]
            side=3
        [/kill]
        [fade_out_music][/fade_out_music]

        {REPLACE_SCENARIO_MUSIC silence.ogg}
        {DELAY 750}

        [message]
            speaker=Luna
            message= _ "<i>Rrrghh!</i>"
        [/message]
        [message]
            speaker=Aryel
            message= _ "Give it up already."
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>I-</i>"
        [/message]
        {DELAY 250}
        {PLAY_SOUND "magic-dark-miss.ogg"}
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "<i>Can't-</i>"
        [/message]
        [message]
            speaker=narrator
            message= _ "<i>You will do your duty.</i>"
        [/message]
        [message]
            speaker=Aryel
            message= _ "<i>What's going on with her?</i>"
        [/message]
        {DELAY 250}
        {PLAY_SOUND "magic-dark-miss.ogg"}
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "<i>Please-</i>"
        [/message]
        [message]
            speaker=narrator
            message= _ "<i>You will obey.</i>"
        [/message]
        {DELAY 250}
        {PLAY_SOUND "magic-dark.ogg"}
        {DELAY 250}
        [kill]
            id=Luna
            animate=yes
        [/kill]
        {DELAY 250}
        [store_locations]
            [and]
                x,y=$x1,$y1
                radius=5
            [/and]
            [and]
                [not]
                    [filter][/filter]
                [/not]
            [/and]
            [and]
                [not]
                    terrain=Wuyb
                [/not]
            [/and]
            [and]
                [not]
                    x,y=$x1,$y1
                    radius=2
                [/not]
            [/and]
            variable=spawn_points
        [/store_locations]
        [set_variable]
            name=loc
            rand=0..$($spawn_points.length-1)
        [/set_variable]
        [unit]
            id=Luna
            type=Ephemeral Angel
            animate=yes
            side=2
            x,y=$spawn_points[$loc].x,$spawn_points[$loc].y
            random_traits=no
            generate_name=no
            gender=female
            hitpoints=45
        [/unit]
        [redraw][/redraw]
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "<i>Aghh-</i>"
        [/message]
        [message]
            speaker=Esther
            message= _ "<i>She's... in pain?</i>"
        [/message]
        {DELAY 250}
        [kill]
            id=Luna
            animate=yes
        [/kill]
        {DELAY 250}

        [set_variable]
            name=loc
            rand=0..$($spawn_points.length-1)
        [/set_variable]
        [unit]
            id=Luna
            type=Ephemeral Angel
            animate=yes
            side=2
            x,y=$spawn_points[$loc].x,$spawn_points[$loc].y
            random_traits=no
            generate_name=no
            gender=female
            hitpoints=101
        [/unit]

        {CLEAR_VARIABLE spawn_points}
        {CLEAR_VARIABLE loc}
        {DELAY 250}
        [message]
            speaker=narrator
            message= _ "<i>You cannot flee.</i>"
        [/message]
        [kill]
            id=Luna
            animate=yes
        [/kill]
        {DELAY 250}
        [remove_shroud]
            side=1
            x=15
            y=30
            radius=7
        [/remove_shroud]
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x=15
            y=30
            radius=7
            multiturn=no
        [/lift_fog]
        {SCROLL_TO 15 30}
        {DELAY 500}
        [fade_out_music][/fade_out_music]
        {PLAY_SOUND "lightning.ogg"}
        {DELAY 500}
        [unit]
            id=Luna
            type=Ephemeral Angel
            variation=angel1
            animate=yes
            side=2
            x,y=15,30
            random_traits=no
            generate_name=no
            gender=female
        [/unit]

        {INCIDENTAL_MUSIC       silence.ogg}

        [message]
            speaker=narrator
            message= _ "(<i>chaotic voices</i>) You will all be mine in the end."
        [/message]
        [message]
            speaker=Luna
            message= _ "(<i>chaotic voices</i>) <i>Beneath the black waters, the darkness will consume you all.</i>"
        [/message]
        [message]
            speaker=Esther
            message= _ "<i>Her voice completely changed! It's like she's not even the same person.</i> I won't just let you take my friends from me."
        [/message]
        [message]
            speaker=Luna
            message= _ "(<i>mixed voices</i>) <i>Your resistance is but an irritation. However, you should take care-</i>"
        [/message]
        [message]
            speaker=narrator
            message= _ "(<i>mixed voices</i>) -if you do continue to fight me, I will have no choice but to add you all to my hall of statues."
        [/message]
        [message]
            speaker=Aryel
            message= _ "<i>It's someone else speaking through her body! Her master?</i>"
        [/message]
        [message]
            speaker=Luna
            message= _ "(<i>feminine voice</i>) <i>It's too bad the bodies of most demons are too weak to handle my power. But I suppose I can make good use of this conduit for at least a little while before it gives out.</i>"
        [/message]

        {REPLACE_SCENARIO_MUSIC overlive.ogg}
        {APPEND_MUSIC           one_thousand_suns.ogg}
        {APPEND_MUSIC           frantic.ogg}

        [unit]
            type=Demon Incubus
            variation=incubus1
            animate=yes
            side=2
            x,y=15,28
            random_traits=no
            generate_name=yes
        [/unit]
        [unit]
            type=Demon Incubus
            variation=incubus1
            animate=yes
            side=2
            x,y=13,31
            random_traits=no
            generate_name=yes
        [/unit]
        [unit]
            type=Demon Incubus
            variation=incubus1
            animate=yes
            side=2
            x,y=17,31
            random_traits=no
            generate_name=yes
        [/unit]

        [message]
            speaker=Talya
            message= _ "Oh my..."
        [/message]
        [message]
            speaker=Aryel
            message= _ "Yikes..."
        [/message]
        [message]
            speaker=Yumi
            message= _ "(<i>eyes narrow</i>)"
        [/message]

        [store_unit]
            [filter]
                id=Yumi
            [/filter]
            variable=yumi
        [/store_unit]

        {REPEAT 2 ({QUAKE_FIXED "rumble.ogg"})}
        {PLAY_SOUND "magic-faeriefire.ogg"}
        [terrain]
            x,y=$yumi.x,$yumi.y
            terrain=Qxu
        [/terrain]
        [terrain]
            x=14,14,15,15,15,16,16
            y=7,8,7,8,9,7,8
            terrain=Qxu
        [/terrain]
        {PLAY_SOUND "rumble.ogg"}
        {DRAW_VOID}
        [redraw][/redraw]
        {DELAY 500}
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=2
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]

        {DELAY 500}
        {SCROLL_TO $yumi.x $yumi.y}
        [terrain]
            x,y=$yumi.x,$yumi.y
            radius=1
            terrain=Qxu
        [/terrain]
        {PLAY_SOUND "rumble.ogg"}
        {DRAW_VOID}
        [redraw][/redraw]
        {DELAY 500}
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=4
            kill=no
            fire_event=no
            animate=yes
        [/harm_unit]
        {DELAY 500}
        {SCROLL_TO $yumi.x $yumi.y}
        {PLAY_SOUND "rumble.ogg"}
        {DRAW_VOID}
        [redraw][/redraw]
        {DELAY 500}
        #ifdef HARD
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=7
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        #ifdef NORMAL
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=30
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        #ifdef EASY
        [harm_unit]
            [filter]
                id=Luna
            [/filter]
            amount=45
            kill=no
            slowed=yes
            fire_event=no
            animate=yes
        [/harm_unit]
        #endif
        {DELAY 500}

        {CLEAR_VARIABLE yumi}
        [message]
            speaker=Luna
            message= _ "(<i>feminine voice</i>) <i>So you are hellbent on being rid of my lackey. Fine. Do as you will, but don't think I'm going to make it easy for you. You will have to fight for your victory.</i>"
        [/message]

        [heal_unit]
            [filter]
                side=1
            [/filter]
            amount=full
            animate=no
            restore_attacks=no
            restore_statuses=yes
        [/heal_unit]
        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Defeat the Ephemeral Angel")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Yumi")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Aryel")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Esther")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Talya")}
            {OBJECTIVE_NOTE ( _ "You may recruit by right clicking on a hex next to Yumi.")}
        [/objectives]

        [set_variable]
            name=boss_battle
            value=2
        [/set_variable]
        [set_variable]
            name=turn_count
            value=0
        [/set_variable]
        {CLEAR_VARIABLE luna}
        {CLEAR_VARIABLE tmp}
        {CLEAR_VARIABLE loc}
        {CLEAR_VARIABLE spawn_points}
    [/event]

    [event]
        name=side 2 turn
        first_time_only=no
        [filter_condition]
            [variable]
                name=boss_battle
                numerical_equals=2
            [/variable]
        [/filter_condition]
        [store_unit]
            [filter]
                side=1
                [filter_location]
                    radius=3
                    [and]
                        [filter]
                            ability=nocturne
                        [/filter]
                    [/and]
                [/filter_location]
            [/filter]
            variable=copy_unit
        [/store_unit]
        [for]
            array=copy_unit
            [do]
                [switch]
                    variable=copy_unit[$i].id
                    [case]
                        value="Esther"

                        [unit]
                            side=3
                            animate=yes
                            type=Fake Fire Fae
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/case]
                    [case]
                        value="Aryel"

                        [unit]
                            side=3
                            animate=yes
                            type=Fake Blood Fae
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/case]
                    [case]
                        value="Yumi"
                    [/case]
                    [else]
                        [unit]
                            side=3
                            animate=yes
                            type=$copy_unit[$i].type
                            generate_name=no
                            random_traits=no
                            gender=$copy_unit[$i].gender
                            x,y=$copy_unit[$i].x,$copy_unit[$i].y
                        [/unit]
                    [/else]
                [/switch]
            [/do]
        [/for]
        {CLEAR_VARIABLE copy_unit}
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            [not]
                type=Ephemeral Angel, Shadow Fae
            [/not]
            [filter_location]
                terrain=Qxu
            [/filter_location]
        [/filter]

        [filter_condition]
            [variable]
                name=boss_battle
                numerical_equals=2
            [/variable]
        [/filter_condition]
        [harm_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            amount=5
            animate=yes
            kill=no
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x1,$y1
                side=2,3
            [/have_unit]
            [then]
                #ifdef HARD
                [harm_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=7
                    animate=no
                    kill=no
                [/harm_unit]
                #endif
                #ifdef NORMAL
                [harm_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=12
                    animate=no
                    kill=no
                [/harm_unit]
                #endif
                #ifdef EASY
                [harm_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=15
                    animate=no
                    kill=no
                [/harm_unit]
                #endif
            [/then]
        [/if]
        {CLEAR_VARIABLE damage}
    [/event]

    [event]
        name=last breath
        first_time_only=no
        [filter]
            id=Luna
        [/filter]
        [filter_condition]
            [variable]
                name=boss_battle
                numerical_equals=2
            [/variable]
        [/filter_condition]

        [remove_sound_source]
            id=s22dark1,s22dark2
        [/remove_sound_source]
        [fade_out_music][/fade_out_music]

        {REPLACE_SCENARIO_MUSIC silence.ogg}

        {DELAY 750}
        {PLAY_SOUND "magic-dark-miss.ogg"}
        {DELAY 500}
        [terrain]
            x,y=15,30
            radius=2
            terrain=Woby
        [/terrain]
        [kill]
            side=2,3
            [not]
                id=Luna
            [/not]
        [/kill]
        {DELAY 750}
        [message]
            speaker=Luna
            message= _ "(<i>gasps</i>)"
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>I- can't... breathe...</i>"
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>It hurts...</i>"
        [/message]
        [message]
            speaker=Luna
            message= _ "<i>The darkness... is fading...</i>"
        [/message]
        {DELAY 750}
        {FADE_SCREEN}
        [kill]
            id=Luna
        [/kill]
        {DELAY 500}

        [terrain]
            x=10,11,12,13,14,15,16,17,18,19,20
            y=39,39,38,38,37,37,37,38,38,39,39
            terrain=Woby
        [/terrain]
        [terrain]
            [and]
                terrain=Zdyd
            [/and]
            terrain=Woby
        [/terrain]
        [redraw][/redraw]
        [change_theme]
            theme=Cutscene_Minimal
        [/change_theme]
        [remove_shroud]
            side=1
            x=15
            y=42
            radius=5
        [/remove_shroud]
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x=15
            y=42
            radius=5
            multiturn=no
        [/lift_fog]
        {SCROLL_TO 15 42}
        {PLAY_SOUND "magic-1.ogg"}
        {DELAY 1500}
        {UNFADE_SCREEN}
        {DELAY 2500}
        [move_unit]
            id=Yumi
            to_x,to_y=14,41
        [/move_unit]
        {MODIFY_UNIT (id=Yumi) facing se}
        {DELAY 500}
        {PLAY_SOUND "magic-faeriefire.ogg"}
        {DELAY 1000}
        [terrain]
            x,y=15,42
            terrain=Gll^Fet
        [/terrain]
        [redraw][/redraw]
        {DELAY 500}
        {REPLACE_SCENARIO_MUSIC snowfall.ogg}
        {DELAY 500}
        [unit]
            id=Luna
            name= _ "Luna"
            type=Illusory Angel
            animate=yes
            side=2
            x,y=15,42
            random_traits=no
            generate_name=no
            gender=female
            facing=nw
        [/unit]
        {DELAY 500}

        [message]
            speaker=Luna
            message= _ "<i>The darkness is gone. My mind is my own once more.</i>"
        [/message]

        {DELAY 500}
        [replace_schedule]
            {ETERNALDARK2}
        [/replace_schedule]
        {DELAY 250}
        [kill]
            x,y=15,42
        [/kill]
        [unit]
            id=Luna
            name= _ "Luna"
            profile=portraits/luna.png
            type=Demon Nightmare
            animate=no
            side=2
            x,y=15,42
            random_traits=no
            generate_name=no
            gender=female
            facing=nw
        [/unit]
        [message]
            speaker=Luna
            message= _ "I can speak again. I can see again."
        [/message]
        {DELAY 500}
        [replace_schedule]
            {ETERNALDARK}
        [/replace_schedule]
        {DELAY 250}
        [kill]
            x,y=15,42
        [/kill]
        [unit]
            id=Luna
            name= _ "Luna"
            profile=portraits/luna.png
            type=Demon Apparition
            animate=no
            side=2
            x,y=15,42
            random_traits=no
            generate_name=no
            gender=female
            facing=nw
        [/unit]
        [message]
            speaker=Luna
            message= _ "I can feel again. Ah- but..."
        [/message]
        {DELAY 500}
        [replace_schedule]
            {MIDNIGHT}
        [/replace_schedule]
        {DELAY 250}
        [kill]
            x,y=15,42
        [/kill]
        [unit]
            id=Luna
            name= _ "Luna"
            profile=portraits/luna.png
            type=Blue Demon
            animate=no
            side=2
            x,y=15,42
            random_traits=no
            generate_name=no
            gender=female
            facing=nw
        [/unit]
        [message]
            speaker=Luna
            message= _ "My body will not last much longer."
        [/message]
        {DELAY 500}
        [terrain]
            x,y=15,42
            radius=1
            terrain=Wo
        [/terrain]
        [terrain]
            x,y=15,42
            terrain=Gll^Fet
        [/terrain]
        [redraw][/redraw]
        {DELAY 250}
        [message]
            speaker=Luna
            message= _ "Can they hear us?"
        [/message]
        [message]
            speaker=Yumi
            message= _ "We are alone."
        [/message]
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {DELAY 1500}
        [message]
            speaker=Luna
            message= _ "She put me in a cage of my own body. She took control of my mind. She said she would free me. She didn't say she would make me into a monster."
        [/message]
        [message]
            speaker=Luna
            message= _ "(<i>trembles</i>)"
        [/message]
        [message]
            speaker=Luna
            message= _ "I've never been free before."
        [/message]
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {TURN_UNIT5 "Luna"}
        [message]
            speaker=Luna
            message= _ "I was trapped in a shell. I couldn't see. I couldn't feel."
        [/message]
        [message]
            speaker=Luna
            message= _ "It was like being trapped in an endless nightmare, where I tried and tried, but could never wake up."
        [/message]
        [message]
            speaker=Luna
            message= _ "And if it was not the nightmares, then it was just a boundless sea of empty, black water. I couldn't bear to be alone like that. I couldn't stand not being able to feel anything."
        [/message]
        [message]
            speaker=Luna
            message= _ "The endless torment, where time itself slowed to a halt, where the darkness was at once filled with horrifying sensation and aching numbness... it trapped me in my mind, with my own body as the prison."
        [/message]
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {MODIFY_UNIT (id=Luna) hitpoints 20}
        {MODIFY_UNIT (id=Luna) max_hitpoints 20}
        [message]
            speaker=Luna
            message= _ "(<i>breathes</i>)"
        [/message]
        [message]
            speaker=Luna
            message= _ "Now, it's over."
        [/message]
        [message]
            speaker=Luna
            message= _ "It's been so long..."
        [/message]
        [message]
            speaker=Luna
            message= _ "I barely even remember what it was like to see the moonlight with my own two eyes."
        [/message]
        {DELAY 700}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {MODIFY_UNIT (id=Luna) facing nw}
        {MODIFY_UNIT (id=Luna) hitpoints 16}
        {MODIFY_UNIT (id=Luna) max_hitpoints 16}
        {DELAY 500}
        [message]
            speaker=Luna
            message= _ "My whole life has been nothing but dreams of darkness. But now, I'm finally free."
        [/message]
        [message]
            speaker=Yumi
            message= _ "(<i>nods</i>)"
        [/message]
        {MODIFY_UNIT (id=Luna) hitpoints 12}
        {MODIFY_UNIT (id=Luna) max_hitpoints 12}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        [message]
            speaker=Luna
            message= _ "I never wanted to fight you. I didn't have a choice."
        [/message]
        [message]
            speaker=Yumi
            message= _ "I know."
        [/message]
        [message]
            speaker=Luna
            message= _ "She used me as a fake, to disguise her true intentions from everyone else."
        [/message]
        [message]
            speaker=Yumi
            message= _ "I know."
        [/message]
        [message]
            speaker=Luna
            message= _ "I've caused you so much trouble..."
        [/message]
        [message]
            speaker=Luna
            message= _ "But at least now, with me gone, the Yuure demons will no longer hunt you here."
        [/message]
        {MODIFY_UNIT (id=Luna) hitpoints 8}
        {MODIFY_UNIT (id=Luna) max_hitpoints 8}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        [message]
            speaker=Luna
            message= _ "Still, she will find another way. She wants to bring you to her world. She wants to use you - the energy that composes your radiant forms. You can't run - she won't stop. <i>It</i> won't stop."
        [/message]
        [message]
            speaker=Luna
            message= _ "She was cruel to me, she lied to me, she <i>used</i> me... but she is right. There's only one way to escape our crumbling reality. You know that."
        [/message]
        {DELAY 1000}
        {MODIFY_UNIT (id=Luna) hitpoints 4}
        {MODIFY_UNIT (id=Luna) max_hitpoints 4}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {DELAY 500}
        [message]
            speaker=Yumi
            message= _ "I know, but, I still have to try on my own first."
        [/message]
        [message]
            speaker=Luna
            message= _ "I understand."
        [/message]
        [message]
            speaker=Luna
            message= _ "Will you tell the other Guardians about her?"
        [/message]
        [message]
            speaker=Yumi
            message= _ "Not yet. I need to see what happens first."
        [/message]
        [message]
            speaker=Luna
            message= _ "You need to see the other Guardians first, you mean. You can't trust any of them?"
        [/message]
        [message]
            speaker=Yumi
            message= _ "(<i>nods</i>)"
        [/message]
        {TURN_UNIT5 "Yumi"}
        {DELAY 500}
        [message]
            speaker=Yumi
            message= _ "(<i>looks up</i>)"
        [/message]
        {DELAY 500}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        [replace_schedule]
            {SECOND_WATCH_HOUR6}
        [/replace_schedule]
        {MODIFY_UNIT (id=Luna) hitpoints 2}
        {MODIFY_UNIT (id=Luna) max_hitpoints 2}
        [message]
            speaker=Luna
            message= _ "The sun is rising. The moon is dying. I wish I could help you more, but-"
        [/message]
        [message]
            speaker=Yumi
            message= _ "It's okay. You've been hurt enough. Go be free."
        [/message]
        {MODIFY_UNIT (id=Luna) hitpoints 1}
        {MODIFY_UNIT (id=Luna) max_hitpoints 1}
        {DRAW_WATER}
        {DRAW_WATER}
        [redraw][/redraw]
        {DELAY 500}
        {COLOR_ADJUST 33 33 33}
        {DELAY 100}
        {COLOR_ADJUST 67 67 67}
        {DELAY 100}
        {COLOR_ADJUST 100 100 100}
        {DELAY 100}
        {COLOR_ADJUST 133 133 133}
        {DELAY 100}
        [message]
            speaker=Luna
            message= _ "<i>Thank you.</i>"
        [/message]
        {DELAY 750}
        [kill]
            id=Luna
        [/kill]
        {DELAY 750}
        {COLOR_ADJUST 167 167 167}
        {DELAY 100}
        {COLOR_ADJUST 200 200 200}
        {DELAY 100}
        {COLOR_ADJUST 233 233 233}
        {DELAY 100}
        {COLOR_ADJUST 255 255 255}
        {DELAY 1000}

        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 0}
            replay_save=yes
            carryover_report=no
            linger_mode=no
            next_scenario=23_Dawn
        [/endlevel]
    [/event]

    [event]
        name=victory
        [kill]
            side=1
            type=Manifestation
        [/kill]
        [clear_menu_item]
            id=recruit_manifestation
        [/clear_menu_item]

        {CLEAR_VARIABLE boss_battle}
        {CLEAR_VARIABLE turn_count}
    [/event]

    [event]
        name=last breath
        [filter]
            id=Yumi
        [/filter]

        [message]
            speaker=Yumi
            message= _ "(<i>gasp</i>)"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Esther
        [/filter]

        [message]
            speaker=Esther
            message= _ "I... failed..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Aryel
        [/filter]

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

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

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

#undef CAVE_WALL_SEED
#undef DRAW_VOID
#undef DRAW_WALLS
#undef DRAW_WALLS2
#undef DRAW_WALLS3
#undef DRAW_WALLS4
#undef DRAW_WATER
#undef BREAK_WALLS