#textdomain wesnoth-Genesis
[scenario]
    id=06_Caerleon
    name= _ "Caerleon"
    map_data="{~add-ons/Genesis/episode1/maps/04e_The_White_City.map}"
    next_scenario=08_Impetus
    disallow_recall=yes
    theme=Cutscene
    victory_when_enemies_defeated=no
    turns=-1
    {DEFAULT_SCHEDULE_24H}

    {SCENARIO_MUSIC wanderer.ogg}
    {EXTRA_SCENARIO_MUSIC silvan_sanctuary.ogg}
    {STORYTXT_CAERLEON}

    [side]
        {PLAYER_FAE}
        {NO_GOLD_SIDE}
        side=1
        recruit=
    [/side]

    [side]
        side=2
        no_leader=yes
        {HUMAN_ALLY}
    [/side]

    [side]
        side=3
        no_leader=yes
        hidden=yes
        team_name=gladiators1
        defeat_condition=never
        color=white
    [/side]

    [side]
        side=4
        no_leader=yes
        hidden=yes
        team_name=gladiators2
        defeat_condition=never
        color=white
    [/side]

    [event]
        name=prestart

        [label]
            x,y=7,19
            text = _ "Colosseum"
        [/label]
        [label]
            x,y=36,20
            text = _ "Marketplace"
        [/label]
        [label]
            x,y=2,1
            text = _ "Upper District"
        [/label]
        [label]
            x,y=3,9
            text = _ "Temple"
        [/label]
        [label]
            x,y=38,2
            text = _ "Crypt"
        [/label]
        [label]
            x,y=18,2
            text = _ "To the Pantheon"
        [/label]
        [set_recruit]
            side=1
            recruit=
        [/set_recruit]

        [switch]
            variable=prev_scenario
            [case]
                value="Upper District"
                [move_unit]
                    id=Esther
                    to_x,to_y=3,3
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [case]
                value="Temple"
                [move_unit]
                    id=Esther
                    to_x,to_y=3,9
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [case]
                value="Colosseum"
                [move_unit]
                    id=Esther
                    to_x,to_y=9,24
                [/move_unit]
                {RECALL_YUMI 9 25}
            [/case]
            [case]
                value="Pantheon"
                [move_unit]
                    id=Esther
                    to_x,to_y=18,9
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [else]
                [move_unit]
                    id=Esther
                    to_x,to_y=38,3
                [/move_unit]
                {RECALL_YUMI 38 4}
                {RECALL_ARYEL 37 4}
            [/else]
        [/switch]
    [/event]

    {SPAWN_POINT ("Royal Guard") 2 20 35}
    {SPAWN_POINT ("Royal Guard") 2 22 35}
    {SPAWN_POINT ("Master Bowman") 2 31 29}
    {SPAWN_POINT ("Master Bowman") 2 37 29}
    {SPAWN_POINT ("Master Bowman") 2 8 29}
    {SPAWN_POINT ("Master Bowman") 2 12 29}
    {SPAWN_POINT ("Master Bowman") 2 17 31}
    {SPAWN_POINT ("Master Bowman") 2 19 31}
    {SPAWN_POINT ("Master Bowman") 2 23 31}
    {SPAWN_POINT ("Master Bowman") 2 25 31}
    {SPAWN_POINT ("Master at Arms") 2 10 22}
    {SPAWN_POINT ("Peasant") 2 34 21}
    {SPAWN_POINT ("Peasant") 2 38 21}
    {SPAWN_POINT ("Peasant") 2 33 19}
    {SPAWN_POINT ("Peasant") 2 37 19}
    {SPAWN_POINT ("White Mage") 2 1 10}
    {SPAWN_POINT ("Royal Guard") 2 17 8}
    {SPAWN_POINT ("Royal Guard") 2 18 8}
    {SPAWN_POINT ("Royal Guard") 2 19 8}
    {SPAWN_POINT ("Royal Guard") 2 37 2}
    {SPAWN_POINT ("Royal Guard") 2 38 2}
    {SPAWN_POINT ("Royal Guard") 2 39 2}

    [event]
        name=start
        [switch]
            variable=prev_scenario
            [case]
                value="Upper District"
                [move_unit]
                    id=Esther
                    to_x,to_y=3,3
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [case]
                value="Temple"
                [move_unit]
                    id=Esther
                    to_x,to_y=3,9
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [case]
                value="Colosseum"

                {DELAY 500}
                {RECALL_ARYEL 8 24}
                [message]
                    speaker=Aryel
                    message= _ "I'm back!"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Have fun with the fans?"
                [/message]
                [message]
                    speaker=Aryel
                    message= _ "It was alright. (<i>lowers voice</i>) As much fun as one can have with humans, anyway."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Haha, told ya. Knew they'd get to you eventually."
                [/message]
            [/case]
            [case]
                value="Pantheon"
                [move_unit]
                    id=Esther
                    to_x,to_y=18,9
                [/move_unit]
                {RECALL_YUMI_NOLOC}
                {RECALL_ARYEL_NOLOC}
            [/case]
            [else]
                [move_unit]
                    id=Esther
                    to_x,to_y=38,3
                [/move_unit]
                {RECALL_YUMI 38 4}
                {RECALL_ARYEL 37 4}
            [/else]
        [/switch]

        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Explore")}
            {OBJECTIVE_NOTE ( _ "There are a total of three possible scenarios that may be played on this map.")}
            {OBJECTIVE_NOTE ( _ "Moving to the Upper District will take you to another map.")}
            {OBJECTIVE_NOTE ( _ "Moving next to other units will trigger events.")}
            {OBJECTIVE_NOTE ( _ "Leave the city if you are done exploring.")}
        [/objectives]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Esther
        [/filter]
        {MODIFY_UNIT (id=Esther) moves 10}
    [/event]
    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Yumi
        [/filter]
        {MODIFY_UNIT (id=Yumi) moves 10}
    [/event]
    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Aryel
        [/filter]
        {MODIFY_UNIT (id=Aryel) moves 10}
    [/event]

    [event]
        name=colosseum battle
        first_time_only=no

        [message]
            speaker=spawn_10_22
            message= _ "Excellent. Contestants!"
        [/message]

        {SPAWN_ID ("Swordsman","Javelineer","Longbowman","Duelist","Pikeman","Shock Trooper","Bandit","Rogue","Outlaw","Trapper") 3 4 19 ("gladiator1") ("male")}
        {SPAWN_ID ("Swordsman","Javelineer","Longbowman","Duelist","Pikeman","Shock Trooper","Bandit","Rogue","Outlaw","Trapper") 4 10 19 ("gladiator2") ("male")}

        [store_unit]
            [filter]
                id=gladiator1
            [/filter]
            variable=glad1
        [/store_unit]
        [store_unit]
            [filter]
                id=gladiator2
            [/filter]
            variable=glad2
        [/store_unit]

        [while]
            [variable]
                name=glad2.type
                equals=$glad1.type
            [/variable]
            [do]
                [kill]
                    id=gladiator2
                [/kill]

                {SPAWN_ID ("Swordsman","Javelineer","Longbowman","Duelist","Pikeman","Shock Trooper","Bandit","Rogue","Outlaw","Trapper") 4 10 19 ("gladiator2") ("male")}

                {CLEAR_VARIABLE glad2}
                [store_unit]
                    [filter]
                        id=gladiator2
                    [/filter]
                    variable=glad2
                [/store_unit]
            [/do]
        [/while]

        [redraw][/redraw]

        [scroll_to]
            x,y=7,19
        [/scroll_to]
        {DELAY 750}

        [message]
            speaker=spawn_10_22
            message= _ "So, who will you bet on?"
        [/message]

        [store_gold]
            [filter_side]
                side=1
            [/filter_side]
            variable=side1gold
        [/store_gold]

        [message]
            speaker=Aryel
            [option]
                message= _ "Let's bet on the " + $glad1.type + "."

                [command]
                    [message]
                        speaker=spawn_10_22
                        message= _ "And the amount to bet?"
                    [/message]
                    {VARIABLE chosen_fighter 1}
                    [message]
                        speaker=Aryel
                        [option]
                            message= _ "5 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=5
                                [/set_variable]
                            [/command]
                        [/option]
                        [option]
                            message= _ "10 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=10
                                [/set_variable]
                            [/command]
                        [/option]
                        [option]
                            message= _ "15 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=15
                                [/set_variable]
                            [/command]
                        [/option]
                    [/message]
                [/command]
            [/option]
            [option]
                message= _ "Let's bet on the " + $glad2.type + "."

                [command]
                    [message]
                        speaker=spawn_10_22
                        message= _ "And the amount to bet?"
                    [/message]
                    {VARIABLE chosen_fighter 2}
                    [message]
                        speaker=Aryel
                        [option]
                            message= _ "5 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=5
                                [/set_variable]
                            [/command]
                        [/option]
                        [option]
                            message= _ "10 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=10
                                [/set_variable]
                            [/command]
                        [/option]
                        [option]
                            message= _ "15 gold."
                            [command]
                                [set_variable]
                                    name=bet_gold
                                    value=15
                                [/set_variable]
                            [/command]
                        [/option]
                    [/message]
                [/command]
            [/option]
        [/message]

        [message]
            speaker=spawn_10_22
            message= _ "It looks like we are set to go. Contestants, steel yourselves! Let the battle begin!"
        [/message]

        {VARIABLE_OP side1gold sub $bet_gold}
        [modify_side]
            side=1
            gold=$side1gold
        [/modify_side]

        [set_variable]
            name=win_bet
            rand=1..100
        [/set_variable]

        [move_unit]
            id=gladiator1
            to_x,to_y=5,19
        [/move_unit]
        [move_unit]
            id=gladiator2
            to_x,to_y=9,19
        [/move_unit]
        [move_unit]
            id=gladiator1
            to_x,to_y=6,19
        [/move_unit]
        [move_unit]
            id=gladiator2
            to_x,to_y=8,19
        [/move_unit]
        {DELAY 100}
        [move_unit]
            id=gladiator1
            to_x,to_y=7,19
        [/move_unit]
        [harm_unit]
            [filter]
                id=gladiator2
            [/filter]
            [filter_second]
                id=gladiator1
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=5
        [/harm_unit]
        [harm_unit]
            [filter]
                id=gladiator1
            [/filter]
            [filter_second]
                id=gladiator2
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=5
        [/harm_unit]
        [harm_unit]
            [filter]
                id=gladiator2
            [/filter]
            [filter_second]
                id=gladiator1
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=6
        [/harm_unit]
        [harm_unit]
            [filter]
                id=gladiator1
            [/filter]
            [filter_second]
                id=gladiator2
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=6
        [/harm_unit]
        [harm_unit]
            [filter]
                id=gladiator2
            [/filter]
            [filter_second]
                id=gladiator1
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=7
        [/harm_unit]
        [harm_unit]
            [filter]
                id=gladiator1
            [/filter]
            [filter_second]
                id=gladiator2
            [/filter_second]
            [primary_attack]
                range=melee
            [/primary_attack]
            [secondary_attack]
                range=melee
            [/secondary_attack]
            animate=yes
            amount=7
        [/harm_unit]

        [if]
            [variable]
                name=win_bet
                greater_than=50
            [/variable]
            [then]
                [if]
                    [variable]
                        name=chosen_fighter
                        numerical_equals=1
                    [/variable]
                    [then]
                        [harm_unit]
                            [filter]
                                id=gladiator2
                            [/filter]
                            [filter_second]
                                id=gladiator1
                            [/filter_second]
                            [primary_attack]
                                range=melee
                            [/primary_attack]
                            [secondary_attack]
                                range=melee
                            [/secondary_attack]
                            animate=yes
                            amount=3
                        [/harm_unit]
                        [kill]
                            id=gladiator2
                            animate=yes
                        [/kill]

                        [set_variable]
                            name=won_bet
                            value=3
                        [/set_variable]
                    [/then]
                    [else]
                        [harm_unit]
                            [filter]
                                id=gladiator1
                            [/filter]
                            [filter_second]
                                id=gladiator2
                            [/filter_second]
                            [primary_attack]
                                range=melee
                            [/primary_attack]
                            [secondary_attack]
                                range=melee
                            [/secondary_attack]
                            animate=yes
                            amount=3
                        [/harm_unit]
                        [kill]
                            id=gladiator1
                            animate=yes
                        [/kill]
                        [set_variable]
                            name=won_bet
                            value=2
                        [/set_variable]
                    [/else]
                [/if]
            [/then]
            [else]
                [if]
                    [variable]
                        name=chosen_fighter
                        numerical_equals=1
                    [/variable]
                    [then]
                        [harm_unit]
                            [filter]
                                id=gladiator1
                            [/filter]
                            [filter_second]
                                id=gladiator2
                            [/filter_second]
                            [primary_attack]
                                range=melee
                            [/primary_attack]
                            [secondary_attack]
                                range=melee
                            [/secondary_attack]
                            animate=yes
                            amount=3
                        [/harm_unit]
                        [kill]
                            id=gladiator1
                            animate=yes
                        [/kill]
                        [set_variable]
                            name=won_bet
                            value=1
                        [/set_variable]
                    [/then]
                    [else]
                        [harm_unit]
                            [filter]
                                id=gladiator2
                            [/filter]
                            [filter_second]
                                id=gladiator1
                            [/filter_second]
                            [primary_attack]
                                range=melee
                            [/primary_attack]
                            [secondary_attack]
                                range=melee
                            [/secondary_attack]
                            animate=yes
                            amount=3
                        [/harm_unit]
                        [kill]
                            id=gladiator2
                            animate=yes
                        [/kill]
                        [set_variable]
                            name=won_bet
                            value=0
                        [/set_variable]
                    [/else]
                [/if]
            [/else]
        [/if]

        [if]
            [variable]
                name=won_bet
                greater_than=1
            [/variable]
            [then]
                [message]
                    speaker=spawn_10_22
                    message= _ "Congratulations! You won your bet! Here's your money."
                [/message]

                {VARIABLE_OP side1gold add $bet_gold}
                {VARIABLE_OP side1gold add $bet_gold}
                [modify_side]
                    side=1
                    gold=$side1gold
                [/modify_side]
            [/then]
            [else]
                [message]
                    speaker=spawn_10_22
                    message= _ "How unfortunate. You lost your bet. Better luck next time!"
                [/message]
            [/else]
        [/if]

        [kill]
            id=gladiator1
        [/kill]
        [kill]
            id=gladiator2
        [/kill]

        {CLEAR_VARIABLE glad1}
        {CLEAR_VARIABLE glad2}
        {CLEAR_VARIABLE side1gold}
        #{CLEAR_VARIABLE won_bet}
        #{CLEAR_VARIABLE win_bet}
        {CLEAR_VARIABLE bet_gold}
        #{CLEAR_VARIABLE chosen_fighter}
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=9-11,11
            y=23,22
            side=1
        [/filter]

        [switch]
            variable=colosseum
            [case]
                value=1
                [message]
                    speaker=spawn_10_22
                    message= _ "Welcome back, faerie girl! That was a great fight you had!"
                [/message]
                [message]
                    speaker=Aryel
                    message= _ "Thanks. Got any more left for me?"
                [/message]
                [message]
                    speaker=spawn_10_22
                    message= _ "Not right now, unfortunately. Most of our shows are planned in advance, so there's no room to fit you in. However, you can still bet on a match that piques your interest."
                [/message]

                [message]
                    speaker=Aryel
                    [option]
                        message= _ "Sure. Let's bet on one."

                        [command]
                            [fire_event]
                                name=colosseum battle
                            [/fire_event]
                            [set_variable]
                                name=colosseum
                                value=2
                            [/set_variable]
                        [/command]
                    [/option]
                    [option]
                        message= _ "Not today."

                        [command]
                            [set_variable]
                                name=colosseum
                                value=2
                            [/set_variable]
                        [/command]
                    [/option]
                [/message]
            [/case]
            [case]
                value=2
                [message]
                    speaker=spawn_10_22
                    message= _ "Hello again! Care to place some bets?"
                [/message]

                [message]
                    speaker=Aryel
                    [option]
                        message= _ "Sure. Let's bet on one."

                        [command]
                            [fire_event]
                                name=colosseum battle
                            [/fire_event]
                        [/command]
                    [/option]
                    [option]
                        message= _ "Not today."
                    [/option]
                [/message]
            [/case]
            [else]
                [message]
                    speaker=spawn_10_22
                    message= _ "Welcome, welcome! The Colosseum will be hosting a number of battles today. Care to place a bet on one? Or, perhaps you'd even dare to participate!"
                [/message]

                [message]
                    speaker=Aryel
                    [option]
                        message= _ "Hmph. I'll take you up on that offer."

                        [command]
                            [message]
                                speaker=Esther
                                message= _ "You're nuts!"
                            [/message]
                            [message]
                                speaker=Aryel
                                message= _ "(<i>scoffs</i>) Please. Like I'd lose."
                            [/message]
                            [message]
                                speaker=Yumi
                                message= _ "(<i>rolls eyes</i>)"
                            [/message]
                            [message]
                                speaker=spawn_10_22
                                message= _ "Excellent. I'll add you to the contestants for the upcoming free-for-all. See you soon."
                            [/message]

                            [endlevel]
                                result=victory
                                bonus=no
                                {NEW_GOLD_CARRYOVER 100}
                                replay_save=no
                                carryover_report=no
                                linger_mode=no
                                next_scenario=07a_Colosseum
                            [/endlevel]
                        [/command]
                    [/option]
                    [option]
                        message= _ "Hey, girls. Let's bet on one."

                        [command]
                            [fire_event]
                                name=colosseum battle
                            [/fire_event]
                        [/command]
                    [/option]
                    [option]
                        message= _ "Not today."
                    [/option]
                [/message]
            [/else]
        [/switch]
    [/event]

