#textdomain wesnoth-tb
[scenario]
    id=1_Rooting_Out_A_Mage
    name=_ "Rooting Out A Mage"
    map_data="{campaigns/Two_Brothers/maps/1_Rooting_Out_A_Mage.map}"
    turns=18
    next_scenario=2_The_Chase

    [music]
        name=main_menu.ogg
        ms_before=500
    [/music]
    [music]
        name=underground.ogg
        ms_before=500
        append=yes
    [/music]
    [music]
        name=knolls.ogg
        ms_before=500
        append=yes
    [/music]
    [music]
        name=battle.ogg
        ms_before=500
        append=yes
    [/music]
    [music]
        name=vengeful.ogg
        ms_before=500
        append=yes
    [/music]
    [music]
        name=revelation.ogg
        ms_before=500
        append=yes
    [/music]
    {VICTORY_AND_DEFEAT_MUSIC}

    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}
    {AFTERNOON}

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Slay Mordak, the evil mage"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Arne"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
        [/objectives]
    [/event]

    [side]
#ifdef EASY
        gold=40
#endif
#ifdef HARD
        gold=25
#endif
        type=Knight
        description=Arne
        user_description= _ "Arne"
        unrenamable=yes
        profile=arne.png
        facing=sw
        side=1
        canrecruit=yes
        controller=human
        recruit=Horseman,Bowman,Spearman,Footpad
        [unit]
            description=Bjarn
            user_description= _ "Bjarn"
            unrenamable=yes
            type=Red Mage
            profile=bjarn.png
            side=1
            {IS_HERO}
            x=31
            y=21
        [/unit]

        #the armed villagers, beware them
        [unit]
            user_description= _ "Alwyn"
            type=Spearman
            side=1
            x=30
            y=22
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            user_description= _ "Brent"
            type=Spearman
            side=1
            x=30
            y=21
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            user_description= _ "Cadell"
            type=Spearman
            side=1
            x=31
            y=22
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            user_description= _ "Dannen"
            type=Bowman
            side=1
            x=32
            y=19
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            user_description= _ "Efran"
            type=Bowman
            side=1
            x=33
            y=19
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            user_description= _ "Fargus"
            type=Footpad
            side=1
            x=32
            y=18
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]

        #Arne's mercenary band
        [unit]
            description=Erik
            user_description= _ "Erik"
            type=Horseman
            side=1
            x=33
            y=21
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            description=Heine
            user_description= _ "Heine"
            type=Horseman
            side=1
            x=32
            y=21
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            description=Magnus
            user_description= _ "Magnus"
            type=Horseman
            side=1
            x=33
            y=20
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]

        team_name=good
    [/side]

    {STARTING_VILLAGES 1 12}

    [side]
#ifdef HARD
        gold=200
#else
        gold=120
#endif
        type=Dark Sorcerer
        description=Mordak
        user_description= _ "Mordak"
        side=2
        canrecruit=yes
#ifdef HARD
        recruit=Skeleton,Walking Corpse,Vampire Bat,Ghost,Dark Adept,Ghoul
#else
        recruit=Walking Corpse,Vampire Bat,Dark Adept,Ghoul
#endif
        [ai]
            recruitment_ignore_bad_movement=yes
            grouping=no
	    passive_leader=yes
        [/ai]
        team_name=evil
    [/side]

    {STARTING_VILLAGES 2 5}

    [event]
        name=start

        #{SCATTER_IMAGE (terrain=Gg,Gs^Fp) 24 scenery/oak-leaning.png}
        {PLACE_IMAGE scenery/oak-leaning.png 21 4}
        {PLACE_IMAGE scenery/oak-leaning.png 38 19}
        {PLACE_IMAGE scenery/oak-leaning.png 30 6}
        {PLACE_IMAGE scenery/oak-leaning.png 7 20}
        {PLACE_IMAGE scenery/oak-leaning.png 5 5}
        {PLACE_IMAGE scenery/oak-leaning.png 34 10}

        [message]
            speaker=narrator
            image="wesnoth-icon.png"
            message= _ "In a remote part of Wesnoth, people lived their lives working hard and caring for each other, but not knowing much about the world outside. But there came a day when their peaceful world was shattered, as an evil mage came to the region, spreading havoc and despair."
        [/message]
        [message]
            speaker=narrator
            image="wesnoth-icon.png"
            message= _ "Bjarn, the local mage of the village, was the man who saw best how to deal with this threat. He asked the help of his brother Arne, leader of a mercenary band of horsemen, and outfitted several of the villagers with gear from the armory."
        [/message]
        [message]
            description=Arne
            message= _ "'ello there, Bjarn. So, what's the big fuss?"
        [/message]
        [message]
            description=Bjarn
            message= _ "Mordak, an evil mage, threatens our lives and livelihoods. He is terrorizing our countryside. I've already called the village to arms and now it's up to you to lead them. You'll find him about two days' ride north of here."
        [/message]
        [message]
            description=Arne
            message= _ "Very well. We will go there and slay this source of evil. Charge, men!"
        [/message]
        [message]
            description=Bjarn
            message= _ "I will attempt to sneak through the forest. If I can slay the evil one while he is off his guard, the battle will be over in one stroke!"
        [/message]
        [kill]
            description=Bjarn
        [/kill]
    [/event]

    [event]
        name=turn 6
        [message]
            description=Arne
            message= _ "Bjarn should have been in position by now. I wonder if anything's happened to him?"
        [/message]
    [/event]

    [event]
        name=turn 10
        [message]
            description=Arne
            message= _ "This is worrying. What's happened to Bjarn? I suppose we must slay the dark sorcerer ourselves."
        [/message]
    [/event]

    [event]
        name=die
        [role]
            type=Spearman,Bowman,Horseman
            role=Reporter
        [/role]
        [filter]
            description=Mordak
        [/filter]
        [message]
            speaker=unit
            message= _ "Argh!"
        [/message]
        [message]
            description=Arne
            message= _ "Good work, men. Now, where is Bjarn?"
        [/message]
        [message]
            speaker=unit
            message= _ "Worried about him, are you? E-he-he..hergh...gaargh..."
        [/message]
        [message]
            description=Arne
            message= _ "Nothing more to be had from him."
        [/message]
        [message]
            role=Reporter
            message= _ "Sir, he's been kidnapped! I just saw some men running off with him. They looked like friends of this one."
        [/message]
        [message]
            description=Arne
            message= _ "Damn! I suppose we have to go after him, then."
        [/message]
        [endlevel]
            result=victory
            bonus=yes
        [/endlevel]
    [/event]

    #you lose
    [event]
        name=time over
        [message]
            description=Mordak
            message= _ "Ha, so you thought to send a mage around and stab me in the back? Well, I have news for you. We've kidnapped him!"
        [/message]
        [message]
            description=Arne
            message= _ "What? Bjarn kidnapped? And the evil mage still ravages the land? Noooo!"
        [/message]
    [/event]

    #When you attack
    [event]
        name=attack
        [filter_second]
            side=2
            [not]
                type=Dark Adept,Dark Sorcerer,Vampire Bat
            [/not]
        [/filter_second]
        [message]
            description=Arne
            message= _ "I hear these creatures are near immune to our weapons, let us see!"
        [/message]
    [/event]

    #Arne saying some bravado
    [event]
        name=die
        [filter_second]
            description=Arne
        [/filter_second]
        [message]
            speaker=second_unit
            message= _ "That wasn't so hard!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            description=Arne
        [/filter]
        [message]
            description=Arne
            message= _ "All is lost now that I am dead..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
[/scenario]
