#textdomain wesnoth-utbs

[scenario]
    id=10_Speaking_with_the_Fishes
    name= _ "Speaking with the Fishes"

    {UTBS_MAP 10_Speaking_with_the_Fishes.map}

    {STORY_SPEAKING_WITH_THE_FISHES}

    {SCENARIO_MUSIC "traveling_minstrels.ogg"}	# Talk only, no intro

    next_scenario=11_Battle_for_Zocthanol_Isle

    turns="-1"
    victory_when_enemies_defeated=no
    theme=Cutscene_Minimal

    {DAWN1}

    [side]
        side=1
        id=Kaleh
        type=Quenoth Youth
        canrecruit=yes
        gold=0
        {NO_INCOME}
        controller=human
        shroud=no
        fog=no
        team_name=ally
        user_team_name= _ "team_name^Quenoth Elves"
        {FLAG_VARIANT long}
    [/side]

    #side=2 Merfolk
    [side]
        id=Melusand
        name= _ "Melusand"
        type=Mermaid Diviner
        profile=portraits/melusand.png
        side=2
        canrecruit=yes
        [modifications]
            {TRAIT_INTELLIGENT}
            {TRAIT_RESILIENT}
        [/modifications]
        controller=ai
        team_name=ally
        user_team_name=_"Allies"
    [/side]

    # Prestart functions:
    # recall main heroes

    [event]
        name=prestart

        #add furnishings

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 5 15 }
        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 7 16 }
        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 5 17 }
        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 8 18 }

        #recall heroes
        [recall]
            id=Nym
            x,y=12,13
        [/recall]

        [recall]
            id=Zhul
            x,y=15,15
        [/recall]

        [recall]
            id=$ally_name
            x,y=13,15
        [/recall]

        # wmllint: recognize Grog
        # wmllint: recognize Nog
        # wmllint: recognize Rogrimir
        # wmllint: recognize Jarl

        # create 6 merfolk guards to protect the seer
        [unit]
            type=Merman Warrior
            name= _ "Merfolk Guard"
            x=8
            y=12
            side=2
        [/unit]

        [unit]
            type=Merman Warrior
            name= _ "Merfolk Guard"
            x=17
            y=10
            side=2
        [/unit]

        [unit]
            type=Merman Warrior
            name= _ "Merfolk Guard"
            x=17
            y=17
            side=2
        [/unit]

        [unit]
            type=Merman Hoplite
            name= _ "Merfolk Guard"
            x=11
            y=16
            side=2
        [/unit]

        [unit]
            type=Merman Spearman
            name= _ "Merfolk Guard"
            x=21
            y=11
            side=2
        [/unit]

        [unit]
            type=Merman Entangler
            name= _ "Merfolk Guard"
            x=13
            y=9
            side=2
        [/unit]

        [modify_unit]
            [filter]
                id=Kaleh
            [/filter]
            facing=ne
        [/modify_unit]
    [/event]

    # starting dialogue
    [event]
        name=start

        [message]
            speaker=Melusand
            message= _ "Hail Kaleh, long have I waited to see you in person."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Greetings. I’m afraid I am at a disadvantage, for you know my name and I do not know yours."
        [/message]

        [message]
            speaker=Melusand
            message= _ "I am known as Melusand. I am what you might call a high priest among my people."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "This is—"
        [/message]

        [if]
            [have_unit]
                id=$ally_name
            [/have_unit]

            [then]
                {MESSAGE_DEPEND_ON_ALLY
                (
                    [message]
                        speaker=Melusand
                        message= _ "No, you don’t have to introduce yourselves. I already know who you are and why you have been journeying all this way. And I must say, Grog, that your recent actions and indeed your presence with these fine folk speaks well for your people."
                    [/message]

                    [message]
                        speaker=Grog
                        message= _ "Grog says thank you."
                    [/message]
                )
                (
                    [message]
                        speaker=Melusand
                        message= _ "No, you don’t have to introduce yourselves. I already know who you are and why you have been journeying all this way. And I must say, Nog, that your recent actions and indeed your presence with these fine folk speaks well for your people."
                    [/message]

                    [message]
                        speaker=Nog
                        message= _ "Nog says thank you."
                    [/message]
                )
                (
                    [message]
                        speaker=Melusand
                        message= _ "No, you don’t have to introduce yourselves. I already know who you are and why you have been journeying all this way. And I must say, Rogrimir, that your recent actions and indeed your presence with these fine folk speaks well for your people."
                    [/message]

                    [message]
                        speaker=Rogrimir
                        message= _ "Thank you for your kindness."
                    [/message]
                )
                (
                    [message]
                        speaker=Melusand
                        message= _ "No, you don’t have to introduce yourselves. I already know who you are and why you have been journeying all this way. And I must say, Jarl, that your recent actions and indeed your presence with these fine folk speaks well for your people."
                    [/message]

                    [message]
                        speaker=Jarl
                        message= _ "Thank you for your kindness."
                    [/message]
                )}
            [/then]

            [else]
                [message]
                    speaker=Melusand
                    message= _ "No, you don’t have to introduce yourselves. I already know who you are and why you have been journeying all this way."
                [/message]
            [/else]
        [/if]

        [message]
            speaker=Nym
            message= _ "If you know so much why did you drag us all the way out here?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Patience, young lady. All will be revealed in good time."
        [/message]

        [message]
            speaker=Melusand
            message= _ "I have been watching your progress with great interest, but I could not contact you directly. That is why I sent out my most trusted followers to find you. I apologize for the difficulty of arranging a meeting. Oh, and I hope you do not mind my guards. But her spies are everywhere and I had to be certain that we could converse without being overheard. Besides, it never hurts to be too careful."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Whose spies?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Perhaps I should start at the beginning, for that is a good place to start. Make yourselves comfortable, this may take a while. I want to tell you a tale, it is a story of the fall of what you refer to as ‘The Golden Age’."
        [/message]

        {REPLACE_SCENARIO_MUSIC "revelation.ogg"}

        [message]
            speaker=Melusand
            message= _ "A long time ago there was a great empire of humans known as the Empire of Wesnoth. They lived peacefully alongside elves and dwarves, and drove the dark powers deep under the earth. It was a time of peace, light, and prosperity for all."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Yes, we know about this age."
        [/message]

        [message]
            speaker=Melusand
            message= _ "This will go much faster if you don’t interrupt me. Now, as I was saying, the Empire of Wesnoth was very learned in the magical arts and had vast repositories of knowledge. Back then there was only one sun in the sky, the sun you call Sela. But the king decreed that he would raise a second sun into the heavens, to lengthen their days and shorten the darkness. All the mages, sorcerers and wise men came together and cast a mountain into the sky and made it glow as bright as the sun. They sent this second sun, the one you call Naia, hurtling through the sky so that only a few hours of darkness remained each night. Though some had called the attempt foolish, it was a resounding success and stood as a tribute to the power and might of the humans. The golden age glowed brighter than ever and many believed that they had dispelled evil and darkness forever."
        [/message]

        [message]
            speaker=Melusand
            message= _ "But with their prosperity and power, over the generations the humans grew arrogant. One day a young descendant of the original king decreed that darkness should be abolished altogether from the land, so that light and goodness would shine forth everywhere. But the people had grown lazy and complacent and the ranks of mages who still trained hard to harness the magical arts had decreased greatly. Still the king believed he was all-powerful and would not listen to the mages’ protests. So, seeking to duplicate the previous success of their ancestors, the mages tried to lift a second mountain into the sky. But a great evil befell them that day; their power failed and the mountain crashed down onto the human capital, crushing all within. In an instant the center of the Empire of Wesnoth was utterly destroyed."
        [/message]

        [message]
            speaker=Melusand
            message= _ "The king and his family were all killed, and soon petty warlords tore apart the empire as all the known lands fell into chaos. Elves and dwarves were drawn into the conflicts, orcs and trolls spread forth from the dark places, and chaos and darkness swallowed the lands."
        [/message]

        [message]
            speaker=Melusand
            message= _ "The two suns, a monument to the power and hubris of the fallen Empire of Wesnoth, scorched the earth. The fields dried up, forests died, and swamps turned into mud-cracked plains. Since then the path of the second sun has shifted in the sky, creating the long dark that you are so familiar with every other night. And much evil has spread forth across the lands. The mages of the Empire of Wesnoth still haunt their domains as the undead lords that plague your sands. The surviving humans have descended into barbarity and squalor. Orcs cover the lands killing each other and any that fall into their grasp. The dwarves and trolls hide in their tunnels, in the dark, fighting an endless war. I do not mean to offend your friend, but the majority of them care little for the fate of the surface dwellers. And without their forests the elves have mostly died out, another victim of the chaos and evil that dominates our lands."
        [/message]

        [message]
            speaker=Melusand
            message= _ "What can we merfolk do? We see much with our magics, but we do not have the numbers, nor the power, to bring back order to the domains of the land dwellers. And even the sea is not free from the darkness; we struggle to survive against the naga and far worse things that have crept forth from the dark places. We are barely holding our own in the waters, but you saw how ill-suited we were when we went ashore."
        [/message]

        [message]
            speaker=Melusand
            message= _ "You are probably wondering why I know all this history. Far out in the sea is a string of islands that was once colonized by some humans from the Empire of Wesnoth. During the Golden Age ships traveled often to the mainland carrying trade goods and news. Apparently the colony was led by a group of mages who wanted a safe place to perform their experiments. Protected by their magic and their isolation, these colonists held out longer than most after the fall of the empire. What happened to them we do not know for certain, but many years ago my people discovered the ruins of their settlements. While exploring the ruins we found a library full of letters and several journals. With our magics and knowledge we were able to decipher the writings and thus we could piece together the history of the end of the Golden Age."
        [/message]

        [message]
            speaker=Melusand
            message= _ "The islands seemed lush and bountiful so we decided to settle in the shallow waters. But we discovered that the largest island was a strange and sinister place. The interior of the island was choked with a thick jungle, and at the center we could see several tall rocky peaks. On the tallest peak was built some sort of stronghold and occasionally at night we saw strange lights emanating from it. We sent several expeditions into the jungle to explore the building, but none ever returned. Soon afterwards merfolk sleeping on the shores would disappear at night, leaving only bloody trails leading into the dense jungle. It was clear that something was lurking in the jungle, but we knew not what. Our priests felt a strange presence that they could not understand, and darkness clouded our attempts at scrying."
        [/message]

        [message]
            speaker=Melusand
            message= _ "The island was declared cursed, and we stayed as far away from it as we could. Some said we should flee the islands, but the waters were great for hunting, and the cursed naga who often raided our settlements did not trouble us here. So we remained and told ourselves that if we kept our distance everything would be fine."
        [/message]

        [message]
            speaker=Melusand
            message= _ "But then that night came, I still remember it, as if it was yesterday. As the sun set a darkness spread forth from the tower, blotting out the moon and stars. From the sea came harsh battle cries and a great host of naga appeared from out of the depths. Even worse, from that large island the bodies of long-dead humans rose again and marched through the water, killing soundlessly. We were not prepared for such a powerful assault, and we were forced to flee for our lives. Indeed we were lucky to save as many as we did."
        [/message]

        [message]
            speaker=Melusand
            message= _ "In hindsight I blame the humans. With their experiments I think they woke something, something evil. Years later, we still suffer from the legacy of their cursed arrogance and hubris. Something festers on that island, corrupting all that it touches. Since we fled, those islands have become a haven to dark and terrible things. Naga prowl the seas, and undead and other horrors lurk in that twisted jungle. The few creatures that we have captured alive speak of a dark goddess, one they serve blindly unto death. It seems that she has taken control of the humans you saw as well."
        [/message]

        [message]
            speaker=Nym
            message= _ "Does she have a name?"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Melusand
            message= _ "She has many names. We call her the Eater of Souls. But in the old tongue her name is Yechnagoth."
        [/message]

        [message]
            speaker=Zhul
            message= _ "No!"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Yes, I thought that name would be familiar to you. Always is she looking for new followers. I believe that it is she who appeared unto your people in the guise of your god. But her lust for even greater power may be her undoing. For she underestimated your strength of will; you are not as easily controlled as those she dominated before. She brought you here to be her followers, but I believe that you may be just the ones who can destroy her."
        [/message]

        [message]
            speaker=Nym
            message= _ "You seem powerful, why can’t you destroy her yourselves?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Years of battle have taken their toll; my people are few in number and have not the strength to strike at her alone. But I see in you a strength and determination that gives me hope. With your help we may have a chance."
        [/message]

        [message]
            speaker=Melusand
            message= _ "You must realize that if she is not stopped, who knows how far her pestilence might spread? I have scryed far and wide and there are few that have the strength to stand up to such a force. If we do not, who will?"
        [/message]

        [message]
            speaker=Zhul
            message= _ "How can we trust you? How do we know you aren’t servants of Yechnagoth, sent to trick us?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "If you knew anything about us you would not ask such a question! The idea is an anathema to all that we stand for! You saw how my brethren risked life and limb to find you and protect you and your kind against the humans. You saw how the humans treated us in return. Are not our actions proof enough?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Because in the end, I’m afraid you just have to trust us. If we wanted to capture you we could have already. But we are not here to force you to do anything. Feel free to leave if you want, we can take you back to land. But you will find few friends among the wilds north of the mountains, and the humans will be searching for you. Yechnagoth’s reach is long and her vengeance is terrible."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Indeed, that is what she is expecting. Like the few others that have resisted her for a time, she expects you to flee from her, to run away as far as you can. Long has it been since she has been seriously attacked; it is the one thing she will not be anticipating. I doubt that she even considers your kind a threat, but we have a real chance here to show her that there is still power in the known lands that she does not control."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "You have given us much to think about. But we cannot make such an important decision in an instant. Please give us time to talk among ourselves and discuss this matter."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Of course. We will withdraw to the shallows and give you some privacy. But do not ponder for too long, for we do not have a lot of time. I will return ere long."
        [/message]

        {MOVE_UNIT id=Melusand 20 4}

        {MOVE_UNIT x,y=13,9 19 5}

        {MOVE_UNIT x,y=17,10 20 5}

        {MOVE_UNIT x,y=21,11 21 5}

        {MOVE_UNIT x,y=8,12 3 14}

        {MOVE_UNIT x,y=11,16 4 19}

        {MOVE_UNIT x,y=17,17 11 21}

        [modify_unit]
            [filter]
                id=Kaleh
            [/filter]
            facing=sw
        [/modify_unit]

        [message]
            speaker=Kaleh
            message= _ "Well, what do you all think?"
        [/message]

        [message]
            speaker=Nym
            message= _ "It’s a heck of a story."
        [/message]

        [message]
            speaker=Zhul
            message= _ "I’m not sure what to think. It’s all so much information."
        [/message]

        {MESSAGE_DEPEND_ON_ALLY
        (
            [message]
                speaker=Grog
                message= _ "Grog not sure if he trust fish lady. What if she just want you elves to fight her war for her?"
            [/message]
        )
        (
            [message]
                speaker=Nog
                message= _ "Nog not sure if he trust fish lady. What if she just want you elves to fight her war for her?"
            [/message]
        )
        (
            [message]
                speaker=Rogrimir
                message= _ "I’m still not sure I trust her. What if she’s just trying to get you all to fight her war for her?"
            [/message]
        )
        (
            [message]
                speaker=Jarl
                message= _ "I’m still not sure I trust her. What if she’s just trying to get you all to fight her war for her?"
            [/message]
        )}
        [message]
            speaker=Kaleh
            message= _ "The point is, it’s not her fight, it’s our fight too. I for one believe her tale. With all the power that Melusand says Yechnagoth has, how do we know that Yechnagoth wasn’t the one who rained those rocks down upon our village all those weeks ago? What if this is all just part of a plot to turn our people into a group of mindless followers?"
        [/message]

        [message]
            speaker=Zhul
            message= _ "Whether this was all planned or not, what’s important is what should we do with ourselves now? We have a duty to protect our people."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "No, no, no! Too much blood has been spilled. This has gone on way too far for us to just end it now and walk away. You saw what she did to Keratur and Tanstafaal, their blood is on my hands and I will have vengeance!"
        [/message]

        [message]
            speaker=Nym
            message= _ "Even if we turn around and leave now, where will we go?"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Zhul
            message= _ "I admit that Melusand does have a point. We cannot return under the mountains the way we came, the humans will be heavily guarding that path for sure by now. We could ask the merfolk to return us back to the coasts to the north or south of where we came, but I do not know these lands at all. We would be wandering aimlessly through the wilderness. Oh, if only we did have Eloh to guide us. We need her now more than ever."
        [/message]

        [message]
            speaker=Nym
            message= _ "This entire journey has been based on a lie—"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Kaleh
            message= _ "I know! I know! Would you like me to kill myself as punishment, or step down as leader? Imagine how I feel. I heard her voice, it was just as you had told us since we were children, Zhul. The voice of our god, speaking to us for the first time since the olden days. And I believed, I wanted to believe so badly, that I could take our people away from the horror and the death. I see them now whenever I sleep, I see their faces, all of our brethren who have died on the accursed journey. Oh, I wish none of this had ever happened!"
        [/message]

        [message]
            speaker=Nym
            message= _ "No, no, no one is blaming you, Kaleh."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Many who have seen dark times wish they could go back and remake the past. But that is not in our power, all we can do now is do what seems right in the time that is allotted to us. Do not succumb to despair Kaleh, or else Yechnagoth has already won."
        [/message]

        [if]
            [variable]
                name=ally_race
                equals=dwarf
            [/variable]

            [then]
                [message]
                    speaker=$ally_name
                    message= _ "Yes, remember boy, the fight is not yet lost while we still draw breath."
                [/message]
            [/then]

            [else]
                [message]
                    speaker=$ally_name
                    message= _ "Do not give up yet, little one. The battle is not yet lost while we still fight."
                [/message]
            [/else]
        [/if]

        [message]
            speaker=Kaleh
            message= _ "You are right. I believe Melusand, strange as her tale sounds. From all I have seen Yechnagoth truly is a scourge on this earth, and I would gladly give up my life for a chance to destroy her once and for all. But this is not a choice that I can make for all of our people."
        [/message]

        [message]
            speaker=Nym
            message= _ "She should be made to pay for all that she has done to our people, and if I should die in the attempt, then so be it. I will not leave your side now, Kaleh."
        [/message]

        [message]
            speaker=Zhul
            message= _ "As strange as it may sound, there are some things in this world that are more important than the fate of our people. Years from now the suns shall rise anew, a seed will grow into a flower, a child will be born. And I believe that if Yechnagoth is victorious then all that is good and beautiful will be corrupted and twisted and destroyed. This is a harsh world that we live in, but there is beauty and goodness in it, and no matter what may happen to us, I would gladly give my life to see that beauty and goodness survive."
        [/message]

        {MESSAGE_DEPEND_ON_ALLY
        (
            [message]
                speaker=Grog
                message= _ "Even in deepest tunnels my people could not escape Yechnagoth’s power forever if she is not stopped. Against such evil I am sure the Great Leader would give you whole army of trolls, but I am afraid you only have Grog. Still, Grog will do what he can to see her destroyed."
            [/message]
        )
        (
            [message]
                speaker=Nog
                message= _ "Even in deepest tunnels my people could not escape Yechnagoth’s power forever if she is not stopped. Against such evil I am sure the Great Leader would give you whole army of trolls, but I am afraid you only have Nog. Still, Nog will do what he can to see her destroyed."
            [/message]
        )
        (
            [message]
                speaker=Rogrimir
                message= _ "Even in the deepest tunnels underground we could not forever escape Yechnagoth’s power if she remains unchecked. Against such evil I am sure my king would give you a whole army of dwarves, but I am afraid you only have me. Still, I will do what I can to see her destroyed."
            [/message]
        )
        (
            [message]
                speaker=Jarl
                message= _ "Even in the deepest tunnels underground we could not forever escape Yechnagoth’s power if she remains unchecked. Against such evil I am sure my king would give you a whole army of dwarves, but I am afraid you only have me. Still, I will do what I can to see her destroyed."
            [/message]
        )}
        [message]
            speaker=Kaleh
            message= _ "Then it is decided. Still in this matter we cannot speak for all our people. Those who go on this quest may never return, and this battle is certainly no place for the young or the elderly. Let all who are afraid or cannot fight stay behind with the merfolk. I will ask Melusand to arrange that if we fail, they be taken far away from here, that they might live out their lives in what peace they can find."
        [/message]

        [message]
            speaker=Zhul
            message= _ "That is very compassionate of you, but I doubt that many of our surviving people will wish to stay behind. You are our leader Kaleh, and where you go, we will follow."
        [/message]

        [message]
            speaker=narrator
            message= _ "Time passes."
            image=wesnoth-icon.png
        [/message]

        {MOVE_UNIT id=Melusand 15 12}

        [modify_unit]
            [filter]
                id=Kaleh
            [/filter]
            facing=ne
        [/modify_unit]

        [message]
            speaker=Melusand
            message= _ "Have you come to a decision?"
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Yes we have. Yechnagoth has played us like fools. We have all lost loved ones because of her machinations. Her arrogance will not go unchallenged; we will aid you in your cause."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Excellent. Due to our limited numbers, we cannot mount a full frontal assault against all her forces. Instead a sneak attack may allow us to bypass her defenses and strike at her heart. There are many among my people who yearn to strike against the Eater of Souls. I will help orchestrate an attack on one of the outermost northern islands to create a diversion. I also want to thank you for rescuing my brethren from the humans. They owe you their lives and they wish to return their debt of gratitude. They have volunteered to guide and escort you to your destination."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Although her magic has clouded the isles from my scrying, it is the largest island, which we call Zocthanol Isle, where I sense the strongest power."
        [/message]

        [message]
            speaker=Nym
            message= _ "Why is it called Zocthanol Isle?"
        [/message]

        [message]
            speaker=Melusand
            message= _ "Because Zocthanol means accursed in our tongue. Anyway, it is there that I think you will find the source of the corruption. We will not be able to continue our attack for long, but it should give you enough time to slip through the outer defenses and reach Zocthanol Isle. You must explore the island, find the source of the darkness that infests it and destroy it before the rest of Yechnagoth’s minions have time to return."
        [/message]

        [message]
            speaker=Melusand
            message= _ "And on a related subject I can offer you a glimmer of hope in this dark time. I know that you have been searching for a home for your people. These corrupted islands were once rich and bountiful. If this darkness can truly be destroyed, then such a place might be the home you have been looking for. And I promise you that if you help us, we will help you adapt to these new lands. But that is talk for another day."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Before you go I have one thing to give you. I’m afraid that where you are going my magical power will be of little help. However I want you to have these brooches. They are made from the rarest shells that are found in our waters and I have blessed them with the power of the Sea God. As long as you wear them I will be able to track your progress. You may find that they protect you in other ways as well."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "We thank you for such beautiful gifts. We will wear them with honor."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "We have one favor to ask of you."
        [/message]

        [message]
            speaker=Melusand
            message= _ "Yes, anything."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "We go into this darkness knowing that perhaps none of us will return alive. But I cannot ask all my people to go with me against their will. This battle is also no place for our children or our elders. I ask that you protect those that we leave behind, and should the fight go ill, please take them as far away from here as possible. At the least perhaps they can get some peace and happiness in the distant wilds."
        [/message]

        [message]
            speaker=Melusand
            message= _ "I will do as you ask. It is only fair. But if this battle goes ill I do not think there will be many safe places left in the known lands."
        [/message]

        [message]
            speaker=Nym
            message= _ "Before we leave, there’s one thing I don’t understand. When he first met Kaleh, Esanoo said this all concerned Yechnagoth and Zhangor. We know about Yechnagoth, but who is Zhangor?"
        [/message]

        [message]
            speaker=Kaleh
            message= _ "I remember when Yechnagoth was posing as Eloh, she said she was the slayer of the demon lord Zhangor."
        [/message]

        [message]
            speaker=Zhul
            message= _ "I wonder where Yechnagoth heard of the story of the demon lord Zhangor. It is a sad tale and has not been told for ages, but perhaps now is the right time."
        [/message]

        [message]
            speaker=Zhul
            message= _ "It all started in the years before the Great Fall. The elves of Wesmere Forest were masters of the arcane magics. They valued knowledge above all else and specialized in divination, seeking to scry out the secrets of the other races. In their scrying they attracted the notice of the demon Zhangor."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Zhangor appeared to them in the guise of a beautiful elven youth and told them that a great darkness was coming, which would destroy all the knowledge that they had collected. He said if they worshiped him as a god he would protect them and reveal unto them knowledge and magics that they could only dream of. But he wanted more; he demanded a blood sacrifice of one elf a month. Some of the elves were revolted, but most were tempted by the prospect of even greater power, and so they bowed down and worshiped him as their god. Those few who protested his ascendancy were the first to be thrown into jails and sacrificed."
        [/message]

        [message]
            speaker=Zhul
            message= _ "And so as the rest of the lands succumbed to darkness and chaos, Wesmere Forest was one of the few islands of peace and safety. But Zhangor played upon the elves’ fears and demanded more from his followers. He declared that all other elves were heretics and did not deserve life. So the Wesmere elves gave sanctuary to refugees, and then they turned them over to their dark priests, who sacrificed them on Zhangor’s bloody altars. Zhangor feasted on these sacrifices and grew stronger and more powerful. He wanted even more. When no more refugees came, the priests ordered raiding parties to go out and bring back any poor souls they could find. When no more elves could be found they preyed upon humans, dwarves, orcs, anyone they could find in the nearby lands."
        [/message]

        [message]
            speaker=Zhul
            message= _ "By this point most of the other forests had been burned, and Eloh was leading our people south across the plains. We were surprised to find the Wesmere Forest still standing, and even more surprised when an elvish raiding party came out of the forest and attacked us at night, stealing several of our children. Eloh, in her wisdom, revealed in a dream the terrible things that happened in that dark forest. We were appalled at the depths to which our brethren had sunk, and though we were loath to attack our own kind, we decided that we could not let these abominable practices continue. We vowed to avenge the sacrifice of our children, and we attacked with all our might."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Driven on by their dark priests and by their fear of Zhangor’s wrath, the Wesmere elves fought stubbornly against our superior numbers. The fighting was horrible indeed; that once beautiful forest was drenched in blood, and corpses littered the sunny glades. The battle culminated with Zhangor himself appearing in his true form above the forest. He flew over the land, raining down fire on defenders and attackers alike, delighting in the death and destruction. We had not the power to combat one as strong as him, and we called out to Eloh to save us in our hour of need. In a great avatar of light she appeared and they battled back and forth above the burning forest. In the end she beheaded him and smote his body down upon the earth."
        [/message]

        [message]
            speaker=Zhul
            message= _ "By this point the entire forest was being engulfed by flame, and friend and foe alike fled from the inferno. With the death of their god the Wesmere elves surrendered and begged for forgiveness, telling us the entire sorry story. We took pity on them and cared for them as best we could, but we were afraid that some of the devout priests might try to secretly continue the worship of Zhangor. For Eloh told us that she had not killed Zhangor, but merely banished him from this world. We did not want to risk Zhangor ever dividing our people again. So we decided that the dark priests who organized the sacrifices must be executed, but that all others who renounced Zhangor might be saved."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Our priests also declared that Zhangor’s name and his story were forbidden knowledge, to speak of him meant death. Their constant vigilance was rewarded; in a few generations only the high priests knew of the tale, and so it was passed down to me. Though these measures may seem harsh, I believe they were justified. If Zhangor was ever summoned back I don’t think we could have survived another schism. And so the story of Zhangor was passed down from generation to generation to remind us guardians of knowledge of the folly of valuing knowledge higher than the welfare of our people."
        [/message]

        [message]
            speaker=Nym
            message= _ "I wonder what other forbidden lore you’ve been taught."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Foolish girl! Do not ask such a question. Trust me, it is better not to know. Knowledge can be a terrible weight, and not one that I would want a youth such as yourself to bear. Treasure the beautiful things in this life and pry not into the darker secrets. Eloh forgive me, I have probably told you too much already, but in these dark times I felt that you should know a little bit of the truth."
        [/message]

        [message]
            speaker=Melusand
            message= _ "That is very interesting. In truth, I’d never heard of Zhangor before when I told Esanoo to mention him to you, Kaleh. Let me explain. When Eloh appeared to you, I was able to use my powers to eavesdrop on your conversation. I did not know how much you suspected, but I did not want to cause panic by openly revealing who was actually speaking to you. I had hoped to convince you to come here so I could reveal the truth to you in person. That’s why I made those elusive references to Yechnagoth and Zhangor, hoping that Kaleh would make the connection between Eloh and Yechnagoth, and be curious enough to seek me out. My mistake was that I did not realize that Yechnagoth would move so fast. I am sorry that discovering her true identity carried such a high price for your people."
        [/message]

        [message]
            speaker=Melusand
            message= _ "And now I must bid you farewell. The merfolk you rescued will help show you the path to the island, and I must go orchestrate our diversion. We will begin our attack at the end of the next long night, so by dawn the large island should be left relatively unguarded. I will pray for our success, with luck we shall all meet again."
        [/message]

        [endlevel]
            result=victory
            linger_mode=no
            carryover_report=no
            {NEW_GOLD_CARRYOVER 100}
        [/endlevel]
    [/event]