# shops
    [event]
        name=moveto
        [filter]
            x=33,34,35,33-35
            y=21,20,21,22
            side=1
        [/filter]
        [message]
            speaker=spawn_34_21
            message= _ "What're ye lookin' at? Get outta here 'fre I smack ye."
        [/message]
        [message]
            speaker=Aryel
            message= _ "Have a nice day too, old fart."
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            x=32,33,34,32-34
            y=19,20,19,18
            side=1
        [/filter]
        [message]
            speaker=spawn_33_19
            message= _ "Say... ladies... want some of that good leaf?"
        [/message]
        [message]
            speaker=Esther
            message= _ "Uhh, no thanks."
        [/message]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=36,37,38,36-38
            y=19,20,19,18
            side=1
        [/filter]
        [message]
            speaker=spawn_37_19
            message= _ "The finest chocolates and wine. Care to sample anything?"
        [/message]
        [message]
            speaker=Esther
            [option]
                message= _ "How about some chocolate?"
                [command]
                    [message]
                        speaker=spawn_37_19
                        message= _ "A box for each of you? 6 gold pieces, please."
                    [/message]
                    [store_gold]
                        [filter_side]
                            side=1
                        [/filter_side]
                        variable=side1gold
                    [/store_gold]
                    {VARIABLE_OP side1gold sub 6}
                    [modify_side]
                        side=1
                        gold=$side1gold
                    [/modify_side]
                    {CLEAR_VARIABLE side1gold}
                    [message]
                        speaker=Esther
                        message= _ "Thanks."
                    [/message]
                    [store_unit]
                        [filter]
                            id=Esther
                        [/filter]
                        variable=esther
                    [/store_unit]

                    {VARIABLE_OP esther.experience add 1}

                    [unstore_unit]
                        variable=esther
                        find_vacant=no
                    [/unstore_unit]

                    {CLEAR_VARIABLE esther}
                    [store_unit]
                        [filter]
                            id=Yumi
                        [/filter]
                        variable=yumi
                    [/store_unit]

                    {VARIABLE_OP yumi.experience add 1}
                    [unstore_unit]
                        variable=yumi
                        find_vacant=no
                    [/unstore_unit]

                    {CLEAR_VARIABLE yumi}

                    [store_unit]
                        [filter]
                            id=Aryel
                        [/filter]
                        variable=aryel
                    [/store_unit]

                    {VARIABLE_OP aryel.experience add 1}
                    [unstore_unit]
                        variable=aryel
                        find_vacant=no
                    [/unstore_unit]

                    {CLEAR_VARIABLE aryel}
                [/command]
            [/option]
            [option]
                message= _ "A bottle of wine?"
                [command]
                    [message]
                        speaker=spawn_37_19
                        message= _ "An excellent choice. That will be 5 gold pieces."
                    [/message]
                    [store_gold]
                        [filter_side]
                            side=1
                        [/filter_side]
                        variable=side1gold
                    [/store_gold]
                    {VARIABLE_OP side1gold sub 5}
                    [modify_side]
                        side=1
                        gold=$side1gold
                    [/modify_side]
                    {CLEAR_VARIABLE side1gold}
                    [message]
                        speaker=Esther
                        message= _ "(<i>sips</i>)"
                    [/message]
                    [store_unit]
                        [filter]
                            id=Esther
                        [/filter]
                        variable=modunits
                    [/store_unit]

                    [for]
                        array=modunits
                        [do]
                            {VARIABLE_OP modunits.experience add 1}
                        [/do]
                    [/for]

                    [unstore_unit]
                        variable=modunits
                        find_vacant=no
                        fire_event=yes
                    [/unstore_unit]
                    {CLEAR_VARIABLE modunits}
                [/command]
            [/option]
            [option]
                message= _ "Maybe some other time."
            [/option]
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            x=37,38,39,37-39
            y=21,20,21,22
            side=1
        [/filter]
        [message]
            speaker=spawn_38_21
            message= _ "Embroidery and clothing, spun of only the best fabric! Care to try anything?"
        [/message]
        [message]
            speaker=Aryel
            message= _ "(<i>mutters</i>) What hideous looking things."
        [/message]
        [message]
            speaker=Esther
            message= _ "No thank you."
        [/message]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            side=1
            [filter_adjacent]
                type=Master Bowman
            [/filter_adjacent]
        [/filter]

        [message]
            type=Master Bowman
            [filter_adjacent]
                x,y=$x1,$y1
            [/filter_adjacent]
            message= _ "Move along, citizen."
        [/message]
    [/event]

