#textdomain wesnoth-units
[unit_type]
    id=Spearman
    name= _ "Spearman"
    # wmllint: general spelling spearmen
    race=human
    image="units/human-loyalists/spearman.png"
    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
        [if]
            direction=s,se,sw
            [frame]
                image="units/human-loyalists/spearman.png:400"
            [/frame]
            [frame]
                image="units/human-loyalists/spearman-stand-s-[1~6].png:[150*2,300,100*3]"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/human-loyalists/spearman-n.png:400"
            [/frame]
            [frame]
                image="units/human-loyalists/spearman-stand-n-[1~3,2~1].png:[150*2,400,150*2]"
            [/frame]
        [/else]
    [/standing_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        direction=s,se,sw
        [frame]
            image="units/human-loyalists/spearman-idle[1~4,3,2].png:[100*3,400,100*2]"
        [/frame]
    [/idle_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        direction=s,se,sw
        [frame]
            image="units/human-loyalists/spearman-idle2-[1~6].png:[100*4,400,100]"
        [/frame]
    [/idle_anim]
    [death]
        start_time=0
        [frame]
            image="units/human-loyalists/spearman-death[1~4].png:125"
        [/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_start_time=-150
        [missile_frame]
            duration=150
            image="projectiles/spear-n.png"
            image_diagonal="projectiles/spear-ne.png"
        [/missile_frame]
        start_time=-250
        [frame]
            image="units/human-loyalists/spearman-death1.png:100"
        [/frame]
        [frame]
            image="units/human-loyalists/spearman-attack-ranged.png:50"
            sound={SOUND_LIST:THROW}
        [/frame]
        [frame]
            image="units/human-loyalists/spearman-attack-[ranged,ranged2].png:[50,100]"
        [/frame]
        {SOUND:HIT spear.ogg 0}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        start_time=-250
        direction=s
        offset="0~0.5,0.5~0"
        [frame]
            image="units/human-loyalists/spearman-attack-s-[1~14].png:25"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=n
        start_time=-228
        offset="0~0.4,0.4~0"
        [frame]
            image="units/human-loyalists/spearman-attack-n-[1~12].png:32"
        [/frame]

        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -64}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        direction=ne,nw
        start_time=-200
        [frame]
            image="units/human-loyalists/spearman.png:100"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
        [frame]
            image="units/human-loyalists/spearman-attack-ne.png:200"
        [/frame]
        [frame]
            image="units/human-loyalists/spearman.png:50"
        [/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]
            image="units/human-loyalists/spearman-attack-se-[1~12].png:32"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -64}
    [/attack_anim]
[/unit_type]
