#textdomain wesnoth-dm
[scenario]
    id=02_This_Valley_Belongs_to_Me
    name=_ "This Valley Belongs to Me"
    {MEMOIRS_MAP 02_This_Valley_Belongs_to_Me.map}
    next_scenario=03_The_Road_to_Weldyn
    {TURNS 26 25 24}
    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC traveling_minstrels.ogg knolls.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}

    {MEMOIRS_ITEM_WELL 24 19}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit=Mage,Spearman,Horseman
        save_id=Player
        team_name=allies
        user_team_name= _ "Mages"
        side_name= _ "Delfador"
        {FLAG_VARIANT long}
        [leader]
            {YOUNG_DELFADOR}
        [/leader]
        [unit]
            {METHOR}
            x,y=21,16
        [/unit]
        {GOLD 120 110 100}
    [/side]
    [event]
        name=prestart
        {MODIFY_UNIT (side=1) facing nw}
    [/event]
    {STARTING_VILLAGES 1 {ON_DIFFICULTY 16 14 12}}

    [side]
        side=2
        controller=ai
        recruit=Wolf Rider,Orcish Grunt
        {GOLD 120 160 200}
        team_name=enemies
        user_team_name= _ "Pillagers"
        {FLAG_VARIANT6 ragged}
        [leader]
            id=Grogor-Tuk
            name= _ "Grogor-Tuk"
            type=Goblin Pillager
            facing=se
        [/leader]
        [ai]
            recruitment_pattern=scout,scout,fighter
            village_value=2 # they want to pillage!
        [/ai]
    [/side]
    # wmllint: validate-on

    [story]
        [part]
            story = _ "Delfador’s wandering time with Methor took them to many strange places, both within and beyond the lands of men. They studied and practiced, applying magecraft to aid those they traveled among and to deepen their understanding of the hidden currents and powers of the world."
        [/part]
        [part]
            story = _ "But the elder mage’s health was taxed by the rigors of the journey. A year after the two left Alduin, Methor settled in a tranquil valley at the edge of the Dulatus Hills, not far southeast of the capital at Weldyn. He opened a small school of his own; and with Delfador assisting him, he began training a handful of youths who might in time be worthy to enter the great Academy on Alduin."
        [/part]
    [/story]
    {DM_TRACK {SEARCH_STAGE2}}

    [event]
        name=start
        [message]
            speaker=Methor
            message=_"Delfador, your time as my apprentice is now almost over. You are a fully-trained mage and may choose your own path in life. I hope, however, that you will take my advice and enroll yourself in the service of King Garard. I have many contacts at the court and—"
        [/message]
        [message]
            speaker=Grogor-Tuk
            message=_"Listen, humans! This valley belongs to me now. I require all your houses and your possessions! Hand them over quietly and I may permit you to live on as my slaves..."
        [/message]
        [message]
            speaker=Methor
            message=_"Arrogant creature! We have little enough, and we will not suffer you to take it from us by force."
        [/message]
        [message]
            speaker=Grogor-Tuk
            message=_"That’s where you are wrong, puny mage. War is coming, humans... War! Take their villages, and spare no-one!"
        [/message]
        [objectives]
            side=1
            [objective]
                description=_"Defeat Grogor-Tuk"
                condition=win
            [/objective]
            [objective]
                description=_"Death of Delfador"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=80
            [/gold_carryover]
        [/objectives]
    [/event]

    # make some pillaging noises
    [event]
        name=capture
        [filter]
            type=Wolf Rider
            side=2
        [/filter]
        [message]
            speaker=unit
            message=_"Grooar! Pillage! Pillage! Ahahaha..."   # wmllint: no spellcheck
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Methor
        [/filter]
        [message]
            speaker=Delfador
            message=_"No! Methor... Don’t die!"
        [/message]
        [message]
            speaker=unit
            message=_"Heed my last words, Delfador! Journey northwest to Weldyn, and seek out my friend Leollyn. He will help you."
        [/message]
    [/event]

    [event]
        name=victory
        [if]
            [have_unit]
                id=Methor
            [/have_unit]
            [then]
                [message]
                    speaker=Methor
                    message=_"Well done, Delfador! I see I have trained you well, and you are truly ready to seek your fortune. My traveling days are done, but it is time for you to journey northwest to Weldyn, and seek out my friend Leollyn. He will help you."
                [/message]
                [kill] # Methor off the recall list
                    id=Methor
                [/kill]
                {VARIABLE methor_alive yes}
            [/then]
            [else]
                [message]
                    speaker=Delfador
                    message=_"I will grieve for master Methor... I must take his advice and seek out Leollyn."
                [/message]
                {VARIABLE methor_alive no}
            [/else]
        [/if]
        [message]
            speaker=Delfador
            message=_"And it is no good news I will bring him. Orcs, so far south and so near the capital? This is a dire sign; things are gravely amiss in Wesnoth."
        [/message]
    [/event]

    {MEMOIRS_DEATHS}
    # wmllint: unwho METHOR
[/scenario]
