#textdomain wesnoth-units
[unit_type]
    id=Spearman
    name= _ "Spearman"
    # wmllint: general spelling spearmen
    race=human
    image="units/human-loyalists/spearman.png"
    ellipse="misc/ellipse"
    profile="portraits/humans/spearman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=36
    movement_type=smallfoot
    movement=5
    experience=42
    level=1
    alignment=lawful
    advances_to=Swordsman,Pikeman,Javelineer
    cost=14
    usage=fighter
    description= _ "Swords are, for many, an expensive luxury, and one which peasants can ill afford. Spears are much easier to make and will do well even without a spearhead, though most can afford one. Clad in leather armor, and often armed with a shield and a few javelins, spearmen are the staple of most armies, often thrown into the front lines with only the most basic training."+{SPECIAL_NOTES}+{SPECIAL_NOTES_FIRSTSTRIKE}
    die_sound={SOUND_LIST:HUMAN_DIE}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/spearman.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/spearman.png"
    [/portrait]
    [death]
        [frame]
            begin=0
            end=125
            image="units/human-loyalists/spearman-death1.png"
        [/frame]
        [frame]
            begin=125
            end=250
            image="units/human-loyalists/spearman-death2.png"
        [/frame]
        [frame]
            begin=250
            end=375
            image="units/human-loyalists/spearman-death3.png"
        [/frame]
        [frame]
            begin=375
            end=500
            image="units/human-loyalists/spearman-death4.png"
        [/frame]
    [/death]
    [defend]
        [frame]
            begin=-100
            end=-90
            image="units/human-loyalists/spearman-defend-2.png"
        [/frame]
        [frame]
            begin=-90
            end=90
            image="units/human-loyalists/spearman-defend.png"
        [/frame]
        [frame]
            begin=90
            end=100
            image="units/human-loyalists/spearman-defend-2.png"
        [/frame]
    [/defend]
    [attack]
        name=spear
        description=_"spear"
        type=pierce
        range=melee
        damage=7
        number=3
        icon=attacks/spear.png
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=javelin
        description=_"javelin"
        icon=attacks/javelin-human.png
        type=pierce
        range=ranged
        damage=6
        number=1
    [/attack]
    [attack_anim]
        [filter_attack]
            name=javelin
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/spear-n.png"
            image_diagonal="projectiles/spear-ne.png"
        [/missile_frame]
        [frame]
            begin=-250
            end=-150
            image="units/human-loyalists/spearman-death1.png"
            sound={SOUND_LIST:THROW}
        [/frame]
        [frame]
            begin=-150
            end=-100
            image="units/human-loyalists/spearman-attack-ranged.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=-50
                image="units/human-loyalists/spearman-attack-ranged.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=-50
                image="units/human-loyalists/spearman-attack-ranged.png"
            [/frame]
        [/else]
        [frame]
            begin=-50
            end=50
            image="units/human-loyalists/spearman-attack-ranged2.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=s
        [frame]
            begin=-200
            end=-150
            image="units/human-loyalists/spearman.png"
        [/frame]
        [frame]
            begin=-150
            end=-50
            image="units/human-loyalists/spearman-attack-s-1.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-50
                end=100
                image="units/human-loyalists/spearman-attack-s-2.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-50
                end=100
                image="units/human-loyalists/spearman-attack-s-2.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/human-loyalists/spearman-attack-s-1.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=n
        [frame]
            begin=-200
            end=-100
            image="units/human-loyalists/spearman.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack-n.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack-n.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/human-loyalists/spearman.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=ne,nw
        [frame]
            begin=-200
            end=-100
            image="units/human-loyalists/spearman.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack-ne.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack-ne.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/human-loyalists/spearman.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=se,sw
        [frame]
            begin=-200
            end=-100
            image="units/human-loyalists/spearman.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/spearman-attack.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/human-loyalists/spearman.png"
        [/frame]
    [/attack_anim]
[/unit_type]
