#textdomain wesnoth-units
[unit_type]
    id=Javelineer
    name= _ "Javelineer"
    race=human
    image="units/human-loyalists/javelineer.png"
    profile="portraits/humans/javelineer.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=48
    movement_type=smallfoot
    movement=5
    experience=150
    level=2
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=25
    usage=fighter
    description= _ "Spearmen almost always equip themselves with a few javelins, to harry, if not kill, enemies at range. Some, however, take to them rather well, finding that they have a natural talent in their use. Javelineers are a valuable asset to an army, being able to supplement their skill in melee combat with an ability to handle distant foes. They can hurl javelins into enemy ranks from a distance, often without retribution, and still hold their ground in melee."+{SPECIAL_NOTES}+{SPECIAL_NOTES_FIRSTSTRIKE}
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/javelineer-defend.png" "units/human-loyalists/javelineer.png" {SOUND_LIST:HUMAN_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/javelineer-defend-ranged.png" "units/human-loyalists/javelineer-attack-ranged-1.png" {SOUND_LIST:HUMAN_HIT} ranged}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/javelineer.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/javelineer.png"
    [/portrait]
    [resistance]
        pierce=60
    [/resistance]
    [attack]
        name=spear
        description=_"spear"
        type=pierce
        range=melee
        damage=8
        number=3
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=javelin
        description=_"javelin"
        icon=attacks/javelin-human.png
        type=pierce
        range=ranged
        damage=11
        number=2
    [/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/javelineer-attack-ranged-1.png"
        [/frame]
        [frame]
            begin=-150
            end=-50
            image="units/human-loyalists/javelineer-attack-ranged-2.png"
            sound={SOUND_LIST:THROW}
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-50
                end=50
                image="units/human-loyalists/javelineer-attack-ranged-3.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-50
                end=50
                image="units/human-loyalists/javelineer-attack-ranged-3.png"
            [/frame]
        [/else]
        [frame]
            begin=50
            end=100
            image="units/human-loyalists/javelineer-attack-ranged-4.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        [frame]
            begin=-300
            end=-200
            image="units/human-loyalists/javelineer-attack-melee-1.png"
        [/frame]
        [frame]
            begin=-200
            end=-100
            image="units/human-loyalists/javelineer-attack-melee-2.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/javelineer-attack-melee-3.png"
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/human-loyalists/javelineer-attack-melee-3.png"
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/human-loyalists/javelineer-attack-ranged-1.png"
        [/frame]
        [frame]
            begin=175
            end=250
            image="units/human-loyalists/javelineer-attack-melee-1.png"
        [/frame]
        [frame]
            begin=250
            end=300
            image="units/human-loyalists/javelineer.png"
        [/frame]
    [/attack_anim]
[/unit_type]
