#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=100
    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_start_time=0
        [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/javelineer-attack-ranged-[1~4].png:[100*3,50]"
        [/frame]
        attack_sound_start_time=-50
        [attack_sound_frame]
            duration=100
            sound={SOUND_LIST:THROW}
        [/attack_sound_frame]
        [if]
            hits=yes
            [attack_sound_frame]
                sound=spear.ogg
            [/attack_sound_frame]
        [/if]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        start_time=-300
        [frame]
            image="units/human-loyalists/javelineer-attack-melee-[1~3].png:[100*2,200]"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
        [frame]
            image="units/human-loyalists/javelineer-attack-ranged-1.png:75"
        [/frame]
        [frame]
            image="units/human-loyalists/javelineer-attack-melee-1.png:75"
        [/frame]
        [frame]
            image="units/human-loyalists/javelineer.png:50"
        [/frame]
    [/attack_anim]
[/unit_type]
