#textdomain wesnoth-low
#ifdef MULTIPLAYER
[multiplayer]
    random_start_time=no
#ifndef DEBUG_MODE
    allow_new_game=no
#endif

#ifdef HARD
    id=06_Acquaintance_in_Need_HARD
    next_scenario=07_Elves_Last_Stand_HARD
#endif
#ifdef EASY
    id=06_Acquaintance_in_Need_EASY
    next_scenario=07_Elves_Last_Stand_EASY
#endif
#ifdef NORMAL
    id=06_Acquaintance_in_Need_NORMAL
    next_scenario=07_Elves_Last_Stand_NORMAL
#endif

#else
    [scenario]
        id=06_Acquaintance_in_Need
        next_scenario=07_Elves_Last_Stand
#endif

        experience_modifier=100
        name= _ "Acquaintance in Need"
        {LOW_MAP 06_Acquaintance_in_Need.map}
        {TURNS 35 30 25}

        {DEFAULT_SCHEDULE}

        {INTRO_AND_SCENARIO_MUSIC frantic.ogg wanderer.ogg}
        {EXTRA_SCENARIO_MUSIC knalgan_theme.ogg}
        {EXTRA_SCENARIO_MUSIC legends_of_the_north.ogg}
        {EXTRA_SCENARIO_MUSIC northerners.ogg}

        #        {LOW_PRESTART}

        [story]
            [part]
                show_title=yes
                story= _ "To evade the saurians blocking the eastern approaches to Wesmere, Kalenz and his war-band moved to enter Wesmere Forest from a different direction..."
                delay=4000
                {TO_ACQUAINTANCE_IN_NEED}
            [/part]
        [/story]

#define PLAYER_GOLD
    {GOLD 350 300 250}
#enddef
#define MULTIPLAYER_GOLD
    {GOLD 115 100 85}
#enddef

        #### Kalenz's code ####
        [side]
            {KALENZ}
            extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
            fog=no
            # wmllint: recognize Kalenz
#ifndef MULTIPLAYER
            {PLAYER_GOLD}
            [unit]
                {LANDAR}
                extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
                #placement=leader
                x=22
                y=39
                # wmllint: recognize Landar
            [/unit]
            [unit]
                {CLEODIL}
                extra_recruit=Elvish Shaman, Elvish Scout, Wose
                x=14
                y=39
                #placement=leader
                # wmllint: recognize Cleodil
            [/unit]
#else
            {MULTIPLAYER_GOLD}
#endif
        [/side]
        [event]
            name=prestart
            {RECALL_LOYALS}
        [/event]
        #### /Kalenz's code ####

        #### Olurf's code ####
        [side]
            {OLURF}
            # wmllint: recognize Olurf
            side=2
            allow_player=no
            controller=ai
            save_id=Olurf
            persistent=yes
            canrecruit=yes
            {GOLD 120 160 200}
            {INCOME 4 8 12}
            team_name=player
            user_team_name= _ "Player"
            {FLAG_VARIANT knalgan}
            extra_recruit=Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Scout, Dwarvish Guardsman
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "fighter,fighter,mixed fighter"}
            [/ai]
        [/side]
        #### /Olurf's code ####

        [side]
            side=3

            allow_player=no
            controller=ai
            type=Orcish Warlord
            id=Urug-Tar
            name=_ "Urug-Tar"
            canrecruit=yes
            {GOLD 150 230 270}
            {INCOME 4 8 12}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORC_SETUP}
#ifdef EASY
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight
#endif
#ifdef NORMAL
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer
#endif
#ifdef HARD
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior
#endif
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "fighter, archer, scout, fighter, fighter, archer, mixed fighter"}
                {AI_SIMPLE_ALWAYS_ASPECT grouping offensive}
                {AI_SIMPLE_ALWAYS_ASPECT aggression 0.75}
            [/ai]
        [/side]

        [side]
            side=4
            allow_player=no
            controller=ai
            type=Orcish Warlord
            id=Graur-Tan
            name=_ "Graur-Tan"
            canrecruit=yes
            {GOLD 150 270 300}
            {INCOME 4 8 12}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORC_SETUP}
#ifdef EASY
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager
#endif
#ifdef NORMAL
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Orcish Slayer
#endif
#ifdef HARD
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Orcish Slayer, Orcish Warrior
#endif
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,fighter,fighter,archer,mixed fighter"}
            [/ai]
        [/side]

        [side]
            side=5
            allow_player=no
            controller=ai
            type=Troll Warrior
            id=Traur
            name=_ "Traur"
            canrecruit=yes
#ifdef EASY
            recruit=Troll Whelp
#endif
#ifdef NORMAL
            recruit=Troll Whelp, Troll
