#textdomain wesnoth-units
[unit]
    id=Merman Spearman
    name= _ "Merman Spearman"
    race=merman
    image="units/merfolk/spearman.png"
    profile=portraits/Alex_Jarocha-Ernst/merman-hunter.png
    hitpoints=40
    movement_type=swimmer
    movement=6
    experience=85
    level=2
    alignment=lawful
    advanceto=Merman Javelineer
    undead_variation=swimmer
    cost=27
    usage=mixed fighter
    unit_description= _ "Archery is little favored by the mermen, for whom javelinry serves a similar function. Though thrown javelins are of little use under the water, they are extremely effective at the surface, where their weight allows them to plunge several feet below the water while retaining enough momentum to wreak damage. They are also useful in melee, even deep under the surface, which is something that certainly cannot be said of arrows."
    die_sound=mermen-die.ogg
    {DEFENSE_ANIM "units/merfolk/spearman-defend.png" "units/merfolk/spearman.png" mermen-hit.wav }
    [attack]
        name=spear
        description=_"spear"
        type=pierce
        range=melee
        damage=6
        number=2
    [/attack]
    [attack]
        name=spear
        description=_"spear"
        type=pierce
        range=ranged
        damage=6
        number=4
    [/attack]
    [attack_anim]
        [attack_filter]
            name=spear
            range=ranged
        [/attack_filter]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/spear-n.png"
            image_diagonal="projectiles/spear-ne.png"
        [/missile_frame]
        [frame]
            begin=-200
            end=-100
            image="units/merfolk/spearman-attack-se.png"
            sound={SOUND_LIST:THROW}
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-ranged.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-ranged.png"
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=spear
            range=melee
        [/attack_filter]
        direction=s
        [frame]
            begin=-200
            end=-175
            image="units/merfolk/spearman.png"
        [/frame]
        [frame]
            begin=-175
            end=-100
            image="units/merfolk/spearman-attack-se.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-s.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-s.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=50
            end=100
            image="units/merfolk/spearman-attack-se.png"
        [/frame]
        [frame]
            begin=100
            end=150
            image="units/merfolk/spearman.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=spear
            range=melee
        [/attack_filter]
        direction=n
        [frame]
            begin=-200
            end=-175
            image="units/merfolk/spearman.png"
        [/frame]
        [frame]
            begin=-175
            end=-100
            image="units/merfolk/spearman-attack-ne.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-n.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=50
                image="units/merfolk/spearman-attack-n.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=50
            end=100
            image="units/merfolk/spearman-attack-ne.png"
        [/frame]
        [frame]
            begin=100
            end=150
            image="units/merfolk/spearman.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=spear
            range=melee
        [/attack_filter]
        direction=ne,nw
        [frame]
            begin=-200
            end=-150
            image="units/merfolk/spearman.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-150
                end=100
                image="units/merfolk/spearman-attack-ne.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-150
                end=100
                image="units/merfolk/spearman-attack-ne.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/merfolk/spearman.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=spear
            range=melee
        [/attack_filter]
        direction=se,sw
        [frame]
            begin=-200
            end=-150
            image="units/merfolk/spearman.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-150
                end=100
                image="units/merfolk/spearman-attack-se.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-150
                end=100
                image="units/merfolk/spearman-attack-se.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/merfolk/spearman.png"
        [/frame]
    [/attack_anim]
[/unit]