# crypt
    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=37-39,36,40
            y=3,2,2
            side=1
        [/filter]

        [message]
            speaker=Esther
            message= _ "We're not supposed to go back in. Remember?"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            x=1-3
            y=1-2
            side=1
        [/filter]

        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 100}
            replay_save=no
            carryover_report=no
            linger_mode=no
            next_scenario=07b_Upper_District
        [/endlevel]
    [/event]

# temple
    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=2-4,3
            y=8-9,10
            side=1
        [/filter]

        [switch]
            variable=temple
            [case]
                value=1
                [message]
                    speaker=Aryel
                    message= _ "We've already been here. Any point in going again?"
                [/message]
                [message]
                    speaker=Esther
                    [option]
                        message= _ "Sure, why not?"

                        [command]
                            [endlevel]
                                result=victory
                                bonus=no
                                {NEW_GOLD_CARRYOVER 100}
                                replay_save=no
                                carryover_report=no
                                linger_mode=no
                                next_scenario=07c_Temple
                            [/endlevel]
                        [/command]
                    [/option]
                    [option]
                        message= _ "I guess not."
                    [/option]
                [/message]
            [/case]
            [else]
                [message]
                    speaker=spawn_1_10
                    message= _ "Hello, faeries. Have you come to visit the temple of healing?"
                [/message]
                [message]
                    speaker=Esther
                    [option]
                        message= _ "Uhh, sure. Let's take a look."

                        [command]
                            [endlevel]
                                result=victory
                                bonus=no
                                {NEW_GOLD_CARRYOVER 100}
                                replay_save=no
                                carryover_report=no
                                linger_mode=no
                                next_scenario=07c_Temple
                            [/endlevel]
                        [/command]
                    [/option]
                    [option]
                        message= _ "Hmm, not today."
                    [/option]
                [/message]
            [/else]
        [/switch]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=16,20,17-19
            y=8,8,9
            side=1
        [/filter]

        [switch]
            variable=pantheon
            [case]
                value=1
                [message]
                    speaker=Aryel
                    message= _ "We've already been there. Any point in going again?"
                [/message]
                [message]
                    speaker=Esther
                    [option]
                        message= _ "Sure, why not?"

                        [command]
                            [endlevel]
                                result=victory
                                bonus=no
                                {NEW_GOLD_CARRYOVER 100}
                                replay_save=no
                                carryover_report=no
                                linger_mode=no
                                next_scenario=07d_Pantheon
                            [/endlevel]
                        [/command]
                    [/option]
                    [option]
                        message= _ "I guess not."
                    [/option]
                [/message]
            [/case]
            [else]
                [message]
                    speaker=spawn_18_8
                    message= _ "Halt! The Royal Palace is not open to visitors right now. You are permitted to enter the Pantheon, but remember to keep your voices down while inside. Weaponry is not permitted within and the use of magic is strictly forbidden."
                [/message]
                [message]
                    speaker=Esther
                    [option]
                        message= _ "Let's take a look at what's inside."

                        [command]
                            [endlevel]
                                result=victory
                                bonus=no
                                {NEW_GOLD_CARRYOVER 100}
                                replay_save=no
                                carryover_report=no
                                linger_mode=no
                                next_scenario=07d_Pantheon
                            [/endlevel]
                        [/command]
                    [/option]
                    [option]
                        message= _ "We'll be on our way."
                    [/option]
                [/message]
            [/else]
        [/switch]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            x=20,22
            y=33,33
            side=1
        [/filter]

        [message]
            speaker=Aryel
            message= _ "Are we leaving?"
        [/message]
        [message]
            speaker=Esther
            [option]
                message= _ "Nothing else to do here."

                [command]
                    {CLEAR_VARIABLE prev_scenario}
                    {CLEAR_VARIABLE pantheon}
                    {CLEAR_VARIABLE upper_district}
                    {CLEAR_VARIABLE temple}
                    {CLEAR_VARIABLE garden}
                    {CLEAR_VARIABLE aryel_tree_exp}
                    {CLEAR_VARIABLE yumi_tree_exp}
                    {CLEAR_VARIABLE colosseum}
                    [endlevel]
                        result=victory
                        bonus=no
                        {NEW_GOLD_CARRYOVER 100}
                        replay_save=no
                        carryover_report=no
                        linger_mode=no
                        next_scenario=08_Impetus
                    [/endlevel]
                [/command]
            [/option]
            [option]
                message= _ "Not quite yet."
            [/option]
        [/message]
    [/event]
