#textdomain wesnoth-utbs
[unit_type]
    id=Desert Horseman
    name= _ "Desert Horseman"
    race=elf
    image=units/elves-desert/horseman.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=50
    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=8
    experience=150
    level=2
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=34
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    usage=scout
    description= _ "Trading speed for heavier arms and armament, Elvish Horsemen delight in riding into danger instead of away from it. The open sands are much more suited towards mounted combat than their old forests were, and through the generations the Elves have greatly increased their equestrian skills."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SKIRMISHER}
    die_sound=horse-die.ogg
    # this is a custom elf unit for this campaign
    # to make up for their other weaker mounted units
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=7
        number=5
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=5
        number=3
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM "units/elves-desert/horseman-defend.png" "units/elves-desert/horseman.png" {SOUND_LIST:HORSE_HIT} }
    [movement_anim]
        [frame]
            begin=0
            end=150
            image="units/elves-desert/horseman-moving.png"
        [/frame]
    [/movement_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=-500
                end=-400
                image="units/elves-desert/horseman-ranged-1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-500
                end=-400
                image="units/elves-desert/horseman-ranged-1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-400
            end=-150
            image="units/elves-desert/horseman-ranged-2.png"
        [/frame]
        [frame]
            begin=-150
            end=100
            image="units/elves-desert/horseman-moving.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-desert/horseman.png"
            sound=horse-elf-canter.wav
        [/frame]
        [frame]
            begin=-175
            end=-100
            image="units/elves-desert/horseman-moving.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/horseman-melee.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/horseman-melee.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/elves-desert/horseman-moving.png"
        [/frame]
        [frame]
            begin=175
            end=200
            image="units/elves-desert/horseman.png"
        [/frame]
    [/attack_anim]
[/unit_type]
