#textdomain wesnoth-utbs

[unit_type]
    id=Desert Scout
    name= _ "Desert Scout"
    image=units/elves-desert/scout.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    race=elf
    hitpoints=32
    movement_type=woodland
    #desert elves move fast across the sands, but are not used to forests
    [movement_costs]
        sand=1
        forest=2
        frozen=4
    [/movement_costs]
    #mostly like a foot Elf, but they are bad at defending in villages
    [defense]
        village=60
        sand=40
        forest=50
    [/defense]
    #they are weak against piercing attacks
    [resistance]
        pierce=120
    [/resistance]
    movement=9
    experience=37
    level=1
    alignment=lawful
    advances_to=Desert Rider,Desert Horseman
    cost=18
    usage=scout
    description= _ "Desert Scouts move swiftly across the sands. Their skill on horseback is virtually unmatched, although they do lack power in combat."
    die_sound=horse-die.ogg
    # melee attack increased from 4-3 to 5-3
    # ranged attack decreased from 6-2 to 5-2
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=5
        number=3
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=5
        number=2
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM "units/elves-desert/scout-defend.png" "units/elves-desert/scout.png" {SOUND_LIST:HORSE_HIT} }
    [movement_anim]
        [frame]
            begin=0
            end=150
            image="units/elves-desert/scout-moving.png"
        [/frame]
    [/movement_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-1.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-2.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-3.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-4.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-5.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-6.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-7.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-8.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/scout-idle-7.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/scout-idle-8.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-7.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/scout-idle-8.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-9.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-10.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-11.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-12.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-13.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-14.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-15.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/scout-idle-16.png"
        [/frame]
    [/idle_anim]
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [if]
            hits=yes
            [frame]
                begin=-400
                end=-300
                image="units/elves-desert/scout-attack1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-400
                end=-300
                image="units/elves-desert/scout-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-300
            end=-50
            image="units/elves-desert/scout-attack2.png"
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/elves-desert/scout-moving.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-desert/scout.png"
            sound=horse-elf-canter.wav
        [/frame]
        [frame]
            begin=-175
            end=-100
            image="units/elves-desert/scout-moving.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/scout-attack.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/scout-attack.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/elves-desert/scout-moving.png"
        [/frame]
        [frame]
            begin=200
            end=250
            image="units/elves-desert/scout.png"
        [/frame]
    [/attack_anim]
[/unit_type]

#define DESERT_SCOUT_VARIANT SUFFIX_NUMBER COST
    [unit_type]
        id=Desert Scout{SUFFIX_NUMBER}
        [base_unit]
            id=Desert Scout
        [/base_unit]
        hide_help=true
        do_not_list=true
        cost={COST}
    [/unit_type]
#enddef

{DESERT_SCOUT_VARIANT  2 19}
{DESERT_SCOUT_VARIANT  3 20}
{DESERT_SCOUT_VARIANT  4 21}
{DESERT_SCOUT_VARIANT  5 22}
{DESERT_SCOUT_VARIANT  6 23}
{DESERT_SCOUT_VARIANT  7 24}
{DESERT_SCOUT_VARIANT  8 25}
{DESERT_SCOUT_VARIANT  9 26}
{DESERT_SCOUT_VARIANT 10 27}
{DESERT_SCOUT_VARIANT 11 28}

#undef DESERT_SCOUT_VARIANT