[/scenario]


#textdomain wesnoth-Genesis
[scenario]
    id=07a_Colosseum
    name= _ "Colosseum"
    map_data="{~add-ons/Genesis/episode1/maps/07a_Colosseum.map}"
    next_scenario=06_Caerleon
    disallow_recall=yes
    victory_when_enemies_defeated=yes
    turns=-1
    {DEFAULT_SCHEDULE_24H}

    {SCENARIO_MUSIC battle.ogg}

    [side]
        {PLAYER_FAE}
        {NO_GOLD_SIDE}
        side=1
        recruit=
        fog=yes
    [/side]

    [side]
        side=2
        no_leader=yes
        team_name=fae
        controller=null
        user_team_name= _ "team_name^Spectators"
        color=white
    [/side]
    [side]
        side=3
        no_leader=yes
        team_name=gladiator1
        controller=ai
        user_team_name= _ "team_name^Gladiators"
        color=white
    [/side]
    [side]
        side=4
        no_leader=yes
        team_name=gladiator2
        controller=ai
        user_team_name= _ "team_name^Gladiators"
        defeat_condition=no_units_left
        color=white
    [/side]
    [side]
        side=5
        no_leader=yes
        team_name=gladiator3
        controller=ai
        user_team_name= _ "team_name^Gladiators"
        defeat_condition=no_units_left
        color=white
    [/side]
    [side]
        side=6
        no_leader=yes
        team_name=gladiator4
        controller=ai
        user_team_name= _ "team_name^Gladiators"
        defeat_condition=no_units_left
        color=white
    [/side]
    [side]
        side=7
        no_leader=yes
        team_name=gladiator5
        controller=ai
        user_team_name= _ "team_name^Gladiators"
        defeat_condition=no_units_left
        color=white
    [/side]
    [side]
        {MONSTER_SIDE}
        side=8
        defeat_condition=always
    [/side]

