#textdomain wesnoth-dm
[scenario]
    name=_ "This Valley Belongs to Me"
    id=02_This_Valley_Belongs_to_Me
    next_scenario=03_The_Road_to_Weldyn
    {MEMOIRS_MAP 02_This_Valley_Belongs_to_Me.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}
        profile="portraits/younger_delfador.png"
        # wmllint: recognize Delfador
        type=Journeyman Mage
        canrecruit=yes
        recruit=Mage,Spearman,Horseman
        team_name=goodies
    [/side]
    [event]
        name=prestart

        [unit]
            {METHOR}
            x,y=22,17
        [/unit]
    [/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]
        {FLAG_VARIANT ragged}
    [/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]
        [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! 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 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]
                    id=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]
            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]
