#textdomain wesnoth-trow
[scenario]
    id=Peoples_in_Decline
    name= _ "Peoples in Decline"
    next_scenario=Rough_Landing
    bonus=yes
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/Peoples_in_Decline.map}"
    {TURNS 39 36 33}
    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC knalgan_theme.ogg}
    {EXTRA_SCENARIO_MUSIC wanderer.ogg}

    {TROW_PEOPLES_IN_DECLINE_STORY}
    {PEOPLES_IN_DECLINE_BIGMAP}

    {TROW_DEATHS}

    [side]
        type=Noble Commander
        id=Prince Haldric
        name= _ "Prince Haldric"
        unrenamable=yes
        side=1
        canrecruit=yes
        gold=200
        controller=human
        team_name=Haldric
        user_team_name=_"Refugees"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        type=Drake Flameheart
        id=Kegrid
        name= _ "Kegrid"
        side=2
        canrecruit=yes
        {GOLD 110 150 190}
        {INCOME 2 4 8}
        team_name=Drake
        user_team_name=_"Drakes"
#ifdef EASY
        recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
        recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Arbiter,Drake Fighter,Drake Warrior
#endif
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,fighter
            aggression=0.75
            {ATTACK_DEPTH 4 5 5}
        [/ai]
    [/side]

    [side]
        type=Drake Flameheart
        id=Gerrick
        name= _ "Gerrick"
        side=3
        canrecruit=yes
        {GOLD 110 150 190}
        {INCOME 2 4 8}
        team_name=Drake
        user_team_name=_"Drakes"

#ifdef EASY
        recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
        recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Flare,Drake Fighter,Drake Warrior
#endif

        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
#ifdef EASY
            recruitment_pattern=scout,fighter,fighter,archer,fighter
#else
            recruitment_pattern=scout,fighter,fighter,archer,fighter,mixed fighter
#endif
            aggression=0.75
            {ATTACK_DEPTH 4 5 5}
        [/ai]
    [/side]

    [side]
        type=Drake Flameheart
        id=Merkush
        name= _ "Merkush"
        side=4
        canrecruit=yes
        {GOLD 110 150 190}
        {INCOME 2 4 8}
        team_name=Drake
        user_team_name=_"Drakes"

#ifdef EASY
        recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
        recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Thrasher,Drake Fighter,Drake Warrior
#endif

        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout,fighter,fighter,archer,fighter
            aggression=0.75
            {ATTACK_DEPTH 4 5 5}
        [/ai]
    [/side]

    [event]
        name=prestart
        {OBJ_TRIDENT_STORM 17 18 (trident)}

        [recall]
            id=Lady Jessene
            x=10
            y=8
        [/recall]
        [recall]
            id=Burin the Lost
            x=11
            y=9
        [/recall]
        [recall]
            id=Sir Ruddry
            x=9
            y=10
        [/recall]

        [recall]
            id=Sir Ladoc
            x=9
            y=10
        [/recall]

        [recall]
            id=Minister Edren
            x=10
            y=10
        [/recall]

        [recall]
            id=Lord Typhon
            x=9
            y=9
        [/recall]

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

        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Prince Haldric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Lady Jessene"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Lord Typhon"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/event]

    #	[event]
    #		name=moveto
    #		[filter]
    #			side=1
    #			x=17
    #			y=18
    #		[/filter]
    #
    #		[removeitem]
    #		[/removeitem]
    #	[/event]

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "After some time at sea an island is spotted. The Eldaric docks at a crude port that appears to be deserted."
            image=wesnoth-icon.png
        [/message]
        [message]
            speaker=Burin the Lost
            message= _ "Land! Land! Bless the Lords of Light!"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "This is the Elder Prince's island all right. We had a heck of a time pacifying the Drakes who live here. Oh my, it looks like they've rearmed!"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "We come in peace. We only seek to re-provision our ships."
        [/message]
        [message]
            speaker=Lady Jessene
            message={WHISPER _"I don't think diplomacy is going to work."}
        [/message]
        [message]
            speaker=Gerrick
            # wmllint: local spelling Ssso humansss usss Morogor
            message= _ "Ssso humansss, you've come to trouble usss again. Prepare to die! For the glory of the Lords of Morogor!"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "(whispered) Do I need to say, 'I told you so'?"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=17
            y=18
        [/filter]

        {VARIABLE_OP xx1 random 14..19}
        {VARIABLE_OP yy1 random 16..19}

        {NAMED_LOYAL_UNIT 4 (Sea Serpent) $xx1 $yy1 (Bitey the Serpent) ( _ "Bitey the Serpent")}
        # wmllint: recognize Bitey The Sepent

        [message]
            speaker=unit
            message= _ "Look out, a serpent has emerged from the deep."
        [/message]

        [scroll_to_unit]
            id=Bitey the Serpent
            x=$xx1
            y=$yy1
        [/scroll_to_unit]

        {CLEAR_VARIABLE xx1}
        {CLEAR_VARIABLE yy1}
    [/event]

    [event]
        name=enemies defeated
        [message]
            speaker=Prince Haldric
            message= _ "Well, it looks like their warriors have given up the fight. We should be able to re-provision the ships now."
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "The nice thing is, they'll go back to guarding this island after we're gone for a while. It'll make a good way of preventing others from following us."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "This island is slowly sinking. Hmm, I wonder what they'll do when it gets too small for them?"
        [/message]
        [message]
            speaker=Lady Jessene
            message= _ "They seem rather intelligent. They're certainly belligerent and numerous. I'm sure they'll eventually evacuate. Just like us right now."
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "I don't find that thought very comforting."
        [/message]
        [move_unit_fake]
            type=Dread Bat
            side=4
            x=3,3,4
            y=1,2,2
        [/move_unit_fake]

        {LIVING_INTEL (Dread Bat) (Familiar) ( _ "Familiar") "portraits/familiar.png" 4 4 2}
        # wmllint: recognize Familiar
        # wmllint: directory spelling Neep
        [message]
            speaker=Familiar
            image="portraits/familiar.png"
            message= _ "Neep! Neep!"
        [/message]

        [kill]
            id=Familiar
        [/kill]

        [move_unit_fake]
            type=Dread Bat
            side=4
            x=4,3,2,1
            y=2,3,2,2
        [/move_unit_fake]

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

    [event]
        name=time over
        [message]
            speaker=Lady Jessene
            message= _ "The fleet is starving, we'll never pacify this island before we all die!"
        [/message]
    [/event]
[/scenario]