[/scenario]


#textdomain wesnoth-utbs

[scenario]
    id=11_Battle_for_Zocthanol_Isle
    name= _ "The Battle for Zocthanol Isle"

    next_scenario=12_The_Final_Confrontation

    {UTBS_MAP 11_Battle_for_Zocthanol_Isle.map}

    {STORY_BATTLE_FOR_ZOCTHANOL_ISLAND}

    {SCENARIO_MUSIC "wanderer.ogg"}
    {EXTRA_SCENARIO_MUSIC "vengeful.ogg"}
    {EXTRA_SCENARIO_MUSIC "heroes_rite.ogg"}

    victory_when_enemies_defeated=no
    {TURNS 51 48 45}

    {TWO_SUNS_DEFAULT_SCHEDULE}

    # citadel terrain graphics
    [terrain_graphics]
        map="
.,  *,  .
, *,  *,
*,  1,  *
, *,  *,
*,  *,  *
, *,  *,
*,  *,  *
, *,  *,
.,  *,  ."
        [tile]
            pos=1
        [/tile]
        x,y=24,16
        [image]
            name=citadel_zocthanol_clouds.png
            layer=5
            base=108,290
            center=144,162
        [/image]
        [image]
            name=citadel_zocthanol.png
            layer=0
            base=108,290
            center=144,162
        [/image]
        [image]
            name=citadel_zocthanol_sub.png
            layer=-10
            base=108,290
            center=144,162
        [/image]
    [/terrain_graphics]

    #Side 1: elves
    [side]
        side=1
        id=Kaleh
        type=Quenoth Youth
        canrecruit=yes
        {GOLD 320 240 160}
        {INCOME 8 6 4}
        controller=human
        shroud=yes
        fog=yes
        team_name=elf_ally
        user_team_name= _ "team_name^Quenoth Elves"
        {FLAG_VARIANT long}
    [/side]

    #Side 2: Saurians (blue)
    [side]
        side=2
        type=Saurian Oracle
        id=Boyicht
        name= _ "Boyicht"
        canrecruit=yes
        [modifications]
            {TRAIT_INTELLIGENT}
            {TRAIT_RESILIENT}
        [/modifications]
        # gold and income will be set later - this ensures saurians have no gold until then
        gold=0
        income=-50
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}

