#textdomain wesnoth-did

[scenario]
    id=07a_A_Small_Favor
    name= _ "A Small Favor — I"
    map_file=07a_A_Small_Favor.map
    {TURNS 20 18 16}
    next_scenario=07b_A_Small_Favor2
    victory_when_enemies_defeated=no

#ifdef EASY
    {FIRST_WATCH_HOUR2}
    {FIRST_WATCH_HOUR2}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR4}
    {FIRST_WATCH_HOUR4}
    {MIDNIGHT_HOUR}
    {MIDNIGHT_HOUR}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR2}
    {SECOND_WATCH_HOUR2}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR5}
    {SECOND_WATCH_HOUR5}
    {SECOND_WATCH_HOUR6}
    {SECOND_WATCH_HOUR6}
    {DAWN_HOUR}
#endif

#ifdef NORMAL
    {FIRST_WATCH_HOUR2}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR4}
    {FIRST_WATCH_HOUR4}
    {MIDNIGHT_HOUR}
    {MIDNIGHT_HOUR}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR2}
    {SECOND_WATCH_HOUR2}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR5}
    {SECOND_WATCH_HOUR5}
    {SECOND_WATCH_HOUR6}
    {DAWN_HOUR}
#endif

#ifdef HARD
    {FIRST_WATCH_HOUR2}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR3}
    {FIRST_WATCH_HOUR4}
    {FIRST_WATCH_HOUR4}
    {MIDNIGHT_HOUR}
    {MIDNIGHT_HOUR}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR1}
    {SECOND_WATCH_HOUR2}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR3}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR4}
    {SECOND_WATCH_HOUR5}
    {SECOND_WATCH_HOUR6}
    {DAWN_HOUR}
