#textdomain wesnoth-sotbe
[scenario]
    id=15_Civil_War
    name= _ "Civil War"
    map_file=15_Civil_War.map

    turns=30

    victory_when_enemies_defeated="no"

    {SCENARIO_MUSIC "wanderer.ogg"}
    {EXTRA_SCENARIO_MUSIC "knolls.ogg"}

    {DEFAULT_SCHEDULE_MORNING}

    next_scenario=16_The_Coward

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                condition=win
                description=_ "Defeat all rebel leaders and..."
                [show_if]
                    [have_unit]
                        # wmllint: recognize Braga
                        # wmllint: recognize Meato
                        # wmllint: recognize Ragvan
                        # wmllint: recognize Kergai
                        id=Braga, Meato, Ragvan, Kergai
                    [/have_unit]
                [/show_if]
            [/objective]
            [objective]
                condition=win
                description=_ "Then move Kapou’e to the signpost in the southwest"
                [show_if]
                    [have_unit]
                        id=Braga, Meato, Ragvan, Kergai
                    [/have_unit]
                [/show_if]
            [/objective]
            [objective]
                condition=win
                description=_ "Move Kapou’e to the signpost in the southwest"
                [show_if]
                    [not]
                        [have_unit]
                            id=Braga, Meato, Ragvan, Kergai
                        [/have_unit]
                    [/not]
                [/show_if]
            [/objective]
            [objective]
                condition=lose
                description=_ "Death of Kapou’e"
            [/objective]
            [objective]
                condition=lose
                description= _ "Death of Grüü"
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]

            {GREAT_HORDE_NOTE}
        [/objectives]
    [/event]

    [side]
        side=1
        id="Kapou'e"
        type=Orcish Leader
        controller=human
        team_name=Kapoue
        user_team_name=_ "Kapou’e"
        {GOLD 350 325 300}
        {INCOME 4 3 2}
        {BLACK_FLAG}
    [/side]

    {STARTING_VILLAGES 1 6}

    [side]
        type=Orcish Warlord
        id=Braga
        name= _ "Braga"
        side=2
        canrecruit=yes
        profile=portraits/orcs/warlord.webp
        recruit=Goblin Pillager,Orcish Grunt,Orcish Slayer,Orcish Archer
        {GOLD 150 200 250}
        {INCOME 2 3 4}
        team_name=rebels
        user_team_name=_"Rebels"
        [ai]
            aggression=0.8
            caution=0.5
            village_value=0.1
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 10}

    [side]
        type=Orcish Warlord
        id=Meato
        name= _ "Meato"
        side=3
        canrecruit=yes
        profile=portraits/orcs/grunt-2.webp
        recruit=Goblin Knight,Orcish Warrior,Troll,Wolf Rider
        {GOLD 150 200 250}
        {INCOME 2 3 4}
        team_name=rebels
        user_team_name=_"Rebels"
        [ai]
            aggression=0.8
            caution=0.5
            village_value=0.1
        [/ai]
    [/side]

    {STARTING_VILLAGES 3 10}

    [side]
        type=Orcish Warlord
        id=Ragvan
        name= _ "Ragvan"
        side=4
        canrecruit=yes
        profile=portraits/orcs/grunt-2.webp
        recruit=Goblin Pillager,Orcish Warrior,Orcish Assassin,Orcish Crossbowman
        {GOLD 150 200 250}
        {INCOME 2 3 4}
        team_name=rebels
        user_team_name=_"Rebels"
        [ai]
            aggression=0.8
            caution=0.5
            village_value=0.1
        [/ai]
    [/side]

    {STARTING_VILLAGES 4 10}

    [side]
        type=Orcish Warlord
        id=Kergai
        name= _ "Kergai"
        side=5
        canrecruit=yes
        profile=portraits/orcs/warlord.webp
        recruit=Troll Rocklobber,Orcish Warrior,Orcish Slayer,Goblin Impaler
        {GOLD 150 200 250}
        {INCOME 2 3 4}
        team_name=rebels
        user_team_name=_"Rebels"
        [ai]
            aggression=0.8
            caution=0.5
            village_value=0.1
        [/ai]
    [/side]

    {STARTING_VILLAGES 5 10}

    [story]
        [part]
            story= _ "Infuriated by the murder of the shamans, the orcish horde massacred the humans and their allies. In their rage, they scoured the snow for hours looking for any survivors. Only when their rage was spent did the full implications of the shamans’ deaths begin to sink in."
            {SOTBE_BIGMAP}
            {JOURNEY_14_OLD}
        [/part]

        [part]
            story= _ "With the Council broken, there was now nothing left to hold the orcish forces together. And if the orcish forces began to fight amongst themselves, as they so often did, then the humans would eradicate them with ease."
            {SOTBE_BIGMAP}
            {JOURNEY_14_OLD}
        [/part]

        [part]
            story= _ "Kapou’e vowed that this would not happen. Events had the smell of a treacherous plot aimed at destroying the unity of the orcs. Furthermore, if the tree-shagger was to be trusted, then Shan Taum the Smug was behind it all. What an orc expected to gain from destroying his own race was beyond Kapou’e, but he decided to march to Bitok personally and confront the traitor. Bitok being on the far side of orcish territory, this would also give him a good chance to clobber the orcs into working together again — the old-fashioned way."
            {SOTBE_BIGMAP}
            {JOURNEY_14_OLD}
        [/part]

        [part]
            story= _ "Furthermore, the troops who had been led by Kapou’e this far had grown to respect him as a wise and capable leader, and they proclaimed their loyalty to him. Delighted, Kapou’e sent detachments off in different directions to bring in the other tribes, by force if necessary. Al’Brock was sent west, along the route that Kapou’e had used to flee the human forces almost a year before. Flar’Tar was sent directly south to rally the tribes along the Mountains of Haag and the eastern Mourned Hills. Kapou’e himself made a direct southwest beeline towards Bitok. They were all to meet in Dorest that spring to repel the human attack that seemed certain to come."
            {SOTBE_BIGMAP}
            {JOURNEY_14_OLD}
        [/part]

        [part]
            story= _ "Having thus made his plans, Kapou’e set out for Bitok to get to the root of this treachery."
            {SOTBE_BIGMAP}
            {JOURNEY_14_OLD}
        [/part]
    [/story]

    {SOTBE_TRACK {JOURNEY_15_NEW} }

    {GOT_THE_GREAT_HORDE 1}

    [event]
        name=start

        [recall]
            id=Grüü
        [/recall]
        [recall]
            id=Jetto
        [/recall]
        [recall]
            id=Inarix
        [/recall]

        [message]
            speaker="Kapou'e"
            message= _ "If we are going to make it to Bitok, and then back to Dorest before spring, we have to get a move on. Break camp as soon as possible. Destroy all opposition in your path, I want this area to be firmly under my control by the time we are through here."
        [/message]

        [message]
            speaker=Braga
            image=portraits/orcs/warlord.webp~FL()~RIGHT()
            message= _ "Black-Eye! We won’t submit to an upstart like you!"
        [/message]

        [message]
            speaker=Meato
            image=portraits/orcs/grunt-2.webp~FL()~RIGHT()
            message= _ "Turn around and go back to where you came from or you’ll find your head on a pike! Right?"
        [/message]

        [message]
            speaker=Ragvan
            message= _ "Right!"
        [/message]

        [message]
            speaker=Kergai
            message= _ "Right!"
        [/message]

        [message]
            speaker="Kapou'e"
            #po: "whupping" is not a typo for "whipping"; it is a Southern
            #po: American dialect word meaning "a severe beating".
            # wmllint: local spelling whupping
            message= _ "It’s been a chilly winter. How about we warm ourselves up a bit by giving these traitors a good whupping, boys?"
        [/message]

        [message]
            speaker=Grüü
            message= _ "Yeah!"
        [/message]

        {HIGHLIGHT_IMAGE 1 18 scenery/signpost.png ()}
    [/event]

    # Commented out since it just doesn't work out very well
    #    [event]
    #        name=attack
    #
    #        [filter_second]
    #            side=1
    #        [/filter_second]
    #
    #        [message]
    #            speaker=unit
    #            message={WHISPER _"Psst, Black-Eye! Shan Taum paid our chiefs to stick around here and guard Bitok. But they pay us poor!"}
    #        [/message]
    #
    #        [message]
    #            speaker="Kapou'e"
    #            message= _ "And how is that my problem?"
    #        [/message]
    #
    #        [message]
    #            speaker=unit
    #            message={WHISPER _"Well, Black-Eye, as long as they’re in charge you’ll have to fight us all... but I’m sure none of us would bother you if you’d ‘remove’ just our chiefs."}
    #        [/message]
    #
    #        [message]
    #            side=$unit.side
    #            canrecruit=yes
    #            message= _ "What are you doing? I haven’t let you keep your head so you could chat with the enemy! Get back to the fight!"
    #        [/message]
    #
    #        [message]
    #            speaker=unit
    #            message= _ "Uh oh... yes chief, right away!"
    #        [/message]
    #
    #        [message]
    #            speaker=unit
    #            message={WHISPER _"Sorry!"}
    #        [/message]
    #    [/event]
    #
    #    [event]
    #        name=attack_end
    #
    #        [filter_second]
    #            side=1
    #        [/filter_second]
    #
    #        [message]
    #            speaker=second_unit
    #            message= _ "Chief, maybe we should do what he said and just try to assassinate their leaders instead?"
    #        [/message]
    #
    #        [message]
    #            speaker="Kapou'e"
    #            message= _ "Sure, why not? —If we get the chance."
    #        [/message]
    #    [/event]

    [event]
        name=die

        [filter]
            type=Orcish Archer,Orcish Assassin
        [/filter]

        [filter_second]
            id=Grüü
        [/filter_second]

        [message]
            speaker=Grüü
            message= _ "Little orcs fun to squash too! Chief doesn’t let me too often."
        [/message]

        [message]
            speaker="Kapou'e"
            message= _ "You can have as many as you want now, Grüü."
        [/message]
    [/event]

    [event]
        name=die
        first_time_only=no

        [filter]
            id=Braga, Meato, Ragvan, Kergai
        [/filter]

        [switch]
            variable=unit.side

            [case]
                value=2

                [message]
                    speaker=second_unit
                    message= _ "This rabble won’t be a problem anymore."
                [/message]
            [/case]

            [case]
                value=3

                [message]
                    speaker=second_unit
                    message= _ "Got this tribe under control."
                [/message]
            [/case]

            [case]
                value=4

                [message]
                    speaker=second_unit
                    message= _ "This is what you get for deserting the Son of the Black-Eye."
                [/message]
            [/case]

            [case]
                value=5

                [message]
                    speaker=second_unit
                    message= _ "This trash’s gone."
                [/message]
            [/case]
        [/switch]

        [kill]
            x,y=$x1,$y1
            animate=no
            fire_event=no
        [/kill]

        [if]
            [not]
                [have_unit]
                    id=Braga, Meato, Ragvan, Kergai
                [/have_unit]
            [/not]

            [then]
                [message]
                    speaker=Grüü
                    # wmllint: local spelling Heehee
                    message= _ "Heehee, we wiped them out good."
                [/message]

                [message]
                    speaker="Kapou'e"
                    message= _ "Now let’s get going, we have an appointment with Shan Taum."
                [/message]

                [if]
                    [have_unit]
                        id="Kapou'e"
                        x,y=1,18
                    [/have_unit]

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

                    [else]
                        [show_objectives]
                        [/show_objectives]
                    [/else]
                [/if]
            [/then]
        [/if]

        #        [if]
        #            [have_unit]
        #                side=$unit.side
        #
        #                [not]
        #                    canrecruit=yes
        #                [/not]
        #            [/have_unit]
        #
        #            [then]
        #                [role]
        #                    side=$unit.side
        #                    type=Orcish Warlord,Orcish Warrior,Orcish Slurbow,Orcish Crossbowman,Orcish Slayer,Orcish Grunt,Orcish Archer,Orcish Assassin
        #                    role=new_leader
        #                [/role]
        #
        #                [store_unit]
        #                    [filter]
        #                        side=$unit.side
        #                        role=new_leader
        #                    [/filter]
        #
        #                    kill=yes
        #                    variable=stored_new_leader
        #                [/store_unit]
        #
        #                {VARIABLE stored_new_leader.canrecruit yes}
        #
        #                [unstore_unit]
        #                    variable=stored_new_leader
        #                [/unstore_unit]
        #
        #                {CLEAR_VARIABLE stored_new_leader}
        #
        #                [modify_side]
        #                    side=$unit.side
        #                    team_name=Kapoue
        #                    user_team_name=_ "Kapou’e"
        #                [/modify_side]
        #
        #                [if]
        #                    [have_unit]
        #                        id=Braga
        #
        #                        [or]
        #                            id=Meato
        #                        [/or]
        #
        #                        [or]
        #                            id=Ragvan
        #                        [/or]
        #
        #                        [or]
        #                            id=Kergai
        #                        [/or]
        #                    [/have_unit]
        #
        #                    [then]
        #                        [switch]
        #                            variable=unit.side
        #
        #                            [case]
        #                                value=2
        #
        #                                [message]
        #                                    side=2
        #                                    role=new_leader
        #                                    message= _ "Freedom! Don’t worry about our tribe anymore, Kapou’e."
        #                                [/message]
        #                            [/case]
        #
        #                            [case]
        #                                value=3
        #
        #                                [message]
        #                                    side=3
        #                                    role=new_leader
        #                                    message= _ "Thank you, Son of the Black-Eye!"
        #                                [/message]
        #                            [/case]
        #
        #                            [case]
        #                                value=4
        #
        #                                [message]
        #                                    side=4
        #                                    role=new_leader
        #                                    message= _ "The chief is gone at last!"
        #                                [/message]
        #                            [/case]
        #
        #                            [case]
        #                                value=5
        #
        #                                [message]
        #                                    side=5
        #                                    role=new_leader
        #                                    message= _ "Finally! We’ll fight at your side now!"
        #                                [/message]
        #                            [/case]
        #                        [/switch]
        #                    [/then]
        #                [/if]
        #            [/then]
        #        [/if]
    [/event]

    [event]
        name=moveto
        first_time_only=no

        [filter]
            x,y=1,18
            id="Kapou'e"
        [/filter]

        [if]
            [have_unit]
                side=2,3,4,5
                canrecruit=yes
            [/have_unit]

            [then]
                [message]
                    speaker="Kapou'e"
                    message= _ "I can’t leave these renegades unguarded at our rear. I must take care of them before continuing."
                [/message]

                [allow_undo]
                [/allow_undo]
            [/then]

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

        #        [if]
        #            [not]
        #                [have_unit]
        #                    id=Braga
        #
        #                    [or]
        #                        id=Meato
        #                    [/or]
        #
        #                    [or]
        #                        id=Ragvan
        #                    [/or]
        #
        #                    [or]
        #                        id=Kergai
        #                    [/or]
        #                [/have_unit]
        #            [/not]
        #
        #            [then]
        #                [if]
        #                    [have_unit]
        #                        side=2,3,4,5
        #                        canrecruit=yes
        #                    [/have_unit]
        #
        #                    [then]
        #                        [message]
        #                            side=2,3,4,5
        #                            canrecruit=yes
        #                            message= _ "Thanks to you, Kapou’e, our imbecile leaders are gone!"
        #                        [/message]
        #
        #                        [message]
        #                            speaker="Kapou'e"
        #                            message= _ "Good for you. Now let’s get going, we have an appointment with Shan Taum."
        #                        [/message]
        #
        #                        [message]
        #                            side=2,3,4,5
        #                            canrecruit=yes
        #                            message= _ "Actually... we won’t be coming."
        #                        [/message]
        #
        #                        [message]
        #                            speaker=Grüü
        #                            message= _ "You don’t turn your back on Chief! You come or we squash!"
        #                        [/message]
        #
        #                        [message]
        #                            side=2,3,4,5
        #                            canrecruit=yes
        #                            message= _ "But we don’t want to fight anymore! In fact, we prefer farming to war. Maybe burn a village every now and then, but no big fighting."
        #                        [/message]
        #
        #                        [message]
        #                            speaker=Grüü
        #                            message= _ "Haha, Grüü never heard anything funnier! Farming orcs must have been hit in the head too hard."
        #                        [/message]
        #
        #                        [message]
        #                            speaker="Kapou'e"
        #                            # wmllint: local spelling un-orcs
        #                            message= _ "As much as I’d like to, we don’t have time to stay and ‘re-educate’ these un-orcs. So go jump in a lake if you want for all I care, just make sure I never see your pathetic faces again."
        #                        [/message]
        #                    [/then]
        #
        #                    [else]
        #                        [message]
        #                            speaker=Grüü
        #                            message= _ "Heehee, we wiped them out good."
        #                        [/message]
        #
        #                        [message]
        #                            speaker="Kapou'e"
        #                            message= _ "Now let’s get going, we have an appointment with Shan Taum."
        #                        [/message]
        #                    [/else]
        #                [/if]
        #
        #                [endlevel]
        #                    result=victory
        #                    bonus=yes
        #                    {NEW_GOLD_CARRYOVER 40}
        #                [/endlevel]
        #            [/then]
        #        [/if]
    [/event]

    {HERO_DEATHS}
[/scenario]