#ifdef EASY
        recruit=Saurian Skirmisher, Saurian Augur
#endif

#ifdef NORMAL
        recruit=Saurian Skirmisher, Saurian Augur, Saurian Ambusher
#endif

#ifdef HARD
        recruit=Saurian Skirmisher, Saurian Augur, Saurian Ambusher, Saurian Soothsayer, Saurian Oracle
#endif

        [ai]
#ifdef HARD
            recruitment_pattern=scout, healer, scout, archer
#else
            recruitment_pattern=scout, healer, scout
#endif
            aggression=0.75
            caution=0.1

            passive_leader=yes
        [/ai]
    [/side]

    #Side 3: Undead (green)
    [side]
        side=3
        type=Draug
        id=Kelur
        name= _ "Kelur"
        canrecruit=yes
        {GOLD 160 240 320}
        {INCOME 15 25 35}
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}

#ifdef EASY
        recruit=Blood Bat, Ghost, Wraith, Revenant, Deathblade, Bone Shooter, Necrophage, Banebow
#endif

#ifdef NORMAL
        recruit=Blood Bat, Ghost, Wraith, Revenant, Deathblade, Bone Shooter, Necrophage, Banebow, Spectre
#endif

#ifdef HARD
        recruit=Blood Bat, Ghost, Wraith, Revenant, Deathblade, Bone Shooter, Necrophage, Banebow, Spectre, Draug