#endif

    {SCENARIO_MUSIC       elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}
    {EXTRA_SCENARIO_MUSIC the_deep_path.ogg}

    [story]
        [part]
            music=underground.ogg
            story= _ "Fleeing from the city of his birth, Malin escapes into the forested hills north of the Great River. Some distance west, he finally stops after several days bereft of rest and sleep. He closes his eyes, trying to purge the last few hours from his mind, but the darkness only makes the images all the more vivid. He is tired, <i>so</i> tired, but sleep does not come."
            {STORYTXT_BACKGROUND travel.webp}
        [/part]
        [part]
            story= _ "<i>“No regrets. No regrets...”</i> He repeats it under his breath like a chant, murmuring over and over in his half-conscious state. After a while, a second voice joins, a voice that sounds very much like his own, but somehow feels foreign and alien. <i>‘There could have been another way. You might have been wrong.’</i>"
            {STORYTXT_BACKGROUND travel.webp}
        [/part]
        [part]
            story= _ "<i>“No, no. Even if there were another way, they would have spurned me all the same. They are wrong... blind. I have no regrets about what I did. No regrets...”</i> He quells the voice. Sleep comes, long stretches of dreamless darkness punctuated briefly by nightmarish forms — distorted, grotesque things that whisper in eerily familiar voices. <i>‘You are cursed, Malin the Damned! Cursed! Cursed. Cursed...’</i> They echo over and over, first a choir, then a duet, both male, then just one, a single voice alone in the darkness."
            {STORYTXT_BACKGROUND travel.webp}
        [/part]
        [part]
            story= _ "Malin wakes up to a plume of smoke rising behind him. He gives it only a brief thought before heading farther west. Soon, he catches sight of the golden banners of Tath and reunites with his teacher just outside of the city."
            {STORYTXT_BACKGROUND travel.webp}
        [/part]
        [part]
            story=_ "<i>“For your final test as my apprentice, you will aid me in retrieving a book,”</i> the necromancer says. <i>“The book was... stolen from me long ago. It has personal value to me, so you may think of this as a small favor. However, this task will require you to act against your countrymen of Wesnoth, since it was one of them who took it from me.”</i>"
            {STORYTXT_BACKGROUND book.webp}
        [/part]
        [part]
            story= _ "Malin replies, <i>“They are no longer countrymen of mine.”</i>"
            {STORYTXT_BACKGROUND book.webp}
        [/part]
        [part]
            story= _ "Darken Volk continues, <i>“Excellent. There is a lady of Tath by the name of Karae. She was trained as a mage in her youth and now uses her wealth to support a large number of mages in their studies. Among her library is the book we seek. We shall break into her manor and search from there.”</i>"
            {STORYTXT_BACKGROUND book.webp}
        [/part]
    [/story]

    {DID_TRACK {JOURNEY_07_NEW}}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton
        {GOLD 180 150 120}
        team_name=intruders
        user_team_name= _ "Intruders"
        {FLAG_VARIANT undead}
        color=darkblue

        village_gold=2
        village_support=1

        # wmllint: recognize Malin Keshar
        {CHARACTER_STATS_MALIN_KESHAR}

        fog=yes
        facing=sw
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        recruit=Swordsman,Pikeman,Longbowman,Cavalryman,Dragoon,Mage,Heavy Infantryman,Shock Trooper
        gold=0
        team_name=defenders
        user_team_name= _ "Defenders"
        {FLAG_VARIANT loyalist}
        color=gold

        village_gold=0
        income=-2

        type=General
        id=Taylor
        name= _ "Taylor"
        canrecruit=yes

        fog=yes
        share_vision=none
        facing=se

        # Place city guards

        {NAMED_LOYAL_UNIT 2 Bowman 2 17  (Guard1) ( _ "Night Watchman")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Spearman 4 17  (Guard2) ( _ "Night Watchman")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Spearman 4 18 (Guard3) ( _ "Night Watchman")} {GUARDIAN}

        {NAMED_LOYAL_UNIT 2 Spearman 11 3 (Guard4) ( _ "Night Watchman")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Bowman 11 4 (Guard5) ( _ "Night Watchman")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Spearman 13 4 (Guard6) ( _ "Night Watchman")} {GUARDIAN}

        {NAMED_LOYAL_UNIT 2 Pikeman  18 18 () ( _ "Gate Guard")}     {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Swordsman  16 20 () ( _ "Gate Guard")}     {GUARDIAN}

        {NAMED_LOYAL_UNIT 2 (Heavy Infantryman) 20 22 () ( _ "Gate Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Heavy Infantryman) 24 20 () ( _ "Gate Guard")} {GUARDIAN}

        {NAMED_LOYAL_UNIT 2 (Heavy Infantryman) 3 12 () ( _ "City Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Shock Trooper) 5 15 () ( _ "City Guard")} {GUARDIAN}

        # More guards, depending on the difficulty
#ifdef EASY
        {NAMED_LOYAL_UNIT 2 Mage      7  9 () ( _ "Mage Guard")}  {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Mage      8  7 () ( _ "Mage Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 Sergeant 6 13 () ( _ "Head Trainer")}   {GUARDIAN}
#endif

#ifdef NORMAL
        {NAMED_LOYAL_UNIT 2 Mage      7  9 () ( _ "Mage Guard")}  {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Red Mage)   8  7  () ( _ "Mage Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Heavy Infantryman)   12 16  () ( _ "City Guard")}     {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Lieutenant) 6 13 () ( _ "Head Trainer")}   {GUARDIAN}
#endif

#ifdef HARD
        {NAMED_LOYAL_UNIT 2 (White Mage)      7  9 () ( _ "Mage Guard")}  {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Red Mage)    8   7 () ( _ "Mage Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Shock Trooper)     12 16 () ( _ "City Guard")} {GUARDIAN}
        {NAMED_LOYAL_UNIT 2 (Lieutenant)  6 13 () ( _ "Head Trainer")}   {GUARDIAN}
#endif

        [ai]
            passive_leader=yes
            aggression=1.0
            caution=0.4
            grouping=offensive

            [goal]
                name=protect_location
                [criteria]
                    # Manor entrance
                    x,y=7,8
                [/criteria]
                protect_radius=5
                value=4
            [/goal]

            [goal]
                name=protect_location
                [criteria]
                    # Rest of city
                    x=3-22
                    y=6-22
                [/criteria]
                protect_radius=1
                value=2
            [/goal]

            [goal]
                name=protect_unit
                [criteria]
                    side=2
                    canrecruit=yes
                [/criteria]
                value=2
            [/goal]
        [/ai]
    [/side]

    [side]
        side=3
        controller=ai
        no_leader=yes
        hidden=yes
        team_name=monsters
        color=orange
        [ai]
            aggression=1.0
            caution=0.0
        [/ai]
    [/side]

    {STARTING_VILLAGES 1 3}
    {STARTING_VILLAGES 2 15}

    {PLACE_IMAGE scenery/whirlpool.png 38 23}

    # City
    {PLACE_IMAGE scenery/well.png 16 12}
    {PLACE_IMAGE scenery/well.png 19 14}
    {PLACE_IMAGE scenery/tent-shop-weapons.png 3 17}
    {PLACE_IMAGE scenery/monolith1.png 11 5}
    {PLACE_IMAGE scenery/monolith1.png 13 6}
    {PLACE_IMAGE scenery/monolith1.png 10 6}
    {PLACE_IMAGE scenery/signpost.png 15 16}
    {PLACE_IMAGE scenery/signpost.png 11 12}
    {PLACE_IMAGE scenery/temple1.png 10 18}
    {PLACE_IMAGE scenery/tent-fancy-red.png 9 15}
    {PLACE_IMAGE items/dragonstatue.png 12 14}

    {PLACE_IMAGE "items/dummy.png~RC(magenta>green)" 7 12}
    {PLACE_IMAGE "items/dummy.png~RC(magenta>green)" 4 11}
    {PLACE_IMAGE items/armor.png 4 12}
    {PLACE_IMAGE items/armor.png 3 16}
    {PLACE_IMAGE items/armor.png 6 16}
    {PLACE_IMAGE items/flower2.png 13 7}
    {PLACE_IMAGE items/flower1.png 16 8}
    {PLACE_IMAGE items/flower3.png 12 7}
    {PLACE_IMAGE items/flower4.png 17 8}

    # Manor
    {PLACE_IMAGE scenery/trapdoor-closed.png 3 6}
    {PLACE_IMAGE items/cloak-green.png 2 6}
    {PLACE_IMAGE items/ornate1.png 5 5}
    {PLACE_IMAGE items/potion-blue.png 4 5}
    {PLACE_IMAGE items/potion-red.png 6 5}
    {PLACE_IMAGE items/altar.png 3 7}

#define WATCHMAN_PATROL_MOVEMENT
    [set_variable]
        name=turn_mod
        value=$($turn_number % 5)
    [/set_variable]

    [switch]
        variable=turn_mod
        [case]
            value=1,0
            [move_unit]
                id=Guard3
                side=2
                to_x,to_y=5,22
            [/move_unit]
            [move_unit]
                id=Guard2
                side=2
                to_x,to_y=4,21
            [/move_unit]
            [move_unit]
                id=Guard1
                side=2
                to_x,to_y=4,20
            [/move_unit]

            [move_unit]
                id=Guard6
                side=2
                to_x,to_y=18,7
            [/move_unit]
            [move_unit]
                id=Guard5
                side=2
                to_x,to_y=16,6
            [/move_unit]
            [move_unit]
                id=Guard4
                side=2
                to_x,to_y=14,5
            [/move_unit]
        [/case]
        [case]
            value=2,4
            [move_unit]
                id=Guard3
                side=2
                to_x,to_y=10,24
            [/move_unit]
            [move_unit]
                id=Guard2
                side=2
                to_x,to_y=10,23
            [/move_unit]
            [move_unit]
                id=Guard1
                side=2
                to_x,to_y=9,24
            [/move_unit]

            [move_unit]
                id=Guard6
                side=2
                to_x,to_y=22,11
            [/move_unit]
            [move_unit]
                id=Guard5
                side=2
                to_x,to_y=21,11
            [/move_unit]
            [move_unit]
                id=Guard4
                side=2
                to_x,to_y=20,9
            [/move_unit]
        [/case]
        [case]
            value=3
            [move_unit]
                id=Guard3
                side=2
                to_x,to_y=14,22
            [/move_unit]
            [move_unit]
                id=Guard2
                side=2
                to_x,to_y=13,23
            [/move_unit]
            [move_unit]
                id=Guard1
                side=2
                to_x,to_y=12,22
            [/move_unit]

            [move_unit]
                id=Guard6
                side=2
                to_x,to_y=20,16
            [/move_unit]
            [move_unit]
                id=Guard5
                side=2
                to_x,to_y=21,16
            [/move_unit]
            [move_unit]
                id=Guard4
                side=2
                to_x,to_y=21,15
            [/move_unit]
        [/case]
    [/switch]

    {CLEAR_VARIABLE turn_mod}
#enddef

    [event]
        name=prestart

        {CLEAR_CORPSE_HORDE}

        [label]
            x,y=9,15
            text= _ "Stables"
        [/label]

        [label]
            x,y=10,18
            text= _ "Temple"
        [/label]

        {COLOR_ADJUST -16 -16 -16}

        [objectives]
            side=1
            [objective]
                condition=win
                description= _ "Move Malin and Darken Volk into the Mage Lady’s manor"
            [/objective]
            [objective]
                {ALTERNATIVE_OBJECTIVE_CAPTION}
                condition=win
                description= _ "Defeat General Taylor"
            [/objective]
            [objective]
                condition=lose
                description= _ "Death of Malin Keshar"
            [/objective]
            [objective]
                condition=lose
                description= _ "Death of Darken Volk"
            [/objective]

            {TURNS_RUN_OUT}

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

            [note]
                description= _ "Enemy units have reduced vision. An enemy unit will see you if two hexes separate you from them."
            [/note]
        [/objectives]

        # Place Darken Volk
        {VARIABLE darken_volk_store.x recall}
        {VARIABLE darken_volk_store.y recall}

        [unstore_unit]
            variable=darken_volk_store
        [/unstore_unit]

        {CLEAR_VARIABLE darken_volk_store}

        [recall]
            id=Darken Volk
            x,y=36,15
        [/recall]

        {MODIFY_UNIT (side=1) facing nw}

        [modify_unit]
            [filter]
                side=2
            [/filter]
            vision=2
        [/modify_unit]

        {VARIABLE guard_alerted 0}
    [/event]

    # Malin doesn't talk in this scenario because he's depressed :(
    [event]
        name=start

        [message]
            speaker=Darken Volk
            message= _ "The stolen book lies within Lady Karae’s manor at the north end of the city. It will be difficult for us to defeat the entire city guard, so we must stay hidden as long as possible. For now, we can make use of this fog. I shall use it to cast a spell to obscure the town guards’ vision."
        [/message]

        [delay]
            time=450
        [/delay]
        [animate_unit]
            [filter]
                id=Darken Volk
            [/filter]
            [primary_attack]
                range=ranged
            [/primary_attack]
            flag=attack
        [/animate_unit]
        [delay]
            time=350
        [/delay]

        [message]
            speaker=Darken Volk
            message= _ "This spell will not hide us completely. If we stray too close to the guards, they will still be able to see us. Once we are spotted, we shall have to make a run for it. The faster we enter the manor, the more time we shall have to search for the book before the guards can pursue us."
        [/message]

        [message]
            speaker=narrator
            message= _ "Note: Only the units you recruit now will be available to you once inside."
            image=wesnoth-icon.png
        [/message]
    [/event]

    [event]
        name=sighted
        [filter]
            side=2
        [/filter]
        [filter_second]
            side=1
        [/filter_second]

        [message]
            speaker=unit
            message= _ "This blasted fog is so thick! I can’t see a thing!"
        [/message]

        [message]
            speaker=Taylor
            message= _ "Stay alert, soldier. Report anything unusual immediately."
        [/message]
    [/event]

    [event]
        name=sighted
        [filter]
            side=1
        [/filter]
        [filter_second]
            side=2
        [/filter_second]

        [if]
            [variable]
                name=second_unit.id
                not_equals=Taylor
            [/variable]
            [then]
                [message]
                    speaker=second_unit
                    message= _ "Undead are emerging from the forest!"
                [/message]
            [/then]
        [/if]
        [message]
            speaker=Taylor
            message= _ "Wake the guard! To arms!"
        [/message]

        [modify_side]
            side=2
            {GOLD 140 170 200}
            {INCOME 12 16 20}
        [/modify_side]

        {VARIABLE guard_alerted 1}
    [/event]

    [event]
        name=side 2 turn refresh
        first_time_only=no
        [filter_condition]
            [variable]
                name=guard_alerted
                numerical_equals=0
            [/variable]
        [/filter_condition]

        {MODIFY_UNIT (side=2) moves 0}
        {WATCHMAN_PATROL_MOVEMENT}
    [/event]

    [event]
        name=moveto
        [filter]
            x,y=38,23
            side=1
        [/filter]

        [sound]
            name=water-blast.wav
        [/sound]

        [unit]
            x,y=38,23
            type=Tentacle of the Deep
            id=Tentacly
            name= _ "Tentacly"
            side=3
            max_hitpoints=66
            level=2
            animate=yes
        [/unit]

        [message]
            speaker=Darken Volk
            message= _ "I have heard rumors that the mages of Tath have been experimenting on the wildlife..."
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Tentacly
        [/filter]
        [filter_second]
            type=Soulless
            variation=swimmer
        [/filter_second]

        [sound]
            name=squishy-hit.wav
        [/sound]

        [object]
            id=sushi_mini_buff
            take_only_once=yes
            silent=yes
            duration=forever
            [filter]
                type=Soulless
                variation=swimmer
            [/filter]
            [effect]
                apply_to=hitpoints
                increase_total=7
                increase=7
                heal_full=no
            [/effect]
            [effect]
                apply_to=movement
                increase=2
            [/effect]
        [/object]
    [/event]

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

        [message]
            speaker=Darken Volk
            message= _ "Oh? The temple healers are trying to heal a man who is already dead. Perhaps you could... give them a little demonstration as to how it is actually done."
        [/message]

        [animate_unit]
            [filter]
                id=Malin Keshar
            [/filter]
            [primary_attack]
                range=ranged
            [/primary_attack]
            flag=attack
        [/animate_unit]

        [unit]
            x,y=10,18
            type=Soulless
            id=Jaime
            name= _ "Fat Jaime the Drunk Sailor"
            side=1
            animate=yes
        [/unit]

        [object]
            silent=yes
            duration=forever
            [filter]
                id=Jaime
            [/filter]
            [effect]
                apply_to=hitpoints
                increase=23
                increase_total=23
            [/effect]
        [/object]
        [object]
            silent=yes
            duration=forever
            [filter]
                id=Jaime
            [/filter]
            [effect]
                apply_to=new_ability
                [abilities]
                    {ABILITY_DRUNK}
                [/abilities]
            [/effect]
        [/object]
    [/event]

    # a little difficult to get, because it requires you to kill a mounted unit on this scenario with plague and get it to the tent too
    [event]
        name=moveto
        [filter]
            x,y=9,15
            side=1
            type_adv_tree=Walking Corpse
            variation=mounted
        [/filter]

        [message]
            speaker=Darken Volk
            message= _ "It appears as if these stables contain some armaments that could be useful for an undead rider."
        [/message]

        [unit]
            x,y=9,15
            type=Chocobone
            side=1
            animate=yes
            overwrite=yes
        [/unit]
    [/event]

    # Undead unit kicks the holy water
    [event]
        name=moveto
        [filter]
            x,y=5,5
            race=undead
        [/filter]

        [message]
            speaker=unit
            # po: Ooouuuh is a cry of pain
            message= _ "Ooouuuh! It burns... burrrrnnns..."  # wmllint: no spellcheck
        [/message]

        [harm_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            amount=1
            kill=no
            animate=yes
        [/harm_unit]

        [floating_text]
            x,y=$x1,$y1
            color=255,0,0
            # wmllint: markcheck off
            text=-1
            # wmllint: markcheck on
        [/floating_text]

        [remove_item]
            x,y=5,5
        [/remove_item]

        [message]
            speaker=Darken Volk
            message= _ "Beware the urns. It appears that they contain holy water that these mages have brewed themselves. As you might guess from the name, it is quite effective against undead."
        [/message]
    [/event]

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

        [message]
            speaker=Taylor
            message= _ "The undead are too strong! Retreat and regroup!"
        [/message]

        [kill]
            side=2
        [/kill]
        [endlevel]
            result=victory
            linger_mode=no
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    # Victory Conditions
    [event]
        name=moveto
        first_time_only=no
        [filter]
            id=Malin Keshar,Darken Volk
            x=2-6
            y=5-7
        [/filter]
        [filter_condition]
            [have_unit]
                id=Malin Keshar
                x=2-6
                y=5-7
            [/have_unit]
            [have_unit]
                id=Darken Volk
                x=2-6
                y=5-7
            [/have_unit]
        [/filter_condition]

        [message]
            speaker=Darken Volk
            message= _ "Here is the entrance! Hurry!"
        [/message]

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

    [event]
        name=victory

        {SET_GOT_INSIDE_MANOR}

#ifdef EASY
        [set_variable]
            name=S7_turns
            value=$("23 - ($turn_number)")
        [/set_variable]
#endif
#ifdef NORMAL
        [set_variable]
            name=S7_turns
            value=$("20 - ($turn_number)")
        [/set_variable]
#endif
#ifdef HARD
        [set_variable]
            name=S7_turns
            value=$("18 - ($turn_number)")
        [/set_variable]
#endif

        {CLEAR_VARIABLE guard_alerted}
    [/event]

    {HERODEATH_MALIN}
    {HERODEATH_VOLK}

    [event]
        name=time over

        [message]
            speaker=Darken Volk
            message= _ "We have no hope of entering the manor now that dawn has broken and the entire city guard is alerted to our presence. Your incompetence is truly appalling."
        [/message]

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