#textdomain wesnoth-thot

[scenario]
    id=03_Strange_Allies
    name= _ "Strange Allies"
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/03_Strange_Allies.map}"
    {TURNS 30 28 24}
    next_scenario=04_Troll_Bridge
    victory_when_enemies_defeated=yes

    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC       the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}

    [story]
        [part]
            {THOT_BIGMAP}
            music=loyalists.ogg
            # po: 'march' is *not* a typo for 'marsh' here. In archaic English, 'march' means 'border'.
            # po: The same word, as '-mark', is in the name of 'the Estmarks': the hills of the eastern border.
            story= _ "Angarthing and Aiglondur and the dwarvish troop traveled swiftly to the east through the settled lands of the Northern Alliance. Soon enough they came to the wilder march country, where raids by large bands of hostile orcs and men were all too common."
        [/part]
    [/story]

    {THOT_TRACK {JOURNEY_STAGE3}}

    # Player controls Aiglondur's troops with Marth Tak's as allies;
    # the stinger is that if Marth Tak dies, you lose. The opponent,
    # Gothras, leads a large force of chaotic humans.  This should be
    # a medium-sized but serious fight.  The only terrain feature
    # fixed by storyline is a west-to-east road; player’s troops
    # should start near its west end, enemy near the east.

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit="Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 100 80 60}
        team_name=northern_alliance
        user_team_name= _ "Alliance"
        {FLAG_VARIANT knalgan}

        # wmllint: recognize Aiglondur
        {CHARACTER_STATS_AIGLONDUR}

        facing=se
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Orcish Assassin
        {GOLD 240 200 160}
        team_name=northern_alliance
        user_team_name= _ "Alliance"
        {FLAG_VARIANT knalgan}

        type=Orcish Warrior
        id=Marth-Tak
        name= _ "Marth-Tak"
        profile=portraits/orcs/grunt-2.png
        canrecruit=yes

        facing=ne

        [ai]
            # Make our allies stupidly aggressive;
            # keeping Marth-Tak alive anyway is part of the tactical problem.
            {NO_SCOUTS}
            passive_leader=no
            village_value=0.3
            aggression=0.8
            leader_value=3.0
            caution=0.3
            grouping=offensive
            {ATTACK_DEPTH 3 4 5}
        [/ai]
    [/side]

    [side]
        side=3
        controller=ai
#ifdef EASY
        recruit=Footpad, Thug, Poacher
#endif
#ifdef NORMAL
        recruit=Footpad, Thug, Outlaw, Poacher
#endif
#ifdef HARD
        recruit=Footpad, Thug, Outlaw, Bandit, Poacher, Trapper
#endif
        {GOLD 280 300 340}  # BALANCE
        team_name=bandits
        user_team_name= _ "Bandits"
        {FLAG_VARIANT6 ragged}
        {INCOME 5 7 9}

        type=Outlaw
        id=Gothras
        name= _ "Gothras"
        canrecruit=yes
        [modifications]
            {TRAIT_STRONG}
            {TRAIT_INTELLIGENT}
        [/modifications]

        facing=sw

        [ai]
            passive_leader=yes
#ifdef EASY
            recruitment_pattern=scout,fighter,fighter,archer
#else
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
#endif
            {ATTACK_DEPTH 3 4 5}
#ifdef HARD
            [goal]
                name=target
                value=100
                [criteria]
                    id=Marth-Tak
                [/criteria]
            [/goal]
#endif
        [/ai]
    [/side]

    {STARTING_VILLAGES 1 3}
    {STARTING_VILLAGES 2 9} # Give Marth-Tak all villages south of the rivers.

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Help Marth-Tak defeat Gothras"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Aiglondur"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Angarthing"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Marth-Tak"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]

        [recall]
            id=Angarthing
            x,y=5,12
        [/recall]

        {MODIFY_UNIT (side=1) facing se}
    [/event]

    [event]
        name=start

        [message]
            speaker=Marth-Tak
            message= _ "In the name of the Alliance, quit these lands now!"
        [/message]

        [message]
            speaker=Gothras
            message= _ "We will fare where we will and take what we will, dog of an orc. To the Dark Gods with you and your precious ‘Alliance’."
        [/message]

        [message]
            speaker=Angarthing
            message= _ "Now that is a sight still strange to my eyes — an orc fighting for the Northern Alliance."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "I’m surprised myself that so many of the orcish tribes came over to the Alliance. Not so strange to see humans raiding us, worse luck."
        [/message]

        {MODIFY_UNIT (id=Marth-Tak) facing nw}

        [message]
            speaker=Marth-Tak
            message= _ "You, on the road! Are you of the Northern Alliance or not?"
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "We are."
        [/message]

        [message]
            speaker=Marth-Tak
            message= _ "Well, then, honor the treaty as I have."
        [/message]

        [message]
            speaker=Angarthing
            message= _ "That is our duty."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "For the Alliance! Axes up!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Marth-Tak
        [/filter]

        [message]
            speaker=Angarthing
            message= _ "We have failed our duty to the Alliance."
        [/message]

        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=die
        [filter]
            id=Gothras
        [/filter]

        [message]
            speaker=Marth-Tak
            message= _ "My thanks, dwarves. These bandits might have hacked a bloody swathe through the Alliance’s tribes if we had not killed them here."
        [/message]

        [message]
            speaker=Aiglondur
            message= _ "My thanks to you, for proving there are orcs I can fight alongside rather than against. But we cannot linger here to celebrate; we are journeying east."
        [/message]

        [message]
            speaker=Marth-Tak
            message= _ "East, eh? You won’t find many friends in that direction. Travel safely."
        [/message]

        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    {HERODEATH_AIGLONDUR}
    {HERODEATH_ANGARTHING}
[/scenario]