#endif

        [ai]
            recruitment_pattern=scout,fighter,archer,fighter
            aggression=0.8
            caution=0.1
        [/ai]
    [/side]

    #Side 4: Orcs (yellow)
    [side]
        side=4
        type=Orcish Sovereign
        id=Graghht
        name= _ "Graghht"
        canrecruit=yes
        [modifications]
            {TRAIT_STRONG}
            {TRAIT_RESILIENT}
        [/modifications]
        {GOLD 160 240 320}
        {INCOME 15 25 35}
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}

#ifdef EASY
        recruit=Orcish Warrior, Orcish Crossbowman, Orcish Slayer, Goblin Knight, Goblin Pillager, Direwolf Rider, Orcish Warlord
#endif

#ifdef NORMAL
        recruit=Orcish Warrior, Orcish Crossbowman, Orcish Slayer, Goblin Knight, Goblin Pillager, Direwolf Rider, Orcish Warlord, Orcish Slurbow
#endif

#ifdef HARD
        recruit=Orcish Warrior, Orcish Crossbowman, Orcish Slayer, Goblin Knight, Goblin Pillager, Direwolf Rider, Orcish Warlord, Orcish Slurbow
#endif

        [ai]
            recruitment_pattern=scout, fighter, archer, fighter, mixed fighter
            aggression=0.8
            caution=0.1
        [/ai]
    [/side]

    #Side 5: Eloh
    [side]
        side=5
        no_leader=yes
        gold=0
        controller=null
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}
    [/side]

    #Side 6: Vampire bats
    [side]
        side=6
        no_leader=yes
        gold=0
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}
    [/side]

    [side]
        side=7
        no_leader=yes
        gold=0
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}

