#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]
    [standing_anim]
        start_time=0
        [frame]
            duration=400
            image="units/human-loyalists/spearman.png"
        [/frame]
        [frame]
            duration=150
            image="units/human-loyalists/spearman-stand-1.png"
        [/frame]
        [frame]
            duration=150
            image="units/human-loyalists/spearman-stand-2.png"
        [/frame]
        [frame]
            duration=300
            image="units/human-loyalists/spearman-stand-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-stand-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-stand-5.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-stand-6.png"
        [/frame]
    [/standing_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle1.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle3.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/spearman-idle4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2.png"
        [/frame]
    [/idle_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2-1.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/spearman-idle2-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2-4.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/spearman-idle2-5.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/spearman-idle2-6.png"
        [/frame]
    [/idle_anim]
    [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]
    {DEFENSE_ANIM "units/human-loyalists/spearman-defend.png" "units/human-loyalists/spearman-defend-2.png" {SOUND_LIST:HUMAN_HIT} }
    [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]
        start_time=-200
        direction=s
        offset="0~0.5,0.5~0"
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-1.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-2.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-3.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-4.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=25
                image="units/human-loyalists/spearman-attack-s-5.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=25
                image="units/human-loyalists/spearman-attack-s-5.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-6.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-7.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-8.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-9.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-10.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-11.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-12.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-13.png"
        [/frame]
        [frame]
            duration=25
            image="units/human-loyalists/spearman-attack-s-14.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]
        start_time=-224
        direction=se,sw
        offset="0~0.4,0.4~0"
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-1.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-2.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-3.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=32
                image="units/human-loyalists/spearman-attack-se-4.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=32
                image="units/human-loyalists/spearman-attack-se-4.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-5.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-6.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-7.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-8.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-9.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-10.png"
        [/frame]
        [frame]
            duration=32
            image="units/human-loyalists/spearman-attack-se-11.png"
        [/frame]
    [/attack_anim]
[/unit_type]
