#textdomain wesnoth-units
[unit_type]
    id=Master Bowman
    name= _ "Master Bowman"
    race=human
    gender=male
    image="units/human-loyalists/masterbowman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    profile=portraits/humans/master-bowman.png
    hitpoints=67
    movement_type=smallfoot
    movement=5
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    undead_variation=archer
    cost=46
    usage=archer
    description= _ "Master bowmen have reached the zenith of their art, inasmuch as any human is capable. Armed with both a sword, and a great yew bow, these warriors crown battalions of archers with their presence, bringing down many a foe with their well-aimed shots. Their skill with the sword is also not to be discounted; they are easily as good with it as any novice swordsman. Of the many races in the world, only the elves surpass humanity in archery, and their human counterparts have speculated, perhaps in envy, that this is only by dint of age."
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/masterbowman-melee-defend-2.png" "units/human-loyalists/masterbowman-melee-defend-1.png" {SOUND_LIST:HUMAN_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/masterbowman-bow-defend.png" "units/human-loyalists/masterbowman-bow.png" {SOUND_LIST:HUMAN_HIT} ranged}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/master-bowman.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/master-bowman.png"
    [/portrait]
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/sword-human.png
        type=blade
        range=melee
        damage=8
        number=3
    [/attack]
    [attack]
        name=bow
        description=_"longbow"
        type=pierce
        range=ranged
        damage=11
        number=4
    [/attack]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=1000
            image="units/human-loyalists/masterbowman-idle-1.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/masterbowman-idle-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-idle-3.png"
        [/frame]
        [frame]
            duration=200
            image="units/human-loyalists/masterbowman-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-idle-3.png"
        [/frame]
        [frame]
            duration=200
            image="units/human-loyalists/masterbowman-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-idle-3.png"
        [/frame]
        [frame]
            duration=200
            image="units/human-loyalists/masterbowman-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-idle-3.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/masterbowman-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-idle-1.png"
        [/frame]
    [/idle_anim]
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        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/masterbowman-bow.png"
        [/frame]
        [frame]
            duration=75
            image="units/human-loyalists/masterbowman-bow-attack-1.png"
        [/frame]
        [frame]
            duration=75
            image="units/human-loyalists/masterbowman-bow-attack-2.png"
        [/frame]
        [if]
            hits=no
            [frame]
                duration=100
                image="units/human-loyalists/masterbowman-bow-attack-3.png"
                sound=bow-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                duration=100
                image="units/human-loyalists/masterbowman-bow-attack-3.png"
                sound=bow.ogg
            [/frame]
        [/else]
        [frame]
            duration=130
            image="units/human-loyalists/masterbowman-bow-attack-4.png"
        [/frame]
        [frame]
            duration=65
            image="units/human-loyalists/masterbowman-bow-attack-1.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        start_time=-275

        [frame]
            duration=50
            image="units/human-loyalists/masterbowman-melee-defend-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-melee-attack-1.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/human-loyalists/masterbowman-melee-attack-2.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/human-loyalists/masterbowman-melee-attack-2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-melee-attack-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/masterbowman-melee-attack-4.png"
        [/frame]
        [frame]
            duration=50
            image="units/human-loyalists/masterbowman-melee-defend-1.png"
        [/frame]
    [/attack_anim]
[/unit_type]
