#textdomain wesnoth-trow
[unit_type]
    id=Noble Commander
    name= _ "Noble Commander"
    race=human
    gender=male
    image="units/noble-commander.png"
    hitpoints=48
    [abilities]
        {ABILITY_LEADERSHIP}
    [/abilities]
    movement_type=smallfoot
    movement=6
    experience=90
    level=2
    alignment=lawful
    advances_to=Noble Lord
    cost=38
    usage=mixed fighter
    description= _ "The rank of a noble Commander is held by those who lead battle groups into combat. Possessing leadership skills, they give lower-level units in adjacent hexes improved performance in combat. Commanders are best skilled with the sword, although they also carry a bow to use when necessary. If the Commander is lost, so is the battle."+{SPECIAL_NOTES}+{SPECIAL_NOTES_LEADERSHIP}
    die_sound={SOUND_LIST:HUMAN_DIE}

    # first defense animation is selected for sword and ruby of fire, second is used for bow only
    {DEFENSE_ANIM "units/noble-commander-defend.png" "units/noble-commander.png" {SOUND_LIST:HUMAN_HIT}}
    {DEFENSE_ANIM_FILTERED "units/noble-commander-bow-defend.png" "units/noble-commander-bow.png" {SOUND_LIST:HUMAN_HIT} (
        [filter_second_attack]
            name=bow
        [/filter_second_attack]
    )}

    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        type=blade
        range=melee
        damage=8
        number=4
        icon=attacks/sword-human.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        #textdomain wesnoth-trow
        type=pierce
        range=ranged
        damage=6
        number=3
        icon=attacks/bow.png
    [/attack]
    [leading_anim]
        start_time=-150
        [frame]
            image="units/noble-commander-leading.png:300"
        [/frame]
    [/leading_anim]
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        start_time=-350
        [frame]
            image="units/noble-commander-bow-[1~3].png:[50*2,150]"
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -250}
        [frame]
            image="units/noble-commander-bow.png:100"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        start_time=-200
        [frame]
            image="units/noble-commander.png:100"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
        [frame]
            image="units/noble-commander-sword-1.png:200"
        [/frame]
        [frame]
            image="units/noble-commander.png:75"
        [/frame]
    [/attack_anim]
[/unit_type]
