#textdomain wesnoth-units
[unit]
    id=Longbowman
    name= _ "Longbowman"
    race=human
    gender=male
    image="units/human-loyalists/longbowman.png"
    profile="portraits/Pekka_Aikio/human-longbowman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=51
    movement_type=smallfoot
    movement=5
    experience=68
    level=2
    alignment=lawful
    advanceto=Master Bowman
    undead_variation=archer
    cost=26
    usage=archer
    unit_description= _ "Longbows are fearsome weapons, but too difficult for beginning archers to wield. It takes great strength to draw one, and the added range and power it confers remain useless unless one has good aim with the weapon. Longbowmen carry their weapons as a badge of pride, and most bowmen look forward to the day they can begin using one."
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/longbowman-melee-defend-2.png" "units/human-loyalists/longbowman-melee-defend-1.png" {SOUND_LIST:HUMAN_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/longbowman-bow-defend.png" "units/human-loyalists/longbowman-bow.png" {SOUND_LIST:HUMAN_HIT} ranged}
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/sword-human.png
        type=blade
        range=melee
        damage=8
        number=2
    [/attack]
    [attack]
        name=bow
        description=_"bow"
        type=pierce
        range=ranged
        damage=10
        number=3
    [/attack]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
		start_time=0
        [frame]
			duration=1000
            image="units/human-loyalists/longbowman-idle-1.png"
        [/frame]
        [frame]
			duration=400
            image="units/human-loyalists/longbowman-idle-2.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-idle-3.png"
        [/frame]
        [frame]
			duration=200
            image="units/human-loyalists/longbowman-idle-4.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-idle-3.png"
        [/frame]
        [frame]
			duration=200
            image="units/human-loyalists/longbowman-idle-4.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-idle-3.png"
        [/frame]
        [frame]
			duration=200
            image="units/human-loyalists/longbowman-idle-4.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-idle-3.png"
        [/frame]
        [frame]
			duration=400
            image="units/human-loyalists/longbowman-idle-4.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-idle-1.png"
        [/frame]
    [/idle_anim]
    [attack_anim]
        [attack_filter]
            name=bow
        [/attack_filter]
		start_time=-445
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [frame]
			duration=65
            image="units/human-loyalists/longbowman-bow.png"
        [/frame]
        [frame]
			duration=75
            image="units/human-loyalists/longbowman-bow-attack-1.png"
        [/frame]
        [frame]
			duration=75
            image="units/human-loyalists/longbowman-bow-attack-2.png"
        [/frame]
        [if]
            hits=no
            [frame]
				duration=100
                image="units/human-loyalists/longbowman-bow-attack-3.png"
                sound=bow-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
				duration=100
                image="units/human-loyalists/longbowman-bow-attack-3.png"
                sound=bow.ogg
            [/frame]
        [/else]
        [frame]
			duration=130
            image="units/human-loyalists/longbowman-bow-attack-4.png"
        [/frame]
        [frame]
			duration=65
            image="units/human-loyalists/longbowman-bow-attack-1.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=sword
        [/attack_filter]
		start_time=-275
        
		[frame]
			duration=50
            image="units/human-loyalists/longbowman-melee-defend-1.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-melee-attack-1.png"
        [/frame]
        [if]
            hits=yes
            [frame]
				duration=100
                image="units/human-loyalists/longbowman-melee-attack-2.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
				duration=100
                image="units/human-loyalists/longbowman-melee-attack-2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-melee-attack-3.png"
        [/frame]
        [frame]
			duration=100
            image="units/human-loyalists/longbowman-melee-attack-4.png"
        [/frame]
        [frame]
			duration=50
            image="units/human-loyalists/longbowman-melee-defend-1.png"
        [/frame]
    [/attack_anim]
[/unit]