#define GENERATE_OBSTACLES
    [store_locations]
        variable=floor_hex
        terrain=Rrc
        [not]
            x=12,21,21,12,4,12,4
            y=12-13,8,18,22,18,3,7
        [/not]
        [and]
            [not]
                [filter_adjacent_location]
                    terrain=Cmy^Xo
                [/filter_adjacent_location]
            [/not]
        [/and]
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..8
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    terrain=Xomy
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}
    [store_locations]
        variable=floor_hex
        terrain=Rrc
        [not]
            x=12,21,21,12,4,12,4
            y=12-13,8,18,22,18,3,7
        [/not]
        [and]
            [filter_adjacent_location]
                terrain=Xomy
            [/filter_adjacent_location]
        [/and]
        [and]
            [not]
                [filter_adjacent_location]
                    terrain=Cmy^Xo
                [/filter_adjacent_location]
            [/not]
        [/and]
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..6
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    terrain=Xomy
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}
#enddef
#define GENERATE_FLOOR_TEXTURE
    [store_locations]
        variable=floor_hex
        terrain=Rrc
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..10
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    terrain=Rp
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}
    [store_locations]
        variable=floor_hex
        terrain=Rrc
        [and]
            [filter_adjacent_location]
                terrain=Rp
            [/filter_adjacent_location]
        [/and]
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..4
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    terrain=Rp
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}

    [store_locations]
        variable=floor_hex
        terrain=R*
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..8
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    layer=overlay
                    terrain=^Edb
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}
    [store_locations]
        variable=floor_hex
        terrain=R*
        [and]
            [filter_adjacent_location]
                terrain=R*^Edb
            [/filter_adjacent_location]
        [/and]
    [/store_locations]
    [for]
        array=floor_hex
        [do]
        [set_variable]
            name=change_terrain
            rand=1..5
        [/set_variable]
        [if]
            [variable]
                name=change_terrain
                numerical_equals=1
            [/variable]
            [then]
                [terrain]
                    x,y=$floor_hex[$i].x,$floor_hex[$i].y
                    layer=overlay
                    terrain=^Edb
                [/terrain]
            [/then]
        [/if]
        {CLEAR_VARIABLE change_terrain}
        [/do]
    [/for]
    {CLEAR_VARIABLE floor_hex}
#enddef

