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

    id=06_Acquaintance_in_Need
    name= _ "Acquaintance in Need"
    {LOW_MAP 06_Acquaintance_in_Need.map}
    {TURNS 35 30 25}
    next_scenario=07_Elves_last_stand

    {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

    #### Kalenz's code ####
    #wmllint: validate-off
    [side]
        {KALENZ}
        {PLAYER_GOLD}
        fog=no
        # wmllint: recognize Kalenz
        recruit={ELVES}
#ifndef MULTIPLAYER
        [unit]
            {LANDAR}
            placement=leader
            # wmllint: recognize Landar
        [/unit]
#endif
        [unit]
            {CLEODIL}
            placement=leader
            # wmllint: recognize Cleodil
        [/unit]
    [/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}
        recruit={DWARVES}
        {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]
    #wmllint: validate-on
    #### /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"
        {FLAG_VARIANT undead}
#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"
        {FLAG_VARIANT undead}
#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"
        {FLAG_VARIANT undead}
        {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
    #wmllint: validate-off
    [side]
        side=6
        fog=no
        {PLAYER_GOLD}
        recruit={ELVES}
        {LANDAR}
        # 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]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
            note={EARLY_FINISH_BONUS_NOTE}
            #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=Kalenz
            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, remember?"
        [/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. (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=Kalenz
            message= _ "I believe him. Dwarves are...rough...by our standards, but 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
