#textdomain wesnoth-dw

[scenario]
    name= _ "Getting Help"
    map_file=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 OVERLAY=""}
            {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:
        [modify_unit]
            [filter]
                id=Tyegea
            [/filter]
            side=1
            canrecruit=no
        [/modify_unit]
        ## TODO: im not sure what happens here, why is he getting the loyal overlay but not the real trait?
        [unit_overlay]
            x=$Tyegea_stored.x
            y=$Tyegea_stored.y
            image=misc/loyal-icon.png
        [/unit_overlay]

        [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.)
        [remove_trait]
            id=Cylanna
            trait_id="loyal"
        [/remove_trait]
        [modify_unit]
            [filter]
                id=Cylanna
            [/filter]
            {TRAIT_LOYAL}
        [/modify_unit]

#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
            replay_save=no
            {NEW_GOLD_CARRYOVER 100}
        [/endlevel]
    [/event]
[/scenario]
