#textdomain wesnoth-thot
[scenario]
    name=_"Strange Allies"
    id="03_Strange_Allies"
    next_scenario="04_Troll Bridge"
    victory_when_enemies_defeated=yes
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/strange_allies.map}"
    {DEFAULT_SCHEDULE}
    {TURNS 30 28 24}	# BALANCE

    {INTRO_AND_SCENARIO_MUSIC "loyalists.ogg" "the_city_falls.ogg"}
    {EXTRA_SCENARIO_MUSIC "battle.ogg"}
    {EXTRA_SCENARIO_MUSIC "the_king_is_dead.ogg"}

    # 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.

    [side]
        type="Dwarvish Fighter"
        id="Aiglondur"
        name=_"Aiglondur"
        canrecruit="1"
        side="1"
        controller="human"
        team_name="northern_alliance"
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}
        fog="no"
        shroud="no"
        recruit="Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 100 80 60}	# BALANCE
    [/side]

    {STARTING_VILLAGES 1 3}

    [side]
        type="Orcish Warrior"
        id="Marth-Tak"
        name=_"Marth-Tak"
        profile=portraits/orcs/transparent/grunt-2.png
        canrecruit="1"
        side="2"
        team_name="northern_alliance"
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}
        fog="no"
        shroud="no"
        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Orcish Assassin
        [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]
        {GOLD 240 200 160}	# BALANCE
    [/side]

#ifdef HARD
#define HIGH_PRIORITY_TARGETS
    [target]
        id=Marth-Tak
        value=100
    [/target]
#enddef
#endif

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

    [side]
        side=3
        type=Outlaw
        id=Gothras
        # wmllint: directory spelling Gothras
        name= _ "Gothras"
        [modifications]
            {TRAIT_STRONG}
            {TRAIT_INTELLIGENT}
        [/modifications]
        {GOLD 280 300 340}	# BALANCE
        {INCOME 5 7 9}

        team_name=bandits
        user_team_name=_"Bandits"
        controller=ai

        canrecruit=yes
        [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
            {HIGH_PRIORITY_TARGETS}
#endif
            recruitment_ignore_bad_movement=yes
        [/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
    [/side]

    [story]
        [part]
            background=maps/wesnoth.png
            #po: "march" is *not* a typo for "marsh" here.
            #po: In archaic English, "march" means "border".
            #po: (The same word, as "-mark", is in the name of "the Estmarks":
            #po: 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]
        [part]
            show_title=yes
            {TO_STRANGE_ALLIES}
        [/part]
    [/story]

    {campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}

    [event]
        name="prestart"

        [unit]
            type=Dwarvish Witness
            id="Angarthing"
            name= _ "Angarthing"
            profile=portraits/angarthing.png
            side=1
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
            {IS_HERO}
            unrenamable=yes
            x,y=5,12
        [/unit]

        [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]
            [objective]
                description=_"Time runs out"
                condition="lose"
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/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]
        [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]

        [if]
            [have_unit]
                id="Marth-Tak"
            [/have_unit]
            [then]
                [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]
            [/then]
        [/if]

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