#ifdef EASY
        recruit=Naga Fighter, Naga Warrior, Naga Guardian, Naga Hunter
#endif

#ifdef NORMAL
        recruit=Naga Fighter, Naga Warrior, Naga Guardian, Naga Hunter, Naga Warden
#endif

#ifdef HARD
        recruit=Naga Fighter, Naga Warrior, Naga Guardian, Naga Hunter, Naga Warden, Naga Myrmidon
#endif

        [ai]
            aggression=0.75
            caution=0.1

            recruitment_pattern=fighter, archer, fighter, fighter

#ifdef EASY
            passive_leader=yes
#endif
        [/ai]
    [/side]

    #Side 8: Eastern Naga
    [side]
        side=8
        no_leader=yes
        gold=0
        controller=ai
        team_name=eloh_ally
        user_team_name=_"Eloh Cultists"
        {FLAG_VARIANT undead}

#ifdef EASY
        recruit=Naga Fighter, Naga Warrior, Naga Guardian, Naga Hunter
#endif

#ifdef NORMAL
        recruit=Naga Fighter, Naga Warrior, Naga Guardian, Naga Warden, Naga Hunter
#endif

#ifdef HARD
        recruit=Naga Fighter, Naga Warrior, Naga Myrmidon, Naga Warden, Naga Guardian, Naga Hunter
#endif

        [ai]
            aggression=0.75
            caution=0.1

            recruitment_pattern=fighter, archer, fighter, fighter

#ifdef EASY
            passive_leader=yes
#endif
        [/ai]
    [/side]

    # Prestart functions:
    # increase cost of all units by 2
    # place item images on map
    # recall main heroes
    # initialize starting variables
    # remove shroud surrounding starting position
    # set starting scenario objectives

    [event]
        name=prestart

        {INCREASE_RECRUIT_COSTS 2}

        # add items to map

        # add elven ship to landing point

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 39 44}

        # wrecked ship was 13,14

        {PLACE_IMAGE scenery/wreck.png 13 9}

        # trapped merman in cage

        {PLACE_IMAGE "units/merfolk/triton.png~RC(magenta>red)" 10 5}
        {PLACE_IMAGE items/cage.png 10 5}

        [unit]
            type=Merman Triton
            id="Trapped Merman"
            name= _ "Trapped Merman"
            x,y=10,5
            side=2
            random_traits=no
            max_moves=1
            ai_special=guardian
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
        [/unit]

        # recall heroes

        [recall]
            id=Nym
        [/recall]

        [recall]
            id=Zhul
        [/recall]

        # recall dwarf/troll
        [recall]
            id=$ally_name
        [/recall]

        # wmllint: recognize Grog
        # wmllint: recognize Nog
        # wmllint: recognize Rogrimir
        # wmllint: recognize Jarl

        #recall merfolk

        [recall]
            id=Esanoo
            x,y=41,43
        [/recall]
        [recall]
            id=Urruga
            x,y=41,42
        [/recall]
        [recall]
            id=Nuvassa
            x,y=42,41
        [/recall]
        [recall]
            id=Yantili
            x,y=43,42
        [/recall]
        [recall]
            id=Il-tian
            x,y=43,43
        [/recall]
        [recall]
            id=We-jial
            x,y=42,43
        [/recall]

        #initialize starting variables

        {VARIABLE found_door no}

        # set starting scenario objectives

        [objectives]
            [objective]
                description= _ "Kaleh must capture a keep"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL keep_reached boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Reach the black citadel in the center of the island"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL keep_reached boolean_equals yes}
                    {VARIABLE_CONDITIONAL found_door   boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Defeat enemy leaders, find both keys"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL found_door boolean_equals yes}
                    [have_unit]
                        canrecruit=yes
                        side=3,4
                    [/have_unit]
                [/show_if]
            [/objective]
            [objective]
                description= _ "Any unit must reach the black citadel"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL found_door boolean_equals yes}
                    [not]
                        [have_unit]
                            canrecruit=yes
                            side=3,4
                        [/have_unit]
                    [/not]
                [/show_if]
            [/objective]
            [objective]
                description= _ "Death of Kaleh"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Nym"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Zhul"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                carryover_percentage=0
            [/gold_carryover]
        [/objectives]

        #create starting undead and orc guards

        [unit]
            type=Revenant
            side=3
            x,y=25,20
            ai_special=guardian
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]

        [unit]
            type=Orcish Warrior
            side=4
            x,y=27,20
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
            ai_special=guardian
        [/unit]
    [/event]

    # Event 1: Starting dialogue

    [event]
        name=start

        [message]
            speaker=Nym
            message= _ "Where did this fog come from? I can’t see a thing!"
        [/message]

        [message]
            race=merman
            message= _ "Fog and darkness cloud this place, but we can use it to our advantage. The other ships will be safe hidden out in the deep water."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "We should find a fort before we land the rest of our people. I do not like the idea of landing everyone without a fort to protect us. Shrouded by the fog, they will be safe for the moment. Once we find a place to rally our people, we can bring the rest of them in and start fighting in earnest."
        [/message]

        [message]
            race=merman
            message= _ "I think there were some human ruins in the southwestern part of the island. If you explore the land to the west, then we will swim through the shallows and see what we can find."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "That is a good plan. First find a fort, then we can explore the rest of the island."
        [/message]

        # remove merfolk from map
        [store_unit]
            [filter]
                side=1
                race=merman
                {EVERYWHERE}
            [/filter]
            kill=yes
            variable=merfolk_units
        [/store_unit]

        # capture villages for saurians

        [capture_village]
            x=8-29
            y=38-45
            side=2
        [/capture_village]
    [/event]

    # Event 2: Jungle Warning

    # keep player from entering jungle too early

    [event]
        name=moveto
        id=jungle_warning

        [filter]
            x=31-36
            y=32-37
            side=1
        [/filter]

        [message]
            speaker=Zhul
            message= _ "Ugh. That jungle seems dark and foreboding. Do you see those eyes? There are things staring at us from the depths of the jungle, but I can’t tell what they are. As much as I love plants and trees, I don’t like the look of it."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Indeed. It seems much more open to the south. The merfolk mentioned that there were human ruins to the southwest. Maybe we should explore there first. I don’t think I want to hack through the jungle until we have more elves at our side."
        [/message]
    [/event]

    # Event 3: Silence and Suspense

    [event]
        name=moveto

        [filter]
            x=1-27
            y=37-41
            side=1
        [/filter]

        [message]
            speaker=Nym
            message= _ "I don’t get it. All we see are ruins, bones, some sand and patches of grass. I thought we would be attacked the moment we set foot on this island. Where is everybody?"
        [/message]

        [message]
            speaker=Kaleh
            message= _ "That’s what worries me. I keep thinking that something is going to jump out from behind the next rock or stone wall and attack, but everything is silent. Too silent."
        [/message]
    [/event]

    # Event 4: Encountering the Saurians

    [event]
        name=sighted

        [filter]
            id=Boyicht
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        [message]
            speaker=Boyicht
            message= _ "You trespass on holy ground, The One says you must die!"
        [/message]

        [message]
            speaker=Nym
            message= _ "Faugh! Little one, you are not worth our time. We are the Quenoth Elves! Flee and trouble us no longer or we will squash you like a bug."
        [/message]

        [message]
            speaker=Boyicht
            message= _ "No, you are not The One. You no command Boyicht. Attack!"
        [/message]

        # Saurian ambush

