#textdomain wesnoth-low
[scenario]
    id=04_Elvish_Treasury
    name= _ "The Elvish Treasury"
    {LOW_MAP 04_Elvish_Treasury.map}
    {TURNS 35 30 25}

    {DEFAULT_SCHEDULE}

    {STARTING_VILLAGES_ALL 2}
    {STARTING_VILLAGES 3 14}

    {INTRO_AND_SCENARIO_MUSIC frantic.ogg vengeful.ogg}
    {EXTRA_SCENARIO_MUSIC knalgan_theme.ogg}
    {EXTRA_SCENARIO_MUSIC knolls.ogg}

    next_scenario=05_Saurian_Treasury
    [story]
        [part]
            story= _ "Kalenz and his forces raced to relieve the siege of the Elvish Treasury..."
            delay=4000
            {TO_ELVISH_TREASURY}
        [/part]
        [part]
            {TO_ELVISH_TREASURY_BATTLE}
            show_title=yes
        [/part]
    [/story]

    #wmllint: validate-off
    [side]
        {KALENZ}
        # wmllint: recognize Kalenz
        recruit={ELVES}
    [/side]
    #wmllint: validate-on
    [side]
        type=Saurian Ambusher
        id=Shurm
        name= _ "Shurm"
        side=2
        canrecruit=yes
        {GOLD 190 280 340}
        {INCOME 4 8 12}
        team_name=Liz
#ifdef EASY
        recruit=Saurian Skirmisher, Saurian Augur
#else
        recruit=Saurian Skirmisher, Saurian Augur,  Saurian Ambusher
#endif
        [ai]
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout, scout, healer
            aggression=0.75
        [/ai]
    [/side]

    [side]
        type=Saurian Ambusher
        id=Trigr
        name= _ "Trigr"
        side=3
        canrecruit=yes
        {GOLD 190 280 350}
        {INCOME 4 8 12}
        team_name=Liz
#ifdef EASY
        recruit=Saurian Skirmisher, Saurian Augur
#else
        recruit=Saurian Skirmisher, Saurian Augur, Saurian Ambusher
#endif
        [ai]
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=scout, scout, healer
        [/ai]
    [/side]

    [item]
        x=13
        y=11
        image=scenery/temple1.png
    [/item]
    [item]
        x=11
        y=11
        image=units/elves-wood/shyde.png~RC(magenta>red)
    [/item]
    [item]
        x=11
        y=11
        image=items/cage.png
    [/item]

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Landar"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Cleodil"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
        [/objectives]

        {RECALL_LOYALS}
        # wmllint: recognize Landar
        # wmllint: recognize Huraldur
        {CHECK_LANDAR}
    [/event]

    # wmllint: directory spelling dastone
    [event]
        name=start

        [message]
            id=Kalenz
            message= _ "It seems that we are too late. The Treasury has fallen to the Saurians...."
        [/message]
        [message]
            id=Huraldur
            message= _ "And I see the remains of the garrison has been taken prisoner."
        [/message]
        [message]
            id=Kalenz
            message= _ "We must free them and make these saurians pay. Attack and leave no one alive!"
        [/message]
        [message]
            id=Shurm
            message= _ "More elves are coming! Too late, we've taken all your gold and we'll get more gold from the orcs for helping them out! "
        [/message]
        [message]
            id=Kalenz
            message= _ "You will not live to enjoy it!"
        [/message]
    [/event]

    [event]
        name=free cleodil

        {INCIDENTAL_MUSIC elvish-theme.ogg}

        [unit]
            {CLEODIL}
            # wmllint: recognize Cleodil
            x=11
            y=11
        [/unit]
        [unit]
            id=Arkildur
            name= _ "Arkildur"
            side=1
            type=Elvish Fighter
            x=11
            y=11
            [modifications]
                {TRAIT_STRONG}
                {TRAIT_INTELLIGENT}
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            id=Tameril-Isimeril
            name= _ "Tameril-Isimeril"
            side=1
            type=Elvish Archer
            x=11
            y=11
            [modifications]
                {TRAIT_DEXTROUS}
                {TRAIT_RESILIENT}
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
#ifdef EASY
        [unit]
            id=Laril
            name= _ "Laril"
            side=1
            type=Elvish Archer
            x=11
            y=11
            [modifications]
                {TRAIT_DEXTROUS}
                {TRAIT_QUICK}
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
#endif
        [message]
            id=Cleodil
            message= _ "We are free! My lord Kalenz, from this day forward we are your sworn followers. And there is that which you should hear about the treasure."
        [/message]
    [/event]

    [event]
        name=moveto

        [removeitem]
        [/removeitem]

        [filter]
            side=1
            x=11
            y=11
        [/filter]

        [fire_event]
            name=free cleodil
        [/fire_event]
    [/event]

    [event]
        name=victory

        [if]
            [not]
                [have_unit]
                    id=Cleodil
                [/have_unit]
            [/not]

            [then]
                [message]
                    id=Kalenz
                    message= _ "Without their leaders, the saurians flee in panic. Free the garrison!"
                [/message]

                [fire_event]
                    name=free cleodil
                [/fire_event]
            [/then]
        [/if]

        [message]
            id=Kalenz
            message= _ "We have defeated the saurians and freed the garrison, but our gold is gone. "
        [/message]
        [message]
            id=Cleodil
            message= _ "The saurians have looted our treasury. They were particularly interested in finding something they called 'dastone'. I am sorry, my lord Kalenz, I could not understand their distorted speech very well."
        [/message]
        [message]
            type=Elvish Archer,Elvish Scout,Elvish Shaman,Elvish Fighter,Elvish Marshal,Elvish Champion,Elvish Avenger,Elvish Sharpshooter
            message= _ "The war with the Orcs goes poorly. We are going to need that gold back!"
        [/message]
        [message]
            id=Kalenz
            message= _ "We will hunt down those saurians and retrieve our gold. More, we must teach them that it is lethal folly to raid us, else they will plague us like rats. Let's hurry. "
        [/message]
    [/event]

    {@campaigns/Legend_of_Wesmere/utils/deaths.cfg}
[/scenario]
