#textdomain wesnoth-dm
[scenario]
    name=_ "This Valley Belongs to Me"
    id=02_this_valley_belongs_to_me
    next_scenario=03_road_to_weldyn
    {MEMOIRS_MAP home.map}
    turns=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}

    [side]
        {YOUNG_DELFADOR}
        # wmllint: recognize Delfador
        type=Journeyman Mage
        canrecruit=yes
        recruit=Mage,Spearman,Horseman
        team_name=goodies
    [/side]
    [event]
        name=prestart
        {RECALL_OR_CREATE_UNIT ({METHOR}
        x,y=22,17) Methor}
    [/event]
    {STARTING_VILLAGES 1 12}

    [side]
        type=Goblin Pillager
        id=Grogor-Tuk
        name= _ "Grogor-Tuk"
        side=2
        canrecruit=yes
        recruit=Wolf Rider,Orcish Grunt
        {GOLD 70 150 200}
        team_name=baddies
        [ai]
            recruitment_pattern=scout,scout,fighter
            village_value=2 # they want to pillage!
        [/ai]
    [/side]

    [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 capitol 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]
        [part]
            delay=4000
            show_title=yes
            {TO_THIS_VALLEY_BELONGS_TO_ME}
        [/part]
    [/story]

    #wmllint: recognize Methor
    [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]
        [set_variable]
            name=Methor
            value=1
        [/set_variable]
        [objectives]
            side=1
            [objective]
                description=_"Defeat Grogor-Tuk"
                condition=win
            [/objective]
            [objective]
                description=_"Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description=_"Time runs out"
                condition=lose
            [/objective]
            note={EARLY_FINISH_BONUS_NOTE}
        [/objectives]
    [/event]

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

    [event]
        name=last breath
        [filter]
            id=Methor
        [/filter]
        [message]
            id=Delfador
            message=_"No! Methor... Don't die!"
        [/message]
        [message]
            speaker=unit
            message=_"Heed my last words, Delfador! Journey northeast 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 northeast to Weldyn, and seek out my friend Leollyn. He will help you."
                [/message]
                [kill] # Methor off the recall list
                    id=Methor
                [/kill]
            [/then]
            [else]
                [message]
                    id=Delfador
                    message=_"I will grieve for master Methor... I must take his advice and seek out Leollyn."
                [/message]
            [/else]
        [/if]
        [message]
            id=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}
[/scenario]
