#textdomain wesnoth-dm
[scenario]
    name=_ "The Road to Weldyn"
    id=03_The_Road_to_Weldyn
    next_scenario=04_Leollyn
    {MEMOIRS_MAP 03_The_Road_to_Weldyn.map}
    turns=24
    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC wanderer.ogg} # No story text, so no intro music
    {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
    {EXTRA_SCENARIO_MUSIC the_dangerous_symphony.ogg}
    {EXTRA_SCENARIO_MUSIC knalgan_theme.ogg}

    {DM_TRACK {SEARCH_STAGE3}}

    [side]
        {YOUNG_DELFADOR}
        side=1
        save_id=Player
        persistent=yes
        controller=human
        recruit=Mage,Spearman,Horseman,Bowman
        team_name=allies
        user_team_name= _ "Mages"
        {FLAG_VARIANT long}
    [/side]

    [side]
        type=Orcish Warrior
        id=Urthaka-Tan
        name= _ "Urthaka-Tan"
        facing=se
        side=2
        canrecruit=yes
#ifdef HARD
        recruit=Orcish Grunt,Orcish Archer,Wolf Rider,Troll Whelp
#else
        recruit=Orcish Grunt,Troll Whelp,Wolf Rider
#endif
        {GOLD 150 200 250}
        {INCOME 0 2 2}
        team_name=enemies
        user_team_name= _ "Pillagers"
        # make them more aggressive at night
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.7
            caution=0.25
        [/ai]
        [ai]
            time_of_day=morning,afternoon
            aggression=0.0
            caution=0.50
        [/ai]
        {FLAG_VARIANT6 ragged}
    [/side]

    {MEMOIRS_DEATHS}

    {STARTING_VILLAGES 1 10}

    [label]
        x,y=9,4
        text=_"The Great Valley"
    [/label]
    [label]
        x,y=6,16
        text=_"Fort Brell"  # wmllint: no spellcheck
    [/label]
    [label]
        x,y=21,17
        text=_"Fort Miryen" # wmllint: no spellcheck
    [/label]

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description=_ "Defeat Urthaka-Tan"
                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]

    #############################
    # starting dialog
    #############################
    [event]
        name=start
        {MODIFY_UNIT (id=Delfador) facing sw}
        [message]
            speaker=narrator
            message=_"Delfador followed Methor’s advice, and headed over the hills towards Weldyn. But the roads were more dangerous than he had expected..."
            image=wesnoth-icon.png
        [/message]
        [move_unit_fake]
            side=1
            type=Bowman
            x=23,24,25,26,27,28,29,30,31
            y=22,21,21,20,21,21,21,21,22
        [/move_unit_fake]
        {NAMED_UNIT 1 Bowman 31 22 Derrin _"Derrin" (role=bowman_advisor)}
        {FACING ne}
        [move_unit_fake]
            side=1
            type=Horseman
            x=23,24,25,26,27,28,29,30,30
            y=22,21,21,20,21,21,21,21,22
        [/move_unit_fake]
        {NAMED_UNIT 1 Horseman 30 22 Feorth _"Feorth" ()}
        {FACING ne}
        [move_unit_fake]
            side=1
            type=Horseman
            x=29,29,29,30,30
            y=18,19,20,20,21
        [/move_unit_fake]
        {NAMED_UNIT 1 Horseman 30 21 Gar _"Gar" ()}
        {FACING ne}
        [message]
            speaker=Derrin
            message=_"Beware, stranger! I come to warn you — a party of orcs have moved into the Great Valley to the north, and have been raiding the lands around. If you press on westward, you will have to fight them."
        [/message]
        [message]
            speaker=Delfador
            message=_"I cannot turn back now... If I fight these orcs, will your villagers help me?"
        [/message]
        [message]
            speaker=Derrin
            message=_"You see me armed for war because we were mustering to aid our kin. We can help each other — and you’ll not be sorry to fight beside us, for this region trains the best bowmen in Wesnoth."
        [/message]
    [/event]

    #############################
    # bowmen carp at orcs
    #############################
    [event]
        name=attack
        [filter]
            type_adv_tree=Bowman
        [/filter]
        [message]
            speaker=unit
            message=_"Take this, you slimy invader!"
        [/message]
    [/event]

    #############################
    # warn player that orcs are more dangerous at night
    #############################
    [event]
        name=turn 4
        [role]
            role=bowman_advisor
            type=Master Bowman,Longbowman,Bowman
            search_recall_list=no
            reassign=no
        [/role]
        [message]
            role=bowman_advisor
            message=_"Beware! Night is falling — that’s when the orcs tend to attack!"
        [/message]
    [/event]

    #############################
    # closing dialog
    #############################
    [event]
        name=victory
        [role]
            role=bowman_advisor
            type=Master Bowman,Longbowman,Bowman
            search_recall_list=no
            reassign=no
            [else]
                [unit]
                    side=1
                    type=Bowman
                    role=bowman_advisor
                    placement=leader
                [/unit]
            [/else]
        [/role]
        [message]
            role=bowman_advisor
            message=_"Thank you, Delfador, for helping to rid our land of those pestilent orcs. Your magic was more help than we looked for, and we are in your debt."
        [/message]
        [message]
            speaker=Delfador
            message=_"You are welcome... But I am wondering what orcs were doing so deep inside the borders of Wesnoth."
        [/message]
        [message]
            role=bowman_advisor
            message=_"Perhaps some of our lads had better go with you as far as Weldyn. These lands are not safe for a lone traveler, and we may learn what drew the orcs so far south."
        [/message]
    [/event]
[/scenario]
