#textdomain wesnoth-units
[unit_type]
    id=Elvish Sharpshooter
    name= _ "Elvish Sharpshooter"
    race=elf
    gender=male,female
    image="units/elves-wood/sharpshooter.png"
    profile="portraits/elves/marksman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=47
    movement_type=woodland
    movement=6
    experience=150
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=55
    usage=archer
    description= _ "There was a legend of an elf who stopped an arrow by shooting it out of the air with one of his own. It is a testament to the skill of the elves that such a story could be taken seriously. The sharpshooters of the elves have, quite simply, mastered the art of archery."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MARKSMAN}
    die_sound={SOUND_LIST:ELF_HIT}
    # Base image is drawn for the right side.
    [portrait]
        size=400
        side="left"
        mirror="true"
        image="portraits/elves/transparent/marksman.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="false"
        image="portraits/elves/transparent/marksman.png"
    [/portrait]
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/sword-elven.png
        type=blade
        range=melee
        damage=7
        number=2
    [/attack]
    [attack]
        name=longbow
        description=_"longbow"
        icon=attacks/bow-elven-magic.png
        type=pierce
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
        range=ranged
        damage=10
        number=5
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-wood/sharpshooter-sword-defend.png" "units/elves-wood/sharpshooter-sword.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-wood/sharpshooter-bow-defend.png" "units/elves-wood/sharpshooter-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=-445
            end=-380
            image="units/elves-wood/sharpshooter-bow.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-380
                end=-305
                image="units/elves-wood/sharpshooter-bow-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-380
                end=-305
                image="units/elves-wood/sharpshooter-bow-attack1.png"
                sound=bow.ogg
            [/frame]
        [/else]
        [frame]
            begin=-305
            end=-230
            image="units/elves-wood/sharpshooter-bow-attack2.png"
        [/frame]
        [frame]
            begin=-230
            end=-130
            image="units/elves-wood/sharpshooter-bow-attack3.png"
        [/frame]
        [frame]
            begin=-130
            end=0
            image="units/elves-wood/sharpshooter-bow-attack4.png"
        [/frame]
        [frame]
            begin=0
            end=150
            image="units/elves-wood/sharpshooter-bow-attack5.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-wood/sharpshooter-sword.png"
        [/frame]
        [frame]
            begin=-175
            end=-75
            image="units/elves-wood/sharpshooter-sword-1.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-75
                end=100
                image="units/elves-wood/sharpshooter-sword-2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-75
                end=100
                image="units/elves-wood/sharpshooter-sword-2.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/elves-wood/sharpshooter-sword-3.png"
        [/frame]
        [frame]
            begin=175
            end=200
            image="units/elves-wood/sharpshooter-sword.png"
        [/frame]
    [/attack_anim]
    [female]
        name= _ "female^Elvish Sharpshooter"
        gender=female
        image="units/elves-wood/sharpshooter+female.png"
        profile="portraits/elves/marksman+female.png"
        die_sound={SOUND_LIST:ELF_FEMALE_HIT}
        {DEFENSE_ANIM_RANGE "units/elves-wood/sharpshooter+female-sword-defend.png" "units/elves-wood/sharpshooter+female-sword.png" {SOUND_LIST:ELF_FEMALE_HIT} melee}
        {DEFENSE_ANIM_RANGE "units/elves-wood/sharpshooter+female-bow-defend.png" "units/elves-wood/sharpshooter+female-bow.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged}
        [portrait]
            size=400
            side="left"
            mirror="false"
            image="portraits/elves/transparent/marksman+female.png"
        [/portrait]
        [portrait]
            size=400
            side="right"
            mirror="true"
            image="portraits/elves/transparent/marksman+female.png"
        [/portrait]
        [attack_anim]
            [filter_attack]
                name=longbow
            [/filter_attack]
            [frame]
                image="units/elves-wood/sharpshooter+female-bow.png"
            [/frame]
            [if]
                hits=no
                [frame]
                    image="units/elves-wood/sharpshooter+female-bow-attack1.png"
                [/frame]
            [/if]
            [else]
                hits=yes
                [frame]
                    image="units/elves-wood/sharpshooter+female-bow-attack1.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-wood/sharpshooter+female-bow-attack2.png"
            [/frame]
            [frame]
                image="units/elves-wood/sharpshooter+female-bow-attack3.png"
            [/frame]
            [frame]
                image="units/elves-wood/sharpshooter+female-bow-attack4.png"
            [/frame]
            [frame]
                image="units/elves-wood/sharpshooter+female-bow-attack5.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=sword
            [/filter_attack]
            [frame]
                image="units/elves-wood/sharpshooter+female-sword.png"
            [/frame]
            [frame]
                image="units/elves-wood/sharpshooter+female-sword-1.png"
            [/frame]
            [if]
                hits=no
                [frame]
                    image="units/elves-wood/sharpshooter+female-sword-2.png"
                [/frame]
            [/if]
            [else]
                hits=yes
                [frame]
                    image="units/elves-wood/sharpshooter+female-sword-2.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-wood/sharpshooter+female-sword-3.png"
            [/frame]
            [frame]
                image="units/elves-wood/sharpshooter+female-sword.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]