# monster spawns
    {RESPAWN_POINT ("Giant Mudcrawler","Giant Scorpion","Giant Spider","Great Wolf","Wolf","Fire Guardian","Ogre","Blood Bat","Dread Bat","Gryphon") 8 12 12 4}
    {RESPAWN_POINT ("Giant Mudcrawler","Giant Scorpion","Giant Spider","Great Wolf","Wolf","Fire Guardian","Ogre","Blood Bat","Dread Bat","Gryphon") 8 12 13 4}

    [event]
        name=prestart

        {GENERATE_OBSTACLES}
        {GENERATE_FLOOR_TEXTURE}
        {GENERATE_FLOOR_TEXTURE}

        {RECALL_YUMI 1 7}

        [store_locations]
            variable=castle_hex
            terrain=Cmy,Kmy
            [not]
                x=1-4
                y=4-10
            [/not]
        [/store_locations]
        [for]
            array=castle_hex
            [do]
                [set_variable]
                    name=spawn_val
                    rand=1..10
                [/set_variable]
                [if]
                    [variable]
                        name=spawn_val
                        numerical_equals=1
                    [/variable]
                    [then]
                        {SPAWN_NOID ("Peasant,Woodsman") 2 $castle_hex[$i].x $castle_hex[$i].y}
                    [/then]
                [/if]
                {CLEAR_VARIABLE spawn_val}
            [/do]
        [/for]
        {CLEAR_VARIABLE castle_hex}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            terrain=Cmy,Kmy,Cmy^Xo
            multiturn=yes
        [/lift_fog]
        [set_recruit]
            side=1
            recruit=
        [/set_recruit]
    [/event]

    [event]
        name=start

        [redraw][/redraw]
        {SPAWN_ID ("Master at Arms") 2 12 1 ("Host") ("male")}
        [message]
            speaker=Host
            message= _ "Welcome, welcome all to the Colosseum! Today, we will be hosting a grand free-for-all battle, featuring six contestants facing off in a fight to the death! And as an added bonus, we'll be throwing in some wild beasts to mix things up!"
        [/message]
        [message]
            speaker=narrator
            message= _ "(crowd cheers)"
        [/message]
        [message]
            speaker=Host
            message= _ "Now, bring the contestants into the arena!"
        [/message]

        {RECALL_ARYEL 4 7}
        [redraw]
            side=1
            clear_shroud=yes
        [/redraw]

        #ifdef EASY
        {SPAWN_ID ("Swordsman","Pikeman","Knight","Longbowman","Shock Trooper","Rogue","Outlaw","Bandit","Trapper","Duelist") 3 21 8 ("glad1") ("male")}
        {SPAWN_ID ("Swordsman","Pikeman","Knight","Longbowman","Shock Trooper","Rogue","Outlaw","Bandit","Trapper","Duelist") 4 21 18 ("glad2") ("male")}
        {SPAWN_ID ("Swordsman","Pikeman","Knight","Longbowman","Shock Trooper","Rogue","Outlaw","Bandit","Trapper","Duelist") 5 12 22 ("glad3") ("male")}
        {SPAWN_ID ("Swordsman","Pikeman","Knight","Longbowman","Shock Trooper","Rogue","Outlaw","Bandit","Trapper","Duelist") 6 4 18 ("glad4") ("male")}
        {SPAWN_ID ("Swordsman","Pikeman","Knight","Longbowman","Shock Trooper","Rogue","Outlaw","Bandit","Trapper","Duelist") 7 12 3 ("glad5") ("male")}
        #endif
        #ifndef EASY
        {SPAWN_ID ("Royal Guard","Halberdier","Grand Knight","Master Bowman","Iron Mauler","Assassin","Fugitive","Highwayman","Huntsman","Ranger") 3 21 8 ("glad1") ("male")}
        {SPAWN_ID ("Royal Guard","Halberdier","Grand Knight","Master Bowman","Iron Mauler","Assassin","Fugitive","Highwayman","Huntsman","Ranger") 4 21 18 ("glad2") ("male")}
        {SPAWN_ID ("Royal Guard","Halberdier","Grand Knight","Master Bowman","Iron Mauler","Assassin","Fugitive","Highwayman","Huntsman","Ranger") 5 12 22 ("glad3") ("male")}
        {SPAWN_ID ("Royal Guard","Halberdier","Grand Knight","Master Bowman","Iron Mauler","Assassin","Fugitive","Highwayman","Huntsman","Ranger") 6 4 18 ("glad4") ("male")}
        {SPAWN_ID ("Royal Guard","Halberdier","Grand Knight","Master Bowman","Iron Mauler","Assassin","Fugitive","Highwayman","Huntsman","Ranger") 7 12 3 ("glad5") ("male")}
        #endif

        [message]
            speaker=Aryel
            message= _ "Sweet. Let's do this."
        [/message]
        [message]
            speaker=Esther
            message= _ "(sighs) Look at her, getting so excited about such a barbaric sport."
        [/message]
        [message]
            speaker=Yumi
            message= _ "(stares at Aryel)"
        [/message]
        [message]
            speaker=Host
            message= _ "Contestants prepare yourselves. On my mark. Ready... fight!"
        [/message]
        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Defeat the other gladiators")}
            {OBJECTIVE_DEFEAT  ( _ "Death of Aryel")}
            {OBJECTIVE_CARRYOVER}
            {OBJECTIVE_NOTE ( _ "You can take control of monsters by right clicking on them. This will cost 4 movement points per use.")}
            {OBJECTIVE_NOTE ( _ "When you complete this scenario and return to Caerleon, you will need to reload the Caerleon scenario to continue playing.")}
        [/objectives]
        [set_menu_item]
            id=possess
            description= _ "Possess"
            image="attacks/wail.png~SCALE(18,18)"
            [show_if]
                [variable]
                    name=side_number
                    numerical_equals=1
                [/variable]
            [/show_if]
            [filter_location]
                [filter]
                    side=8
                [/filter]
            [/filter_location]
            [command]
                [store_unit]
                    [filter]
                        id=Aryel
                    [/filter]
                    variable=aryel
                [/store_unit]
                [if]
                    [variable]
                        name=aryel.moves
                        less_than=4
                    [/variable]
                    [then]
                        [message]
                            speaker=narrator
                            message= _ "You cannot use this spell right now!"
                        [/message]
                    [/then]
                    [else]
                        [store_unit]
                            [filter]
                                x,y=$x1,$y1
                            [/filter]
                            variable=monster
                        [/store_unit]
                        [set_variable]
                            name=monster.side
                            value=1
                        [/set_variable]
                        {VARIABLE_OP aryel.moves sub 4}
                        {PLAY_SOUND "wail.wav"}
                        [unstore_unit]
                            variable=monster
                            find_vacant=no
                        [/unstore_unit]
                        [unstore_unit]
                            variable=aryel
                            find_vacant=no
                        [/unstore_unit]
                        {CLEAR_VARIABLE monster}
                    [/else]
                [/if]
                {CLEAR_VARIABLE aryel}
            [/command]
        [/set_menu_item]
    [/event]
    [event]
        name=menu item possess
        first_time_only=yes
        [message]
            speaker=Aryel
            message= _ "Aha, looks like these creatures are weak enough for me to control. Excellent."
        [/message]
    [/event]

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

        [message]
            speaker=glad1
            message= _ "I cannot die like this! I am- ack!"
        [/message]
    [/event]
    [event]
        name=last breath
        [filter]
            id=glad2
        [/filter]

        [message]
            speaker=glad2
            message= _ "Nooo! Victory, oh sweet victory..."
        [/message]
    [/event]
    [event]
        name=last breath
        [filter]
            id=glad3
        [/filter]

        [message]
            speaker=glad3
            message= _ "I can't possibly lose to the likes of-"
        [/message]
    [/event]
    [event]
        name=last breath
        [filter]
            id=glad4
        [/filter]

        [message]
            speaker=glad4
            message= _ "How could I lose to such pitiful worms..."
        [/message]
    [/event]
    [event]
        name=last breath
        [filter]
            id=glad5
        [/filter]

        [message]
            speaker=glad5
            message= _ "Argh!"
        [/message]
    [/event]

    [event]
        name=victory

        [message]
            speaker=Host
            message= _ "Ladies and gentlemen, we have a winner! Looks like it's the faerie!"
        [/message]
        [message]
            speaker=narrator
            message= _ "(crowd goes wild)"
        [/message]
        [message]
            speaker=Aryel
            message= _ "(smirks at Esther) See? What'd I say?"
        [/message]
        [message]
            speaker=Esther
            message= _ "(snorts) Wouldn't expect any less from you."
        [/message]
        [message]
            speaker=Host
            message= _ "For winning today's free-for-all, you've earned yourself 100 gold! Congratulations!"
        [/message]
        [message]
            speaker=Aryel
            message= _ "(grins) See? And you thought this was a bad idea."
        [/message]
        [message]
            speaker=Esther
            message= _ "I said nothing like that!"
        [/message]
        [message]
            speaker=Aryel
            message= _ "You totally thought so."
        [/message]
        [message]
            speaker=Esther
            message= _ "Hmph. Now come on, get out of there before everyone starts crowding you."
        [/message]
        [message]
            speaker=Aryel
            message= _ "And disappoint my new fans? Are you kidding? You two go on, I'll catch up with you later."
        [/message]
        [message]
            speaker=Yumi
            message= _ "(rolls eyes)"
        [/message]

        [store_gold]
            [filter_side]
                side=1
            [/filter_side]
            variable=side1gold
        [/store_gold]
        {VARIABLE_OP side1gold add 100}
        [modify_side]
            side=1
            gold=$side1gold
        [/modify_side]
        {CLEAR_VARIABLE side1gold}

        [store_unit]
            [filter]
                id=Aryel
            [/filter]
            variable=aryel
        [/store_unit]

        #ifdef EASY
        {VARIABLE_OP aryel.experience add 125}

        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+125 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef NORMAL
        {VARIABLE_OP aryel.experience add 100}
        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+100 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef HARD
        {VARIABLE_OP aryel.experience add 50}

        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+50 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif

        {CLEAR_VARIABLE aryel}
        {DELAY 500}

        [kill]
            side=1
            [not]
                id=Aryel,Esther,Yumi
            [/not]
            [and]
                [not]
                    x,y=recall,recall
                [/not]
            [/and]
        [/kill]

        [clear_menu_item]
            id=possess
        [/clear_menu_item]
        [set_variable]
            name=colosseum
            value=1
        [/set_variable]
        [set_variable]
            name=prev_scenario
            value="Colosseum"
        [/set_variable]
        [endlevel]
            result=victory
            {NEW_GOLD_CARRYOVER 100}
            carryover_report=no
            linger_mode=no
            next_scenario=06_Caerleon
        [/endlevel]
    [/event]
    [event]
        name=last breath
        [filter]
            id=Aryel
        [/filter]

        [message]
            speaker=Aryel
            message= _ "Ugh, whoops... I- ahh-"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
[/scenario]

#undef GENERATE_OBSTACLES
#undef GENERATE_FLOOR_TEXTURE


