#textdomain wesnoth-dw

[scenario]
    name= _ "Getting Help"
    map_data="{campaigns/Dead_Water/maps/Talking_To_Tyegea.map}"

    id=11_Getting_Help
    next_scenario=12_Revenge

    [story]
        [part]
            story= _ "Kai Krellis and his people no longer feared the open ocean, and they made straight for Tyegëa’s island to show her the flaming sword."
        [/part]

        [part]
            background=dead-water-map.png
            show_title=yes
            {OLD_BATTLE 746 673}
            {OLD_JOURNEY 729 657}
            {OLD_JOURNEY 734 635}
            {OLD_BATTLE 732 615}
            {OLD_JOURNEY 708 612}
            {OLD_JOURNEY 681 607}
            {OLD_JOURNEY 654 600}
            {OLD_JOURNEY 647 573}
            {OLD_JOURNEY 640 546}
            {OLD_BATTLE 650 522}
            {OLD_JOURNEY 637 497}
            {OLD_JOURNEY 628 473}
            {OLD_JOURNEY 610 454}
            {OLD_JOURNEY 589 437}
            {OLD_JOURNEY 576 412}
            {OLD_JOURNEY 575 388}
            {OLD_JOURNEY 552 381}
            {OLD_BATTLE 542 361}
            {OLD_JOURNEY 523 370}
            {OLD_JOURNEY 501 381}
            {OLD_JOURNEY 477 391}
            {OLD_BATTLE 455 401}
            {OLD_JOURNEY 434 414}
            {OLD_JOURNEY 414 428}
            {OLD_BATTLE 395 446}
            {OLD_JOURNEY 402 471}
            {OLD_JOURNEY 396 495}
            {OLD_JOURNEY 387 518}
            {OLD_JOURNEY 369 537}
            {OLD_JOURNEY 344 548}
            {OLD_JOURNEY 319 542}
            {OLD_JOURNEY 307 523}
            {OLD_REST 306 497}
            {OLD_JOURNEY 286 479}
            {OLD_JOURNEY 265 467}
            {OLD_JOURNEY 266 444}
            {OLD_JOURNEY 279 424}
            {OLD_JOURNEY 301 413}
            {OLD_JOURNEY 321 399}
            {OLD_JOURNEY 339 378}
            {OLD_JOURNEY 354 356}
            {OLD_JOURNEY 368 334}
            {OLD_JOURNEY 384 315}
            {OLD_JOURNEY 395 293}
            {OLD_JOURNEY 375 278}
            {OLD_JOURNEY 357 264}
            {OLD_BATTLE 355 242}
            {OLD_JOURNEY 346 222}
            {OLD_JOURNEY 357 203}
            {OLD_JOURNEY 374 191}
            {OLD_JOURNEY 386 175}
            {OLD_BATTLE 373 160}
            {NEW_JOURNEY 367 180}
            {NEW_JOURNEY 355 199}
            {NEW_JOURNEY 345 221}
            {NEW_JOURNEY 339 243}
            {NEW_JOURNEY 331 265}
            {NEW_JOURNEY 322 289}
            {NEW_JOURNEY 314 312}
            {NEW_JOURNEY 305 335}
            {NEW_JOURNEY 297 358}
            {NEW_JOURNEY 289 380}
            {NEW_JOURNEY 280 402}
            {NEW_JOURNEY 272 425}
            {NEW_JOURNEY 264 447}
            {NEW_JOURNEY 265 471}
            {NEW_JOURNEY 287 480}
            {NEW_REST 306 497}
        [/part]
    [/story]

    {DAWN}
    {MORNING}
    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}

    turns=-1
    victory_when_enemies_defeated=no

    # wmllint: validate-off
    [side]
        {SIDE_1}
        income=-2
        gold=0
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        user_team_name= _ "Tyegëa and Priestesses"
        team_name=good guys

        id=Tyegea
        name= _ "Tyegëa"
        canrecruit=yes
        type=Mermaid Diviner
        [modifications]
            {TRAIT_LOYAL}
            {TRAIT_DEXTROUS}
        [/modifications]
        [ai]
            ai_algorithm=idle_ai
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 99}

    [event]
        name=prestart

        [music]
            name=elf-land.ogg
        [/music]
        [music]
            name=elvish-theme.ogg
            append=yes
        [/music]

        {RECALL_LOYAL_UNITS}
        # wmllint: recognize Cylanna

        [unit]
            type=Mermaid Priestess
            side=2
            x=4
            y=4
            generate_name=yes
        [/unit]
        [unit]
            type=Mermaid Priestess
            side=2
            x=13
            y=4
            generate_name=yes
        [/unit]
        [unit]
            type=Mermaid Priestess
            side=2
            x=12
            y=8
            generate_name=yes
        [/unit]
        [unit]
            type=Mermaid Priestess
            side=2
            x=9
            y=11
            generate_name=yes
        [/unit]
    [/event]

    [event]
        name=start
        [message]
            speaker=Kai Krellis
            message= _ "We have brought the Flaming Sword. Caladon tried to steal it for himself, but we were able to get it back from him."
        [/message]
        [message]
            speaker=Tyegea
            message= _ "He did not part with it willingly, so he must be dead."
        [/message]
        [message]
            speaker=Kai Krellis
            message= _ "It is as you say."
        [/message]
        [message]
            speaker=Tyegea
            message= _ "No matter. He was a fool. Now, you have done as I asked, grandson, so I will travel with you to your home and help you rid it of restless spirits. My priestesses will come as well, and will be at your disposal."
        [/message]
        # Switch Tyegea to side 1:
        [store_unit]
            [filter]
                id=Tyegea
            [/filter]
            variable=Tyegea_stored
            kill=yes
        [/store_unit]
        [set_variable]
            name=Tyegea_stored.canrecruit
            value=no
        [/set_variable]
        [set_variable]
            name=Tyegea_stored.side
            value=1
        [/set_variable]
        [unstore_unit]
            variable=Tyegea_stored
        [/unstore_unit]
        [unit_overlay]
            x=$Tyegea_stored.x
            y=$Tyegea_stored.y
            image=overlays/loyal-icon.png
        [/unit_overlay]
        [clear_variable]
            name=Tyegea_stored
        [/clear_variable]

        [allow_recruit]
            type=Mermaid Priestess
            side=1
        [/allow_recruit]
        [message]
            speaker=narrator
            message= _ "You may now recruit mermaid priestesses!"
            image=wesnoth-icon.png
        [/message]

        # Change icon on Cylanna to indicate that you can lose her
        # without losing the game. (Though it would still be sad.)
        [store_unit]
            [filter]
                id=Cylanna
            [/filter]
            variable=Cylanna_stored
        [/store_unit]
        [remove_unit_overlay]
            x=$Cylanna_stored.x
            y=$Cylanna_stored.y
            image=misc/hero-icon.png
        [/remove_unit_overlay]
        [unit_overlay]
            x=$Cylanna_stored.x
            y=$Cylanna_stored.y
            image=overlays/loyal-icon.png
        [/unit_overlay]
        [clear_variable]
            name=Cylanna_stored
        [/clear_variable]

#ifdef HARD
        [message]
            speaker=Tyegea
            message= _ "Also, I have a little gold I can bring along."
        [/message]
        [sound]
            name=gold.ogg
        [/sound]
        [gold]
            side=1
            amount=55
        [/gold]
        [message]
            speaker=narrator
            message= _ "You receive 55 gold."
            image=wesnoth-icon.png
        [/message]
#endif
#ifdef NIGHTMARE
        [message]
            speaker=Tyegea
            message= _ "Also, I have a little gold I can bring along."
        [/message]
        [sound]
            name=gold.ogg
        [/sound]
        [gold]
            side=1
            amount=100
        [/gold]
        [message]
            speaker=narrator
            message= _ "You receive 100 gold."
            image=wesnoth-icon.png
        [/message]
#endif
        [endlevel]
            result=victory
            linger_mode=no
            carryover_report=no
            {NEW_GOLD_CARRYOVER 100}
        [/endlevel]
    [/event]
[/scenario]
