#textdomain wesnoth-sotbe

[scenario]
    id="Human_Horde"
    name= _ "The Human Attack"
    map_data="{campaigns/Son_Of_The_Black_Eye/maps/Human_Attack.map}"

    turns=30

    victory_when_enemies_defeated="yes"

    {SCENARIO_MUSIC "knalgan_theme.ogg"}
    {EXTRA_SCENARIO_MUSIC "battle.ogg"}

    {DEFAULT_SCHEDULE}

    next_scenario="Northern_Alliance"

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                condition=win
                description=_ "Hold off the humans"
            [/objective]
            [objective]
                condition=lose
                description=_ "Death of Kapou'e"
            [/objective]
            [objective]
                description= _ "Death of Al'Brock"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Flar'Tar"
                condition=lose
            [/objective]
            [objective]
                condition=lose
                description= _ "Death of Grüü"
            [/objective]

            note= _ "The Great Horde: upkeep cost of every unit decreased by one." + "
"+{NO_EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/event]

    [side]
        type=Orcish Leader
        id="Kapou'e"
        name= _ "Kapou'e"
        side=1
        canrecruit=yes
        controller=human
        recruit= Wolf Rider, Orcish Grunt, Troll Whelp, Orcish Archer
        team_name=Kapoue
        user_team_name=_ "Kapou'e"
        gold=400
        {BLACK_FLAG}
    [/side]

    {STARTING_VILLAGES 1 10}

    [side]
        {ALBROCK_SIDE}
        {GOLD 300 250 200}
    [/side]

    {STARTING_VILLAGES 2 6}

    [side]
        {FLARTAR_SIDE}
        {GOLD 300 250 200}
    [/side]

    {STARTING_VILLAGES 3 6}

    [side]
        type=Grand Marshal
        id="Earl Lanbec'h"
        name= _ "Earl Lanbec'h"
        profile=portraits/lanbech.png
        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=villains
        user_team_name=_"Villains"
        {GOLD 800 900 1000}
        [ai]
            recruitment_pattern=scout,scout,fighter,archer,fighter,archer,mixed fighter,mixed fighter,healer
            leader_value=50.0
            villages_per_scout=10
            [protect_unit]
                id="Earl Lanbec'h"
                radius=8
                value=20
            [/protect_unit]
        [/ai]
        [ai]
            time_of_day=dawn,morning,afternoon
            aggression=0.9
            caution=0.2
            village_value=0.2
            grouping=offensive
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.7
            caution=0.5
            village_value=0.8
            grouping=defensive
        [/ai]
    [/side]

    {STARTING_VILLAGES 4 10}

    [story]
        [part]
            story= _ "As Kapou'e expected, by the time his forces had been defeated Shan Taum was nowhere to be found. Gritting his teeth and vowing that he would yet make a mug out of the traitor's skull, Kapou'e gathered his men and headed for Dorset."
            background=farnorth.png
        [/part]

        [part]
            story= _ "Once there he found his generals, Al'Brock and Flar'Tar had already arrived along with hundreds of bloodthirsty orcs. The warriors of the tribes that Kapou'e had cowed into submission were also present. In addition, the remaining shamans of the Great Council were also present to help in whatever way they could to preserve the unity of the Horde."
            background=farnorth.png
        [/part]

        [part]
            story= _ "Their presence proved to be unnecessary. It came as a shock to Kapou'e to discover, after a few days, that his people held him in awe. News of Kapou'e's exploits had been widely circulated - from his rescue of the shamans at Barag Gór, to his forced march through the northern blizzards. Younger grunts especially worshiped him with such fervor that he found it almost frightening."
            background=farnorth.png
        [/part]

        [part]
            story= _ "Days passed, the snows melted and Kapou'e readied his defenses. A few weeks after Kapou'e's arrival, riders caught sight of Earl Lanbec'h's army."
            background=farnorth.png
        [/part]

        [part]
            show_title=yes
            {TO_HUMAN_HORDE}
        [/part]
    [/story]

    {GOT_THE_GREAT_HORDE 1,2,3}

    [event]
        name=prestart

        {GENERIC_UNIT 4 Halberdier 21 26}
        {GENERIC_UNIT 4 Halberdier 23 26}

        {GENERIC_UNIT 4 Pikeman 19 27}
        {GENERIC_UNIT 4 Pikeman 25 27}

        {GENERIC_UNIT 4 Javelineer 16 27}
        {GENERIC_UNIT 4 Javelineer 28 27}

        {GENERIC_UNIT 4 (Iron Mauler) 16 29}
        {GENERIC_UNIT 4 (Iron Mauler) 28 29}

        {GENERIC_UNIT 4 (Shock Trooper) 16 31}
        {GENERIC_UNIT 4 (Shock Trooper) 28 31}

        {GENERIC_UNIT 4 (Shock Trooper) 17 33}
        {GENERIC_UNIT 4 (Shock Trooper) 27 33}

        {GENERIC_UNIT 4 (Shock Trooper) 19 33}
        {GENERIC_UNIT 4 (Shock Trooper) 25 33}

        {GENERIC_UNIT 4 Swordsman 21 34}
        {GENERIC_UNIT 4 Swordsman 23 34}

        #        {GENERIC_UNIT 2 (Orcish Warrior) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Warrior) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Crossbowman) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Crossbowman) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Slayer) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Slayer) 11 10}
        #        {GENERIC_UNIT 2 (Orcish Warrior) 11 10}
        #
        #        {GENERIC_UNIT 3 (Orcish Warrior) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Warrior) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Crossbowman) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Crossbowman) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Slayer) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Slayer) 33 10}
        #        {GENERIC_UNIT 3 (Orcish Warrior) 33 10}

        {MODIFY_UNIT side,canrecruit=4,no ai_special guardian}
        {MODIFY_UNIT x=23-42 facing sw}
    [/event]

    [event]
        name=start

        [recall]
            id=Grüü
        [/recall]
        [recall]
            id=Jetto
        [/recall]
        [recall]
            id=Inarix
        [/recall]
        # wmllint: recognize Grüü

        [message]
            speaker="Earl Lanbec'h"
            message= _ "This is it, men! It is time to make these orcs pay for all that they have done to us. Attack and spare no orc! Let us take back this land which is rightfully ours!"
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Forward, men! Our wolves will feed well tonight!"
        [/message]

        [message]
            speaker=Grüü
            # wmllint: local spelling softlings
            message= _ "Come here, human softlings. Grüü has a little present for you..."
        [/message]
    [/event]

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

    [event]
        name=turn 7

        [message]
            speaker=narrator
            message= _ "As a fresh day dawned, more human forces arrived."
            image=wesnoth-icon.png
        [/message]

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

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

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

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

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

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

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

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

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

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

    [event]
        name=turn 13

        [message]
            speaker=narrator
            message= _ "At the dawn of the third day, still more human forces arrived."
            image=wesnoth-icon.png
        [/message]

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

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

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

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

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

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

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

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

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

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

    [event]
        name=turn 19

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

        [unit]
            type=General
            id=Bruce
            side=4
            x=18
            y=34
            generate_name=yes
            random_traits=yes
        [/unit]

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

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

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

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

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

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

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

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

        [message]
            speaker=Bruce
            message= _ "We have arrived, my lord."
        [/message]
    [/event]

    [event]
        name=25

        [message]
            speaker="Earl Lanbec'h"
            message= _ "Ahhh, perfect, more reinforcements."
        [/message]

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

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

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

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

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

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

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

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

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

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

    [event]
        name=wrapup

        [move_unit_fake]
            type=General
            side=4
            x=35,34,33,32,31,31,32,32,32,32,32
            y=30,30,31,30,30,29,28,27,26,25,24
        [/move_unit_fake]

        [unit]
            side=4
            type=General
            id=Howgarth III
            name= _ "Howgarth III"
            profile=portraits/howgarth.png
            random_traits=no
            x=32
            y=24
        [/unit]

        [move_unit_fake]
            type=Royal Guard
            side=4
            x=35,34,33,32,31,31,32,32,32,32,31
            y=30,30,31,30,30,29,28,27,26,25,25
        [/move_unit_fake]

        [unit]
            side=4
            type=Royal Guard
            x=31
            y=25
            generate_name=yes
            random_traits=yes
        [/unit]

        [move_unit_fake]
            type=Royal Guard
            side=4
            x=35,34,33,32,31,31,32,32,32,32,32,33
            y=30,30,31,30,30,29,28,27,26,25,24,24
        [/move_unit_fake]

        [unit]
            side=4
            type=Royal Guard
            x=33
            y=24
            generate_name=yes
            random_traits=yes
        [/unit]

        [message]
            speaker=Howgarth III
            message= _ "Hold it! What in the wide green world is going on here!"
        [/message]

        [message]
            speaker="Earl Lanbec'h"
            message= _ "Howgarth? You and your interfering alliance always show up at the worst possible time."
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Just who do you think you are, slug?"
            image=portraits/kapoue-angry.png
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "I am Howgarth of the Northern Alliance, successor to the late Rahul I."
        [/message]

        [message]
            speaker="Earl Lanbec'h"
            message= _ "This is a strictly territorial matter, Howgarth. The Northern Alliance has no right to intervene in this affair."
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "The hell I don't, Earl Lanbec'h, the Northern Alliance was witness to a treaty some twenty seven years ago between your people and the orcs, which both of you are no doubt violating. It is our duty as the orchestrator and witness of this treaty to see that it is honored."
        [/message]

        [message]
            speaker="Earl Lanbec'h"
            message= _ "Well, good for you. As a matter of fact, this land is clearly defined under your precious treaty as human territory. So if you are so keen on being all high and noble, then muster your men to help us push back this orcish menace."
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "Cease your lies, Lanbec'h. We all know that you were the one who started this war. But enough, it is time for all this to end. I call for both sides to parley and we shall discuss this matter."
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Ha ha, very funny, old fool. You think we are stupid enough to fall for that? I've not forgotten what you people did to my father."
            image=portraits/kapoue-angry.png
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "What in the world are you talking about?"
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "I am Kapou'e, son of the Black-Eye Karun. Twenty-seven years ago you people assassinated my father after inviting him to join the Northern Alliance."
            image=portraits/kapoue-angry.png
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "What? We received word that he declined our invitation and that was the end of the matter. I know nothing of his assassination. As a matter of fact, I was there when the orcish messenger brought Rahul Karun's reply."
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Messenger, what messenger?"
            image=portraits/kapoue-angry.png
        [/message]

        [message]
            speaker=Howgarth III
            message= _ "If I remember correctly, it was some orc named Shan Taum."
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "Funny, that name sounds oddly familiar..."
        [/message]
    [/event]

    [event]
        name=time over

        [fire_event]
            name=wrapup
        [/fire_event]

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

    [event]
        name=last breath

        [filter]
            id="Earl Lanbec'h"
        [/filter]

        {VARIABLE unit.hitpoints 1}

        [unstore_unit]
            variable=unit
            find_vacant=no
        [/unstore_unit]

        [fire_event]
            name=wrapup
        [/fire_event]

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

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