#ifdef EASY
        {NAMED_GENERIC_UNIT 2 (Saurian Skirmisher) 17 39 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Skirmisher) 16 43 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Augur) 20 42 () ( _ "Fanatical Saurian")}
#endif

#ifdef NORMAL
        {NAMED_GENERIC_UNIT 2 (Saurian Ambusher) 17 39 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Skirmisher) 16 43 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Augur) 20 42 () ( _ "Fanatical Saurian")}
#endif

#ifdef HARD
        {NAMED_GENERIC_UNIT 2 (Saurian Ambusher) 17 39 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Skirmisher) 16 43 () ( _ "Fanatical Saurian")}
        {NAMED_GENERIC_UNIT 2 (Saurian Oracle) 20 42 () ( _ "Fanatical Saurian")}
#endif

        [modify_side]
            side=2
            {INCOME 3 4 5}
            {GOLD 20 30 40}
        [/modify_side]
    [/event]

    # Death of Boyicht

    [event]
        name=last breath

        [filter]
            id=Boyicht
        [/filter]

        [message]
            speaker=Boyicht
            message= _ "My death matters not. The One will kill you all. None can resist her."
        [/message]

        [kill]
            id=Boyicht
            animate=yes
            fire_event=no
        [/kill]

        {CHECK_SPEAKER}
        [message]
            speaker=$speaking_unit.id
            # wmllint: local spelling creeped
            message= _ "I say good riddance. He creeped me out."
        [/message]
        {CLEAR_VARIABLE speaking_unit}
    [/event]

    # Event 4.5 Naga leaders appear, activate sides 7 + 8

    # side 8 naga on eastern side of island are a bit stronger
    # than side 7 than those on western side

    [event]
        name=turn 4

        [unit]
            type=Naga Myrmidon
            name= _ "Naga Leader"
            canrecruit=yes
            side=7
            x,y=3,23
            [modifications]
                {TRAIT_INTELLIGENT}
                {TRAIT_STRONG}
            [/modifications]
        [/unit]

        [modify_side]
            side=7
            {INCOME 6 12 18}
            {GOLD 90 120 150}
        [/modify_side]

        [unit]
            type=Naga Myrmidon
            name= _ "Naga Leader"
            canrecruit=yes
            side=8
            x,y=46,28
            [modifications]
                {TRAIT_INTELLIGENT}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]

        [modify_side]
            side=8
            {INCOME 10 15 20}
            {GOLD 80 120 160}
        [/modify_side]
    [/event]

    # Event 5: Capture the castle, merfolk and elves return

    [event]
        name=moveto

        [filter]
            id=Kaleh
            x,y=13,41
        [/filter]

        [message]
            speaker=Kaleh
            message= _ "I have captured the keep. This castle is somewhat ruined, but it will serve our purposes. Now, I wonder where the merfolk are?"
        [/message]

        [foreach]
            array=merfolk_units
            [do]
                [unstore_unit]
                    variable=this_item
                    find_vacant=yes
                    x,y=6,42
                [/unstore_unit]
            [/do]
        [/foreach]

        {CLEAR_VARIABLE merfolk_units}

        [redraw]
            side=1
        [/redraw]

        [message]
            race=merman
            message= _ "Fear not, here we are! We have explored the southern half of the island. And except for those lizards you found, and some abandoned villages, it seem to be empty. We captured those villages for you, to help support your troops."
        [/message]

        [capture_village]
            x=8-29
            y=42-45
            side=1
        [/capture_village]

        [message]
            speaker=Nym
            message= _ "Thanks, I think we’re going to need all the support we can get."
        [/message]

        [remove_shroud]
            x=0-52
            y=37-52
            side=1
        [/remove_shroud]

        [message]
            race=merman
            message= _ "Now that you have found a fortress to protect your people, we can bring in the other ships."
        [/message]

        # animations of ships landing

        [sound]
            name=ambient/ship.ogg
        [/sound]

        [move_unit_fake]
            type=Galleon
            side=1
            x=1,2,3,4,5,6,7,8,9,10
            y=41,40,40,39,39,38,38,37,38,38
        [/move_unit_fake]

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 10 38}

        [move_unit_fake]
            type=Galleon
            side=1
            x=1,2,3,4,5,6,7,8,9
            y=42,41,41,40,40,39,40,39,39
        [/move_unit_fake]

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 9 39}

        [move_unit_fake]
            type=Galleon
            side=1
            x=1,2,3,4,5,6,7,8,9
            y=43,42,42,41,41,40,40,39,40
        [/move_unit_fake]

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 9 40}

        [message]
            speaker=Zhul
            message= _ "Good, now we can start recruiting and recalling our warriors. Of course with so few people left, training new warriors will be very difficult and expensive. But if we lose this battle, then what use will gold be to us?"
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Now that we’ve set up a base of operations we should make our way to the black citadel in the mountains at the center of the island. I bet it’s somewhere in the middle of that dark jungle."
        [/message]

        [message]
            race=merman
            message= _ "In our exploration we found a group of reinforcements, who were sent to help you, compliments of Melusand. You can recruit them into service at your base, if you wish. We may not be much use to you on land, but we will protect you against any threats from the water."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Thank you. I’m sure the reinforcements will be very useful."
        [/message]

        [allow_recruit]
            type=Mermaid Initiate, Merman Fighter, Merman Hunter
            side=1
        [/allow_recruit]

        [remove_event]
            id=jungle_warning
        [/remove_event]

        {VARIABLE keep_reached yes}

        [show_objectives]
        [/show_objectives]

        # change the music playing
        [music]
            name=battle.ogg
            immediate=yes
        [/music]
    [/event]

    # Event 6: Encounter the undead leader

    [event]
        name=sighted

        [filter]
            id=Kelur
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        [message]
            speaker=Kelur
            message= _ "Feel the cold touch of death!"
        [/message]
    [/event]

    # Event 7: Encounter the orc leader

    [event]
        name=sighted

        [filter]
            id=Graghht
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        [message]
            speaker=Graghht
            message= _ "I will slaughter you all and bathe in your blood!"
        [/message]
    [/event]

    # Event 8: Encounter stone citadel

    [event]
        name=moveto

        [filter]
            x=25-27
            y=19-20
            side=1
            [not]
                type=Dust Devil
            [/not]
        [/filter]

        [remove_shroud]
            [filter_side]
                side=1
            [/filter_side]
            x,y=24-28,16-20
        [/remove_shroud]
        [message]
            speaker=unit
            message= _ "We’ve reached what looks like the citadel, but it is surrounded by a huge perfectly smooth obsidian wall. I can’t find any way to get in."
        [/message]

        [if]
            [variable]
                name=unit.id
                equals=Kaleh
            [/variable]
            [then]
                [message]
                    speaker=Kaleh
                    message= _ "There’s got to be something here. The orc and skeleton must have been guarding some sort of entrance."
                [/message]
            [/then]
            [else]
                [message]
                    speaker=Kaleh
                    message= _ "Are you sure? Search carefully. The orc and skeleton must have been guarding some sort of entrance."
                [/message]
            [/else]
        [/if]

        [message]
            speaker=unit
            message= _ "Wait a minute. There’s a tiny outline of a door in the stone. But there’s no way to open it. All I see are what look like two tiny keyholes in the stone. Now I wonder where we might find the right keys?"
        [/message]

        [if]
            [have_unit]
                canrecruit=yes
                side=3,4
                count=0
            [/have_unit]

            [then]
                [message]
                    speaker=Kaleh
                    message= _ "Hey, what about the two keys that we found on the bodies of the undead and orc leaders?"
                [/message]
            [/then]

            [else]
                [message]
                    speaker=Kaleh
                    message= _ "I have an idea. I bet Eloh has given them to those she trusts most. And one orc and one skeleton were guarding the door. The keys must be being held by one of each faction. I bet the leaders would be in charge of such valuable objects."
                [/message]

                {VARIABLE found_door yes}

                [show_objectives]
                [/show_objectives]
            [/else]
        [/if]
    [/event]

    # Defeat both leaders, now have to take keys back to citadel door
    [event]
        name=found_both_keys_and_door

        [filter_condition]
            [have_unit]
                canrecruit=yes
                side=3,4
                count=0
            [/have_unit]

            [variable]
                name=found_door
                boolean_equals=yes
            [/variable]
        [/filter_condition]

        [message]
            speaker=Kaleh
            message= _ "We’ve found both keys. Now we just have to take them and open the door to the black citadel. I tire of all this bloodshed. Wherever Yechnagoth hides, we will find her and make her pay for all she has done."
        [/message]

        [show_objectives]
        [/show_objectives]
        [remove_shroud]
            [filter_side]
                side=1
            [/filter_side]
            x,y=24-28,16-20
        [/remove_shroud]
    [/event]

    # Event 9: Defeat the undead leader

    [event]
        name=last breath

        [filter]
            id=Kelur
        [/filter]

        [message]
            speaker=Kelur
            message= _ "Aaaargh!"
        [/message]

        [kill]
            id=Kelur
            animate=yes
            fire_event=no
        [/kill]

        {CHECK_SPEAKER}
        [if]
            [variable]
                name=found_door
                boolean_equals=yes
            [/variable]

            [then]
                [message]
                    speaker=$speaking_unit.id
                    message= _ "Look, I found a gold key on a chain around his neck. This must be one of the keys needed to enter the black citadel."
                [/message]
            [/then]

            [else]
                [message]
                    speaker=$speaking_unit.id
                    message= _ "Look, I found a gold key on a chain around his neck. I wonder what this key is for? I bet it will become useful eventually. I’ll keep it just in case."
                [/message]
            [/else]
        [/if]
        {CLEAR_VARIABLE speaking_unit}

        [fire_event]
            name=found_both_keys_and_door
        [/fire_event]
    [/event]

    # Event 10: Defeat the orc leader

    [event]
        name=last breath

        [filter]
            id=Graghht
        [/filter]

        [message]
            speaker=Graghht
            message= _ "Nooo!!"
        [/message]

        [kill]
            id=Graghht
            animate=yes
            fire_event=no
        [/kill]

        {CHECK_SPEAKER}
        [if]
            [variable]
                name=found_door
                boolean_equals=yes
            [/variable]

            [then]
                [message]
                    speaker=$speaking_unit.id
                    message= _ "Look, I found an iron key on a chain around his neck. This must be one of the keys needed to enter the black citadel."
                [/message]
            [/then]

            [else]
                [message]
                    speaker=$speaking_unit.id
                    message= _ "Look, I found an iron key on a chain around his neck. I wonder what this key is for? I bet it will become useful eventually. I’ll keep it just in case."
                [/message]
            [/else]
        [/if]
        {CLEAR_VARIABLE speaking_unit}

        [fire_event]
            name=found_both_keys_and_door
        [/fire_event]
    [/event]

    # Event 11: An elf goes to open the doors

    [event]
        name=moveto

        [filter]
            side=1
            x=25-27
            y=19-21
        [/filter]

        [filter_condition]
            [have_unit]
                canrecruit=yes
                side=3,4
                count=0
            [/have_unit]
        [/filter_condition]

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

    # Event 12: Player gets close to trapped merman

    [event]
        name=sighted

        [filter]
            id=Trapped Merman
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        {CHECK_SPEAKER}
        [message]
            speaker=Trapped Merman
            message= _ "Help me..."
        [/message]

        [message]
            speaker=$speaking_unit.id
            message= _ "A merman! He looks like he’s in bad shape."
        [/message]
        {CLEAR_VARIABLE speaking_unit}

        [kill]
            id=Trapped Merman
            animate=no
            fire_event=no
        [/kill]
    [/event]

    # Event 13: Player gets close to wrecked ship

    [event]
        name=moveto

        [filter]
            side=1
            [not]
                type=Dust Devil
            [/not]
            [filter_location]
                radius=5
                x,y=13,9
                [filter_radius]
                    terrain=W*
                [/filter_radius]
            [/filter_location]
        [/filter]

        {NAMED_GENERIC_UNIT 2 (Sea Serpent) 13 9 (Sea Serpent) ( _ "Sea Serpent")}

        [message]
            speaker=Sea Serpent
            message= _ "Raurrgghhh!!"   # wmllint: no spellcheck
        [/message]

        [message]
            speaker=second_unit
            message= _ "A sea serpent! That thing must be 20 cubits long! It must have been living among the wreckage of that ship. I shudder to think what it was feasting on."
        [/message]
    [/event]

    # Event 14: Player rescues trapped merman

    [event]
        name=moveto

        [filter]
            x,y=10,5
            side=1
            [not]
                type=Dust Devil
            [/not]
        [/filter]

        [remove_item]
            x,y=10,5
        [/remove_item]

        [unit]
            type=Merman Triton
            id=Grateful Merman
            name= _ "Grateful Merman"
            x,y=10,5
            side=1
            hitpoints=12
            unrenamable=yes
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
        [/unit]

        [message]
            speaker=Grateful Merman
            message= _ "Thank you. I got captured by the naga and have been trapped here for ages, I don’t know how long. So close to the water, but so far. I don’t think I could have lasted much longer. It was horrible."
        [/message]

        [message]
            speaker=unit
            message= _ "Well, help us get revenge on the naga. We are here to destroy Yechnagoth."
        [/message]

        [message]
            speaker=Grateful Merman
            message= _ "Gladly. Just let me recover my strength first."
        [/message]
    [/event]

    # player find gold in wrecked ship

    [event]
        name=moveto

        [filter]
            x,y=13,9
            side=1
            [not]
                type=Dust Devil
            [/not]
        [/filter]

        [sound]
            name=gold.ogg
        [/sound]

        [message]
            speaker=unit
            message= _ "I found a chest in the hold of this wrecked ship. It looks like sunken treasure!"
        [/message]

        [gold]
            amount={ON_DIFFICULTY 100 75 50}
            side=1
        [/gold]
    [/event]

    # Event 15: time over event

    [event]
        name=time over

        [message]
            speaker=Kaleh
            message= _ "We’ve run out of time! The forces that the merfolk helped distract have returned and will surely kill us all."
        [/message]

        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    # Event 16: VICTORY!

    [event]
        name=victory

        [terrain]
            x,y=26,19
            terrain=Uu
        [/terrain]

        [unit]
            type=Divine Avatar
            id=Eloh
            name= _ "Eloh"
            side=5
            x,y=26,19
            random_traits=no
        [/unit]

        [redraw]
        [/redraw]

        [delay]
            time=500
        [/delay]

        [message]
            speaker=Eloh
            message= _ "So I see that you have finally slain both of my lieutenants. I wondered how long it would take you."
        [/message]

        [message]
            speaker=Nym
            message= _ "We have your keys. You cannot hide from us now."
        [/message]

        [message]
            speaker=Eloh
            message= _ "Did you really think something as simple as a pair of keys was needed to enter and leave my sanctum? The entire thing was just a charade to see how much trouble you would go through on your pathetic little quest."
        [/message]

        [message]
            speaker=Eloh
            message= _ "Sigh, you elves are so predictable."
        [/message]

        [message]
            speaker=Zhul
            message= _ "Talk all you want, we will have our vengeance!"
        [/message]

        [message]
            speaker=Eloh
            message= _ "Is that what you want? I suppose I do owe Kaleh a personal audience, after all I have put him through. Well here’s your chance. Come to me boy, and prove that you have what it takes. All you others, stay away unless you want a slow and painful death. I will deal with you later."
        [/message]

        [kill]
            id=Eloh
            animate=no
        [/kill]

        [redraw]
        [/redraw]

        [delay]
            time=300
        [/delay]

        [message]
            speaker=Kaleh
            message= _ "I must go and end this. But first I want to thank you all for your faith in me throughout this long journey. If I do not prevail then please flee this place with the merfolk and find somewhere where you can have peace and safety. My last wish is that no matter what happens you all live long and fruitful lives. Don’t let our sacrifices be forgotten..."
        [/message]

        [message]
            speaker=Nym
            message= _ "Kaleh, you can’t just go in there alone. She’ll kill you!"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Kaleh
            message= _ "I must. Too many others have died because of my actions. I couldn’t face losing you, Nym. Now it is time for me to finish it, alone."
        [/message]

        [message]
            speaker=Zhul
            message= _ "May Eloh protect you."
        [/message]

        [message]
            speaker=Kaleh
            message= _ "Her will be done."
        [/message]

        # Kaleh disappears

        [hide_unit]
            id=Kaleh
        [/hide_unit]

        [redraw]
        [/redraw]

        [delay]
            time=500
        [/delay]

        [message]
            speaker=Zhul
            message= _ "Well, now we just have to wait..."
        [/message]

        [message]
            speaker=Nym
            message= _ "You aren’t actually going to let him face her alone?!"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Zhul
            message= _ "Yes, I am. In the end it is his decision."
        [/message]

        [message]
            speaker=Nym
            message= _ "I’ve saved his sorry ass all this way, I’m not going to let him go and let himself get killed now!"
            image=portraits/nym_moody.png
        [/message]

        [message]
            speaker=Zhul
            # wmllint: local spelling Nymphtessa
            message= _ "Nymphtessa, my darling, you have always been a rebel. But eventually you must learn to respect your leaders’ decisions. Kaleh has made his choice, and if Eloh wills it he will prevail. You see how all our losses weigh upon him. He would not want us to disobey him and sacrifice our lives too."
        [/message]

        [message]
            speaker=Nym
            message= _ "I don’t care! Do you think I’m going to let him go in there and fight alone? He’ll be slaughtered! He needs our help. Without us he never would have even made it out of the desert. The rest of you can just sit on your hands and pray, but I’m going in there!"
            image=portraits/nym_moody.png
        [/message]

        # Nym disappears

        [hide_unit]
            id=Nym
        [/hide_unit]

        [redraw]
        [/redraw]

        [delay]
            time=500
        [/delay]

        [message]
            speaker=Zhul
            message= _ "Curse that girl! She’ll be the death of me. But still she doesn’t stand a chance without me. Kaleh is one thing, but Nym needs my protection. All right, I’m going in. The rest of you stand guard, if we don’t come out in half an hour then flee the island with the merfolk."
        [/message]

        # Zhul disappears

        [hide_unit]
            id=Zhul
        [/hide_unit]

        {MESSAGE_DEPEND_ON_ALLY
        (
            [message]
                speaker=Grog
                message= _ "Grog not going to just sit here while Kaleh does all the fighting. Kaleh will need strong fighter like Grog. Other elves may be scared, but Grog fear no dark place. Grog just hope there still something to smash when he gets there."
            [/message]
        )
        (
            [message]
                speaker=Nog
                message= _ "Nog not going to just sit here while Kaleh does all the fighting. Kaleh will need strong fighter like Nog. Other elves may be scared, but Nog fear no dark place. Nog just hope there still something to smash when he gets there."
            [/message]
        )
        (
            [message]
                speaker=Rogrimir
                message= _ "I’ve followed that boy this far, I’m not going to just let him march in there without me. Besides, whoever heard of a dwarf being afraid of going underground? I just hope they save some of the fighting for me."
            [/message]
        )
        (
            [message]
                speaker=Jarl
                message= _ "I’ve followed that boy this far, I’m not going to just let him march in there without me. Besides, whoever heard of a dwarf being afraid of going underground? I just hope they save some of the fighting for me."
            [/message]
        )}

        {CLEAR_VARIABLE found_door}
        {CLEAR_VARIABLE keep_reached}
    [/event]

    # create bats at dusk function

    # at first dusk, Kaleh comments strange noises in jungle
    [event]
        name=bat_noise_reaction
        [message]
            speaker=Kaleh
            message= _ "What’s that strange screeching sound coming from the jungle?"
        [/message]
    [/event]

    [event]
        name=new turn
        first_time_only=no

        [filter_condition]
            [have_location]
                time_of_day_id=dusk1,dusk2
            [/have_location]
        [/filter_condition]

        [fire_event]
            name=bat_noise_reaction
        [/fire_event]

        # create vampire bats and blood bats
