#textdomain wesnoth-sotbe
[scenario]
    id="Northern_Alliance"
    name= _ "Northern Alliance"
    map_data="{campaigns/Son_Of_The_Black_Eye/maps/Northern_Alliance.map}"

    turns=-1

    victory_when_enemies_defeated="yes"

    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC "battle.ogg"}
    {VICTORY_AND_DEFEAT_MUSIC}
    next_scenario=Epilogue

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                condition=win
                description=_ "Kill Shan Taum and Earl Lanbec'h"
            [/objective]
            [objective]
                condition=lose
                description=_ "Death of Kapou'e"
            [/objective]
            [objective]
                description= _ "Death of Grüü"
                condition=lose
            [/objective]

            [objective]
                description= _ "Death of Howgarth III"
                condition=lose
            [/objective]
        [/objectives]
    [/event]

    [side]
        type=Orcish Leader
        description="Kapou'e"
        user_description= _ "Kapou'e"
        side=1
        canrecruit=yes
        controller=human
        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer
        team_name=Kapoue
        {GOLD 800 650 500}
        {BLACK_FLAG}
    [/side]

    {STARTING_VILLAGES 1 6}

    [side]
        type=Orcish Warlord
        description="Al'Brock"
        user_description= _ "Al'Brock"
        side=2
        canrecruit=yes
        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer, Orcish Crossbowman, Orcish Warrior, Orcish Assassin
        team_name=Kapoue
        {INCOME 10 7 5}
        {GOLD 300 250 200}
    [/side]

    {STARTING_VILLAGES 2 5}

    [side]
        type=Orcish Warlord
        description="Flar'Tar"
        user_description= _ "Flar'Tar"
        side=3
        canrecruit=yes
        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer, Orcish Crossbowman, Orcish Warrior, Orcish Assassin
        team_name=Kapoue
        {INCOME 10 7 5}
        {GOLD 300 250 200}
    [/side]

    {STARTING_VILLAGES 3 5}

    [side]
        type=Grand Marshal
        description="Earl Lanbec'h"
        user_description= _ "Earl Lanbec'h"
        side=4
        canrecruit=yes
        recruit=Dragoon, Swordsman, Pikeman, Longbowman,Shock Trooper,Mage,Duelist,White Mage,Red Mage,Lancer,Knight,Spearman,Bowman,Cavalryman,Horseman
        team_name=villians
        {GOLD 800 900 1000}
        {INCOME 10 15 20}
        recruitment_pattern=scout,scout,fighter,archer,fighter,archer,mixed fighter,mixed fighter,healer
        leader_value=50.0
    [/side]

    {STARTING_VILLAGES 4 6}

    [side]
        type=Orcish Warlord
        description=Shan Taum
        user_description= _ "Shan Taum"
        side=5
        canrecruit=yes
        recruit= Wolf Rider, Goblin Knight, Orcish Grunt, Ogre, Orcish Archer, Orcish Crossbowman, Orcish Warrior, Orcish Assassin, Orcish Slayer
        team_name=villians
        {INCOME 15 11 7}
        {GOLD 400 350 300}
    [/side]

    {STARTING_VILLAGES 5 9}

    [side]
        type=General
        description=Howgarth III
        user_description= _ "Howgarth III"
        side=6
        canrecruit=yes
        recruit= Gryphon Rider, Gryphon Master, Spearman, Swordsman, Javelineer, Pikeman, Dwarvish Steelclad, Dwarvish Fighter, Darvish Thunderer, Dwarvish Thunderguard, Bowman, Longbowman, Mage, White Mage, Red Mage, Fencer, Duelist, Heavy Infantryman, Shock Trooper
        team_name=Kapoue
        {INCOME 15 11 7}
        {GOLD 400 350 300}
    [/side]

    {STARTING_VILLAGES 6 11}

    [story]
        [part]
            story= _ "Kapou'e agreed to meet Howgarth III. Not trusting the human however, Kapou'e brought along Grüü, as well as one of his most trusted solders. Earl Lanbec'h flatly refused to attend the parley."
            background=sotbe.png
        [/part]

        [part]
            story= _ "The human attack having stopped for the time being, both parties met in the middle of the battlefield. Howgarth III demanded that Kapou'e give Dorset back to the humans and return to their lands as defined in the treaty. Kapou'e refused to do so as long as the humans were attacking orcish lands. He demanded that the humans disperse their forces and return any land they had stolen from the orcs. Only then would he return Dorset and disperse the Horde."
            background=sotbe.png
        [/part]

        [part]
            story= _ "Howgarth III agreed and further added that, if Earl Lanbec'h continued in aggression, then under the dictates of the Northern Alliance, he himself would be forced to move against the Earl."
            background=sotbe.png
        [/part]

        [part]
            story= _ "That having being settled, Kapou'e began to inquire about the death of his father. Howgarth III repeated his story, that the last thing they heard from Black-Eye Kauran was the message declining their invitation to join the Northern Alliance, brought by none other then Shan Taum himself."
            background=sotbe.png
        [/part]

        [part]
            story= _ "As they were discussing the matter, a group of orcs charged from the surrounding trees and hills and surrounded the parley."
            background=sotbe.png
        [/part]
    [/story]

    [event]
        name=start

        {RECALL Grüü}
        {RECALL Inarix}
        # wmllint: recognize Grüü
        # wmllint: recognize Inarix

        {HUMAN_GUARD 19 25}
        {HUMAN_GUARD 13 25}
        {HUMAN_GUARD 15 25}
        {HUMAN_GUARD 17 25}
        {HUMAN_GUARD 21 25}
        {HUMAN_GUARD 23 25}

        {ORC_GUARD 16 12}
        {ORC_GUARD 15 13}
        {ORC_GUARD 1 13}
        {ORC_GUARD 3 13}
        {ORC_GUARD 5 13}
        {ORC_GUARD 6 12}
        {ORC_GUARD 8 12}
        {ORC_GUARD 9 13}
        {ORC_GUARD 11 13}
        {ORC_GUARD 13 13}
        {ORC_GUARD 20 12}
        {ORC_GUARD 21 13}
        {ORC_GUARD 23 13}
        {ORC_GUARD 25 13}
        {ORC_GUARD 27 13}
        {ORC_GUARD 31 13}
        {ORC_GUARD 33 13}
        {ORC_GUARD 35 13}
        {ORC_GUARD 28 12}
        {ORC_GUARD 30 12}

        [unit]
            side=2
            type=Orcish Warrior
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Warrior
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Crossbowman
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Crossbowman
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Crossbowman
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Slayer
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Slayer
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=2
            type=Orcish Warrior
            x=7
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Warrior
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Warrior
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Crossbowman
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Crossbowman
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Crossbowman
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Warrior
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Slayer
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            side=3
            type=Orcish Slayer
            x=29
            y=8
            generate_description=yes
            random_traits=yes
        [/unit]

        [teleport]
            [filter]
                description="Kapou'e"
            [/filter]
            x=32
            y=21
        [/teleport]

        [teleport]
            [filter]
                description=Howgarth III
            [/filter]
            x=32
            y=22
        [/teleport]

        [teleport]
            [filter]
                description=Grüü
            [/filter]
            x=33
            y=21
        [/teleport]

        [role]
            type=Orcish Warlord, Orcish Slurbow, Troll Warrior, Troll, Orcish Warrior, Orcish Crossbowman, Orcish Slayer, Orcish Grunt, Orcish Assassin, Orcish Archer
            side=1
            role=bodyguard
        [/role]

        [recall]
            role=bodyguard
        [/recall]

        [teleport]
            [filter]
                role=bodyguard
            [/filter]
            x=31
            y=22
        [/teleport]

        [unit]
            type=Royal Guard
            side=6
            x=33
            y=22
            generate_description=yes
            random_traits=yes
        [/unit]

        [unit]
            type=Royal Guard
            side=6
            x=31
            y=23
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=27,28,29
            y=25,24,24
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=29
            y=24
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=28,28,29
            y=20,21,22
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=29
            y=22
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=29,30
            y=20,20
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=30
            y=20
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=33,32
            y=19,19
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=32
            y=19
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=33,34
            y=19,19
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=34
            y=19
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=35,34
            y=24,23
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=34
            y=23
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=35,35,35
            y=24,23,22
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=35
            y=22
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warrior
            x=35,34,33,32
            y=24,24,25,24
        [/move_unit_fake]

        [unit]
            type=Orcish Warrior
            side=5
            x=32
            y=24
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Orcish Warlord
            x=34,34,34,33
            y=16,17,18,19
        [/move_unit_fake]

        [teleport]
            [filter]
                description=Shan Taum
            [/filter]
            x=33
            y=19
        [/teleport]

        [message]
            description=Shan Taum
            message= _ "Now now now, what do we have here. Collaborating with the enemy again just like your disgusting father, are you?"
        [/message]

        [message]
            description="Kapou'e"
            message= _ "Collaborating with the humans, pfff. Look who is talking. What are you doing here, Shan Taum?"
        [/message]

        [message]
            description=Shan Taum
            message= _ "I am here to do to you what I did to your father."
        [/message]

        [message]
            description="Kapou'e"
            message= _ "So you did kill my father then."
        [/message]

        [message]
            description=Howgarth III
            message= _ "What did I tell you, Kapou'e?"
        [/message]

        [message]
            description="Earl Lanbec'h"
            message= _ "Ha ha! Good work Shan Taum. That will teach them. Attack, boys, I want Dorset recaptured by sunset."
        [/message]

        [message]
            description=Howgarth III
            message= _ "Hold, Earl Lanbec'h. I have reached an agreement with these orcs. Since your army has been the aggressor, you must immediately disperse your army and withdraw from orcish territory. Once that is done then Kapou'e will give you back Dorset and call off the horde. I have had dealings with Kapou'e's father before and I believe his blood will be trustworthy. And if that isn't enough, then we are here to protect you in case he violates the pact."
        [/message]

        [message]
            description="Earl Lanbec'h"
            message= _ "You and your damned compromises can go to hell. Your beloved Kapou'e will be joining you shortly."
        [/message]

        [message]
            description=Howgarth III
            message= _ "You leave us no choice but to take military action against you."
        [/message]

        [message]
            description="Earl Lanbec'h"
            message= _ "Ha ha! Very funny, Howgarth. Look around you. You are going to be dead as soon as my orc friend here gives the order. And then your men will automatically assume that Kapou'e tricked and killed you."
        [/message]

        [message]
            description=Howgarth III
            message= _ "Not today, my friend. *whistles*"
        [/message]

        [move_unit_fake]
            type=Gryphon Master
            x=41,40,39,38,37,36,35,34
            y=25,24,24,23,23,22,22,21
        [/move_unit_fake]

        [unit]
            type=Gryphon Master
            x=34
            y=21
            side=6
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Gryphon Master
            x=41,40,39,38,37,36,35,34
            y=25,24,24,23,23,22,22,22
        [/move_unit_fake]

        [unit]
            type=Gryphon Master
            x=34
            y=22
            side=6
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Gryphon Master
            x=41,40,39,38,37,36,35,34,33,32
            y=25,24,24,23,23,22,22,21,21,20
        [/move_unit_fake]

        [unit]
            type=Gryphon Master
            x=32
            y=20
            side=6
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Gryphon Master
            x=41,40,39,38,37,36,35,34,33,32,31,30
            y=25,24,24,23,23,22,22,21,21,21,21,21
        [/move_unit_fake]

        [unit]
            type=Gryphon Master
            x=30
            y=21
            side=6
            generate_description=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Gryphon Master
            x=41,40,39,38,37,36,35,34,33,32,31,30
            y=25,24,24,23,23,22,22,21,21,21,22,22
        [/move_unit_fake]

        [unit]
            type=Gryphon Master
            x=30
            y=22
            side=6
            generate_description=yes
            random_traits=yes
        [/unit]

        [message]
            description=Howgarth III
            message= _ "Kapou'e, it is essential that I make it back to my camp to bring news of our agreement and this treachery. One of my gryphon riders will take me. My bodyguards and the rest of my gryphons will help you fight free of this ambush. Once you get back to your camp, we will make a joint assault on these traitors. Once they are dead and dispersed, then I trust you will cary out your agreement."
        [/message]

        [message]
            description="Kapou'e"
            message= _ "Agreed. Let's get to it. BLOOD AND STEEL!"
        [/message]

        [move_unit_fake]
            type=Gryphon Master
            x=32,33,34,35,36,37,38,39
            y=22,23,23,24,24,25,25,26
        [/move_unit_fake]

        [teleport]
            [filter]
                description=Howgarth III
            [/filter]
            x=57
            y=27
        [/teleport]

        [message]
            description=Shan Taum
            message= _ "Blast! The human has escaped. Men, kill this turd-licker Kapou'e and report back to me. I must get to my camp and assault the city."
        [/message]

        [teleport]
            [filter]
                description=Shan Taum
            [/filter]
            x=60
            y=6
        [/teleport]

        [message]
            description=Grüü
            message= _ "Shan Taum big coward. Never want to fight."
        [/message]

        [set_variable]
            name=afternoontime
            value=3
        [/set_variable]
    [/event]

    [event]
        name=new turn
        first_time_only=no

        [set_variable]
            name=afternoontime
            add=1
        [/set_variable]

        [if]
            [variable]
                name=afternoontime
                numerical_equals=6
            [/variable]

            [then]
                [set_variable]
                    name=afternoontime
                    add=-6
                [/set_variable]

                [gold]
                    amount=500
                    side=4
                [/gold]

                [unit]
                    type=General
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Swordsman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Swordsman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Longbowman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Longbowman
                    side=4
                    x=18
                    y=34
                [/unit]

                [unit]
                    type=Horseman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Horseman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Spearman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]

                [unit]
                    type=Spearman
                    side=4
                    x=18
                    y=34
                    generate_description=yes
                    random_traits=yes
                [/unit]
            [/then]
        [/if]
    [/event]

    [event]
        name=victory

        [message]
            description=Grüü
            message= _ "YEAH!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            description="Kapou'e"
        [/filter]
        [message]
            speaker=unit
            message= _ "Argh! I'm done. My people are doomed!"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=die

        [filter]
            description=Shan Taum
        [/filter]

        [message]
            speaker=second_unit
            message= _ "Yeah, we finally got the coward. What do you want us to do with him chief?"
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Stick his head at the end of a pike and let the buzzards pick it clean. I wasn't joking about making a mug from his skull."
        [/message]
    [/event]

    {@campaigns/Son_Of_The_Black_Eye/utils/deaths.cfg}
[/scenario]