#endif
#ifdef HARD
            recruit=Troll Whelp, Troll, Troll Warrior
#endif
            {INCOME 4 8 12}
            {GOLD 152 175 210}
            team_name=orcs
            user_team_name= _ "Enemies"
            {TROLL_SETUP}
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "fighter"}
            [/ai]
        [/side]

#ifdef MULTIPLAYER
        [side]
            side=6
            fog=no
            shroud=no
            {MULTIPLAYER_GOLD}
            recruit=Elvish Fighter, Elvish Archer, Elvish Scout
            {LANDAR}
            # wmllint: recognize Landar
        [/side]
        [side]
            side=7
            fog=no
            shroud=no
            {MULTIPLAYER_GOLD}
            recruit=Elvish Shaman, Wose, Elvish Scout
            {CLEODIL}
            # wmllint: recognize Landar
        [/side]
#endif

        [event]
            name=prestart
            {RECALL_LOYALS}
        [/event]

        [event]
            name=prestart

            [objectives]
                side=0
                [objective]
                    description= _ "Defeat enemy leaders"
                    condition=win
                [/objective]
                [objective]
                    description= _ "Death of Kalenz"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Landar"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Olurf"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Cleodil"
                    condition=lose
                [/objective]

                {TURNS_RUN_OUT}

                [gold_carryover]
                    bonus=yes
                    carryover_percentage=80
                [/gold_carryover]
                #TODO add to note#note= _ "Try to save leveled dwarf units"
            [/objectives]
        [/event]

        [event]
            name=start

            [message]
                id=Kalenz
                message= _ "What’s this? It appears the orcs have surrounded a dwarvish enclave. And by the sound of the bellowing I hear, I think our old friend, Olurf, is here."
            [/message]
            [message]
                id=Olurf
                message= _ "You again? Maybe ye were not completely wrong when ye predicted the orcs would attack us. We ha’ been forced from our home and are now surrounded."
            [/message]
            [message]
                id=Cleodil
                message= _ "Let us give them aid — it’s clear they need it!"
            [/message]
            [message]
                id=Landar
                message= _ "Help them? They would not even let us pass through their land to avoid the trolls. You remember, Kalenz?"
            [/message]
            [message]
                id=Kalenz
                message= _ "Our enemy is the orcs, not the dwarves. Besides, the orcs are in our way. Olurf, we cannot let you have all the fun here!"
            [/message]
            [message]
                id=Olurf
                message= _ "For an elf, you think like a dwarf! I think I like you! " + {WHISPER _"whisper^—For an elf..."}
            [/message]

            {AI_CONTROLLER_ALLOW_LEADER_CONTROL 1 2}
        [/event]

        [event]
            name=victory
            [message]
                id=Olurf
                message= _ "The orcs ha’ been defeated. My lord, we are in your debt."
            [/message]
            [message]
                id=Kalenz
                message= _ "We must put aside our differences and ally against the orcish menace. Olurf, join us!"
            [/message]
            [message]
                id=Olurf
                message= _ "Dwarves, ally with elves? I owe ye a debt, but my kin willna’ be happy at the thought."
            [/message]
            [message]
                id=Kalenz
                message= _ "There will be a big fight with the orcs in Wesmere very soon. If you can cover our flank to the north, I will pay you 400 gold."
            [/message]
            [message]
                id=Olurf
                message= _ "A proper contract for good money? That’s a different matter; I’m sure I can find some o’ my people willing to fight on those terms!"
            [/message]
            [message]
                id=Landar
                message= _ "What? Kalenz, are you out of your mind? Surely you will not throw away 400 gold on this scheming mercenary!"
            [/message]
            [message]
                id=Olurf
                message= _ "Where there’s a contract, our honor is involved. We will be there to cover your northern flank or else I will return your gold!"
            [/message]
            [message]
                id=Cleodil
                message=_ "I sense no falsity behind his speech, my lord."
            [/message]
            [message]
                id=Kalenz
                message= _ "I, too, believe him. Dwarves may be... rough... by our standards, but they are not liars. I think he knows that if he does not honor his contract, next time we will not be there to come to his aid."
            [/message]

#ifdef MULTIPLAYER
            [gold]
                side=1
                amount=-200
            [/gold]
            [gold]
                side=6
                amount=-200
            [/gold]
#else
            [gold]
                side=1
                amount=-400
            [/gold]
#endif
            [sound]
                name=gold.ogg
            [/sound]
        [/event]

        {campaigns/Legend_of_Wesmere/utils/deaths.cfg}

#ifndef MULTIPLAYER
    [/scenario]
#else
[/multiplayer]
#endif

#undef PLAYER_GOLD
#undef MULTIPLAYER_GOLD