# wmlindent: start ignoring
        {SCATTER_UNITS {ON_DIFFICULTY 5 3 3} (Vampire Bat) 2 (terrain=Gs^Ftr) (
            side=6
            name= _ "Nocturnal Pest"
            upkeep=free)}

        # create blood bats on medium and hard difficulties
#ifndef EASY
        {SCATTER_UNITS {ON_DIFFICULTY 0 3 4} (Blood Bat) 2 (terrain=Gs^Ftr) (
            side=6
            name= _ "Nocturnal Pest"
            upkeep=free)}
#endif
# wmlindent: stop ignoring
    [/event]

    # destroy all bats at morning

    # at first morning, Nym comments on bats fleeing
    [event]
        name=bat_leave_reaction
        [message]
            speaker=Nym
            message= _ "That’s odd. Why did those bats suddenly fly off?"
        [/message]

        [message]
            speaker=Zhul
            message= _ "They must be nocturnal."
        [/message]
    [/event]

    [event]
        name=new turn
        first_time_only=no

        [filter_condition]
            [have_location]
                time_of_day_id=dawn1,dawn2
            [/have_location]
            [have_unit]
                side=6
            [/have_unit]
        [/filter_condition]

        [kill]
            side=6
            animate=no
            fire_event=no
        [/kill]

        [fire_event]
            name=bat_leave_reaction
        [/fire_event]
    [/event]

    {UTBS_INCLUDE utils/deaths.cfg}
[/scenario]