#textdomain wesnoth-Genesis
[scenario]
    id=07b_Upper_District
    name= _ "Upper District"
    map_data="{~add-ons/Genesis/episode1/maps/07b_Upper_District.map}"
    next_scenario=06_Caerleon
    victory_when_enemies_defeated=no
    turns=-1
    {DEFAULT_SCHEDULE_24H}

    {SCENARIO_MUSIC silvan_sanctuary.ogg}
    {EXTRA_SCENARIO_MUSIC traveling_minstrels.ogg}
    {STORYTXT_UPPER_DISTRICT}

    [side]
        {PLAYER_FAE}
        {NO_GOLD_SIDE}
        side=1
        recruit=
    [/side]

    [side]
        {HUMAN_ALLY}
        side=2
        no_leader=yes
    [/side]

    {SPAWN_POINT ("Royal Guard") 2 9 5}
    {SPAWN_POINT ("Royal Guard") 2 11 7}
    {SPAWN_POINT ("Red Mage") 2 30 8}
    {SPAWN_POINT ("Arch Mage") 2 21 3}
    {SPAWN_POINT ("Silver Mage") 2 23 5}

    [event]
        name=prestart

        [label]
            x,y=12,2
            text = _ "Gardens"
        [/label]
        [label]
            x,y=4,7
            text = _ "Arcaneum"
        [/label]
        [label]
            x,y=27,5
            text = _ "Library"
        [/label]

        [switch]
            variable=prev_scenario
            [case]
                value="Arcaneum"
                [move_unit]
                    id=Esther
                    to_x,to_y=4,8
                [/move_unit]
                {RECALL_ARYEL 4 9}
                {RECALL_YUMI 5 9}
            [/case]
            [case]
                value="Lore"
                [move_unit]
                    id=Esther
                    to_x,to_y=27,6
                [/move_unit]
                {RECALL_YUMI 26 6}
                {RECALL_ARYEL 25 6}
            [/case]
            [else]
                {RECALL_ARYEL 30 16}
                {RECALL_YUMI 32 16}
            [/else]
        [/switch]
        [set_recruit]
            side=1
            recruit=
        [/set_recruit]
    [/event]
    [event]
        name=start

        [if]
            [variable]
                name=prev_scenario
                equals="Arcaneum"
            [/variable]
            [then]
                {SPAWN_ID_NAME ("Mage") 2 4 7 ("student") ("female") ("Kacy")}
                [message]
                    speaker=student
                    message= _ "Thank you, thank you, thank you! You have no idea how worried I was- I thought for sure they would expel us or something- I mean, there's a chance they still might, but at least all those things are gone, and, oh my goodness-"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Relax. You're going to run out of breath if you talk like that for too long."
                [/message]
                [message]
                    speaker=student
                    message= _ "(breathes) Sorry. It's too bad I have nothing to give you in return for your trouble. I'm not one of the rich kids-"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "It's fine. Really, no worries. We just thought we could help a bit, so don't fret, okay?"
                [/message]
                [message]
                    speaker=student
                    message= _ "(smiles) Okay. Thanks again, though."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "No problem."
                [/message]
            [/then]
        [/if]

        [objectives]
            {OBJECTIVE_VICTORY  ( _ "Explore")}
            {OBJECTIVE_NOTE ( _ "There are two extra scenarios on this map.")}
            {OBJECTIVE_NOTE ( _ "There are a few bonuses that Esther can obtain.")}
            {OBJECTIVE_NOTE ( _ "Look for labels or move next to other units to trigger events.")}
            {OBJECTIVE_NOTE ( _ "Move back to the great tree (35,17) to return to Caerleon.")}
        [/objectives]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Esther
        [/filter]
        {MODIFY_UNIT (id=Esther) moves 10}
    [/event]
    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Yumi
        [/filter]
        {MODIFY_UNIT (id=Yumi) moves 10}
    [/event]
    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Aryel
        [/filter]
        {MODIFY_UNIT (id=Aryel) moves 10}
    [/event]

    [event]
        name=moveto
        [filter]
            x=27
            y=5-6
            side=1
        [/filter]

        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 100}
            replay_save=no
            carryover_report=no
            linger_mode=no
            next_scenario=07f_Lore
        [/endlevel]
    [/event]

    [event]
        name=moveto
        [filter]
            x=4,4
            y=6,7
            side=1
        [/filter]

        [filter_condition]
            [variable]
                name=upper_district
                numerical_not_equals=1
            [/variable]
        [/filter_condition]

        {SPAWN_ID_NAME ("Mage") 2 4 8 ("student") ("female") ("Kacy")}

        [message]
            speaker=student
            message= _ "Oh, thank goodness! I-I was scared to death. I thought, oh my gosh-"
        [/message]
        [message]
            speaker=Esther
            message= _ "Calm down! What seems to be the problem?"
        [/message]
        [message]
            speaker=student
            message= _ "I-it's inside! Some of my friends were j-just playing around with spells from a book, and suddenly there were... there were... s-skeletons everywhere! And ghosts! Oh, the headmaster is going to have a fit!"
        [/message]
        [message]
            speaker=Esther
            message= _ "(glances at Aryel) Maybe we can help."
        [/message]
        [message]
            speaker=Aryel
            message= _ "Wha-? Oh, well, hmm. I don't care either way. Human troubles are so mundane."
        [/message]
        [message]
            speaker=Esther
            message= _ "Don't be so mean! Of course we'll help."
        [/message]
        [message]
            speaker=student
            message= _ "Thank you so much!"
        [/message]

        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 100}
            replay_save=no
            carryover_report=no
            linger_mode=no
            next_scenario=07e_Arcaneum
        [/endlevel]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            id=Yumi,Aryel
            [filter_adjacent]
                type=Arch Mage
            [/filter_adjacent]
        [/filter]

        [message]
            speaker=spawn_21_3
            message= _ "Blasted experiments... I have no time for you - come back some other day!"
        [/message]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Esther
            [filter_adjacent]
                type=Arch Mage
            [/filter_adjacent]
        [/filter]

        [switch]
            variable=garden
            [case]
                value=1
                [message]
                    speaker=spawn_21_3
                    message= _ "You... you have the mark of fire upon you!"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Me?"
                [/message]
                [message]
                    speaker=spawn_21_3
                    message= _ "Yes, indeed. Indeed, this is incredible! I have never felt anything like this before. What raw power!"
                [/message]
                [message]
                    speaker=Yumi
                    message= _ "(shifts nervously)"
                [/message]
                [message]
                    speaker=spawn_21_3
                    message= _ "Perhaps... yes, could you come here for a moment?"
                [/message]
                [message]
                    speaker=Aryel
                    message= _ "(frowns)"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "I... well, sure."
                [/message]
                [move_unit]
                    id=Esther
                    to_x,to_y=20,3
                [/move_unit]
                [message]
                    speaker=spawn_21_3
                    message= _ "Hold out your hand."
                [/message]
                {DELAY 750}

                {PLAY_SOUND "flame-big.ogg"}
                [object]
                    [filter]
                        id=Esther
                    [/filter]
                    silent=yes
                    duration=forever
                    [effect]
                        apply_to=new_ability
                        [abilities]
                            {ABILITY_KINDLE}
                        [/abilities]
                    [/effect]
                    [effect]
                        apply_to=remove_ability
                        [abilities]
                            {ABILITY_REGENERATES}
                        [/abilities]
                    [/effect]
                [/object]
                {DELAY 750}
                [message]
                    speaker=spawn_21_3
                    message= _ "Fascinating, simply fascinating. It would appear that the resonance between our two modes of pyromancy strengthens both of our energies. This is quite a revelation! So that was what was missing. It required the innate power of a faerie to supplement my generators. With this, it is now possible for me to advance my studies even further. The title of 'Great Mage' is mine!"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Erm... that's good."
                [/message]
                [message]
                    speaker=spawn_21_3
                    message= _ "Good? Oh yes, it is excellent. Very excellent. Now, if you will excuse me, I have some work to attend to..."
                [/message]

                [set_variable]
                    name=garden
                    value=2
                [/set_variable]
            [/case]
            [else]
                [message]
                    speaker=spawn_21_3
                    message= _ "Someone like me is certain to be elected to the mage council sooner or later."
                [/message]
            [/else]
        [/switch]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=1
            [filter_adjacent]
                type=Silver Mage
            [/filter_adjacent]
        [/filter]

        [switch]
            variable=upper_district
            [case]
                value=1
                [message]
                    speaker=spawn_23_5
                    message= _ "You got rid of those pesky undead creatures? Great. Now, let me go check if my office is fixed yet..."
                [/message]
                [kill]
                    id=spawn_23_5
                [/kill]
                [message]
                    speaker=Aryel
                    message= _ "(whispers) These humans are so impatient."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "(whispers) It's to be expected. They don't live very long, so they're always in a hurry."
                [/message]
            [/case]
            [else]
                [message]
                    speaker=spawn_23_5
                    message= _ "Oh? What are a bunch of faeries doing all the way up here?"
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Just visiting."
                [/message]
                [message]
                    speaker=spawn_23_5
                    message= _ "Hmph, well stay out of trouble. The students are causing enough problems as it is."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "What kind of problems?"
                [/message]
                [message]
                    speaker=spawn_23_5
                    message= _ "Something to do with not being able to control their creations properly. Stay clear of the Arcaneum, if you know what's good for you."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Right."
                [/message]
            [/else]
        [/switch]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=1
            [filter_adjacent]
                type=Red Mage
            [/filter_adjacent]
        [/filter]

        [switch]
            variable=upper_district
            [case]
                value=1
                [message]
                    speaker=spawn_30_8
                    message= _ "Heard what you three did. Good bit of work at the Arcaneum. Always wondered when them damned conjurers were going to lose control of those undead."
                [/message]
                [message]
                    speaker=Aryel
                    message= _ "Not a fan of the undead, huh. (mutters) Maybe I should show you how fun they can be."
                [/message]
                [message]
                    speaker=spawn_30_8
                    message= _ "They're fine if you can control 'em, but I've got no clue why they thought a bunch of blasted students could do it. Incompetent fools."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Least we took care of it. Come on, let's not bother the man any more than we need to."
                [/message]
            [/case]
            [else]
                [message]
                    speaker=spawn_30_8
                    message= _ "I have no time for idle chatter."
                [/message]
            [/else]
        [/switch]
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            side=1
            [filter_adjacent]
                type=Royal Guard
            [/filter_adjacent]
        [/filter]

        [if]
            [variable]
                name=garden
                numerical_not_equals=1
            [/variable]
            [and]
                [variable]
                    name=garden
                    numerical_not_equals=2
                [/variable]
            [/and]
            [and]
                [variable]
                    name=garden
                    numerical_not_equals=3
                [/variable]
            [/and]
            [then]
                [message]
                    speaker=Esther
                    message= _ "What is this place?"
                [/message]
                [message]
                    speaker=spawn_9_5
                    message= _ "Just a simple garden. The magi sometimes come here to meditate or commune with nature. You are free to enjoy, but please keep your voices down inside."
                [/message]
                [message]
                    speaker=Esther
                    message= _ "Of course."
                [/message]
            [/then]
        [/if]
        [terrain]
             x=10,10,11
             y=4,5,6
            terrain=Gg
        [/terrain]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            x,y=12,1
            id=Esther
        [/filter]
        [message]
            speaker=narrator
            message= _ "It is warm and comfortable here and the presence of the sun is strong. There is an alien feeling, one wholly different from that of human magic, a more pure and raw fire that resonantes with the magic flowing through her body. Its power surges and ebbs in rhythm, like a heartbeat, pulsating with energy. The feeling is quite unfamiliar, but welcome."
        [/message]
        [switch]
            variable=garden
            [case]
                value=1
            [/case]
            [case]
                value=2
            [/case]
            [else]
                [message]
                    speaker=narrator
                    message= _ "As the energy surges again, there is a brief moment when it feels as if it's flowing into fae's body itself, imbuing everything with a heat that does not burn, but rather fosters a pleasant, sheltering warmth. A moment later, it feels as if some spark of energy has been kindled."
                [/message]
                [object]
                    [filter]
                        id=Esther
                    [/filter]
                    silent=yes
                    duration=forever
                    [effect]
                        apply_to=new_ability
                        [abilities]
                            {ABILITY_BLESSING_SHARDIA}
                        [/abilities]
                    [/effect]
                [/object]
                [set_variable]
                    name=garden
                    value=1
                [/set_variable]
            [/else]
        [/switch]
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            x,y=12,1
            id=Aryel
        [/filter]
        [filter_condition]
            [variable]
                name=aryel_tree_exp
                numerical_not_equals=1
            [/variable]
        [/filter_condition]
        [message]
            speaker=narrator
            message= _ "In Caerleon, high up in the mountains, the air is usually thin and cold. But here, there seems to be a strange warmth of sensation, where everything in the ambient is rife with life and vitality, belying the cold blocks of white marble and unblinking statues of the long dead. This place is pleasant, and it is not hard to see why the human magi like it."
        [/message]

        [store_unit]
            [filter]
                id=Aryel
            [/filter]
            variable=aryel
        [/store_unit]

        #ifdef EASY
        {VARIABLE_OP aryel.experience add 60}

        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+60 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef NORMAL
        {VARIABLE_OP aryel.experience add 50}

        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+50 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef HARD
        {VARIABLE_OP aryel.experience add 25}

        [unstore_unit]
            variable=aryel
            find_vacant=no
            text= _ "+25 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif

        {CLEAR_VARIABLE aryel}
        {VARIABLE aryel_tree_exp 1}
    [/event]
    [event]
        name=moveto
        first_time_only=yes
        [filter]
            x,y=12,1
            id=Yumi
        [/filter]
        [filter_condition]
            [variable]
                name=yumi_tree_exp
                numerical_not_equals=1
            [/variable]
        [/filter_condition]
        [message]
            speaker=narrator
            message= _ "It is quiet and serene. There is very little to disturb the silence, but there is plenty of sensation that emanates from the earth itself. Or perhaps it's flowing through the air. Or perhaps it's raining down from the sunlight. It's a faint rumble, or maybe a pinprick of emotion, like a little spark running through her. She's not really sure what it is, but one thing is for certain - the bright light reflecting off the white marble is somewhat irritating and disconcerting."
        [/message]

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

        #ifdef EASY
        {VARIABLE_OP yumi.experience add 60}

        [unstore_unit]
            variable=yumi
            find_vacant=no
            text= _ "+60 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef NORMAL
        {VARIABLE_OP yumi.experience add 50}

        [unstore_unit]
            variable=yumi
            find_vacant=no
            text= _ "+50 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif
        #ifdef HARD
        {VARIABLE_OP yumi.experience add 25}

        [unstore_unit]
            variable=yumi
            find_vacant=no
            text= _ "+25 XP"
            red,green,blue=255,0,255
        [/unstore_unit]
        #endif

        {CLEAR_VARIABLE yumi}
        {VARIABLE yumi_tree_exp 1}
    [/event]

    [event]
        name=moveto
        first_time_only=yes
        [filter]
            x,y=35,17
            side=1
        [/filter]
        [set_variable]
            name=prev_scenario
            value="Upper District"
        [/set_variable]
        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 100}
            replay_save=no
            carryover_report=no
            linger_mode=no
            next_scenario=06_Caerleon
        [/endlevel]
    [/event]
[/scenario]