#textdomain wesnoth-utbs
[unit_type]
    id=Desert Marksman
    name= _ "Desert Marksman"
    race=elf
    image=units/elves-desert/marksman.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=37
    movement_type=woodland
    #desert elves move fast across the sands, but are not used to forests
    #they are also a bit faster in caves
    [movement_costs]
        sand=1
        forest=2
        cave=2
        frozen=3
    [/movement_costs]
    [defense]
        sand=40
        forest=50
    [/defense]
    movement=6
    experience=90
    level=2
    alignment=lawful
    advances_to=Desert Sharpshooter
    cost=60
    usage=archer
    description= _ "Desert Marksman are expert in use of the bow. Though their bows and arrows are not as fine as those of their ancestors, they continue to hone their skill. This great skill with the bow compensates for their lack of skill in melee combat."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MARKSMAN}
    die_sound={SOUND_LIST:ELF_HIT}
    # melee attack increased from 6-2 to 7-2
    # ranged attack decreased from 9-4 to 8-4
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=7
        number=2
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=longbow
        description= _"longbow"
        type=pierce
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
        range=ranged
        damage=8
        number=4
        icon=attacks/bow-elven-magic.png
    [/attack]
    [death]
        [frame]
            begin=0
            end=160
            image="units/elves-desert/marksman-die-1.png"
        [/frame]
        [frame]
            begin=160
            end=400
            image="units/elves-desert/marksman-die-2.png"
        [/frame]
        [frame]
            begin=400
            end=580
            image="units/elves-desert/marksman-die-3.png"
        [/frame]
        [frame]
            begin=580
            end=780
            image="units/elves-desert/marksman-die-4.png"
        [/frame]
        [frame]
            begin=780
            end=1000
            image="units/elves-desert/marksman-die-5.png"
        [/frame]
    [/death]
    {DEFENSE_ANIM_RANGE "units/elves-desert/marksman-sword-defend.png" "units/elves-desert/marksman-sword.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-desert/marksman-bow-defend.png" "units/elves-desert/marksman-bow.png" {SOUND_LIST:ELF_HIT} ranged }
    [attack_anim]
        [filter_attack]
            name=longbow
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [frame]
            begin=-475
            end=-400
            image="units/elves-desert/marksman-bow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-400
                end=-325
                image="units/elves-desert/marksman-bow-attack1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-400
                end=-325
                image="units/elves-desert/marksman-bow-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-325
            end=-250
            image="units/elves-desert/marksman-bow-attack2.png"
        [/frame]
        [frame]
            begin=-250
            end=-150
            image="units/elves-desert/marksman-bow-attack3.png"
        [/frame]
        [frame]
            begin=-150
            end=0
            image="units/elves-desert/marksman-bow-attack4.png"
        [/frame]
        [frame]
            begin=0
            end=75
            image="units/elves-desert/marksman-bow.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-desert/marksman-sword.png"
        [/frame]
        [frame]
            begin=-175
            end=-75
            image="units/elves-desert/marksman-sword-1.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-75
                end=100
                image="units/elves-desert/marksman-sword-2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-75
                end=100
                image="units/elves-desert/marksman-sword-2.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/elves-desert/marksman-sword-3.png"
        [/frame]
        [frame]
            begin=175
            end=200
            image="units/elves-desert/marksman-sword.png"
        [/frame]
    [/attack_anim]
    [female]
        name= _ "female^Desert Marksman"
        gender=female
        image="units/elves-desert/marksman+female.png"
        die_sound={SOUND_LIST:ELF_FEMALE_HIT}
        {DEFENSE_ANIM_RANGE "units/elves-desert/marksman+female-sword-defend.png" "units/elves-desert/marksman+female-sword.png" {SOUND_LIST:ELF_FEMALE_HIT} melee}
        {DEFENSE_ANIM_RANGE "units/elves-desert/marksman+female-bow-defend.png" "units/elves-desert/marksman+female-bow.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged}
        [death]
            [frame]
                image="units/elves-desert/marksman+female-die-1.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-die-2.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-die-3.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman-die-4.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman-die-5.png"
            [/frame]
        [/death]
        [attack_anim]
            [filter_attack]
                name=longbow
            [/filter_attack]
            [frame]
                image="units/elves-desert/marksman+female-bow.png"
            [/frame]
            [if]
                [frame]
                    image="units/elves-desert/marksman+female-bow-attack1.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/elves-desert/marksman+female-bow-attack1.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-desert/marksman+female-bow-attack2.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-bow-attack3.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-bow-attack4.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-bow.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=sword
            [/filter_attack]
            [frame]
                image="units/elves-desert/marksman+female-sword.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-sword-1.png"
            [/frame]
            [if]
                hits=no
                [frame]
                    image="units/elves-desert/marksman+female-sword-2.png"
                [/frame]
            [/if]
            [else]
                hits=yes
                [frame]
                    image="units/elves-desert/marksman+female-sword-2.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-desert/marksman+female-sword-3.png"
            [/frame]
            [frame]
                image="units/elves-desert/marksman+female-sword.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]
