#textdomain wesnoth-dw

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

    id=11_Getting_Help
    next_scenario=12_Revenge

    [story]
        [part]
            {DW_BIGMAP}
            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]
    [/story]

    {DW_TRACK {JOURNEY_11_NEW} }

    {DEFAULT_SCHEDULE_DAWN}
    turns=unlimited
    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}

        [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=misc/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=misc/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]
