#textdomain wesnoth-units
[unit_type]
    id=General
    name= _ "General"
    race=human
    image="units/human-loyalists/general.png"
    profile="portraits/humans/general.png"
    [leading_anim]
        [frame]
            begin=-150
            end=150
            image="units/human-loyalists/general-leading.png"
        [/frame]
    [/leading_anim]
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=50
    movement_type=smallfoot
    movement=6
    experience=180
    level=3
    alignment=lawful
#ifdef DISABLE_GRAND_MARSHAL
    advances_to=null
    {AMLA_DEFAULT}
#else
    advances_to=Grand Marshal
#endif
    cost=54
    usage=fighter
    description= _ "As the leaders of their armies, Generals are responsible for the protection of large or important areas in the kingdoms to which they have sworn fealty."+{SPECIAL_NOTES}+{SPECIAL_NOTES_LEADERSHIP}
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM_RANGE "units/human-loyalists/general-defend-2.png" "units/human-loyalists/general-defend-1.png" {SOUND_LIST:HUMAN_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/human-loyalists/general-crossbow-defend.png" "units/human-loyalists/general-crossbow.png" {SOUND_LIST:HUMAN_HIT} ranged }
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/general.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/general.png"
    [/portrait]
    [resistance]
        blade=90
        pierce=90
        impact=90
    [/resistance]
    [abilities]
        {ABILITY_LEADERSHIP_LEVEL_3}
    [/abilities]
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/greatsword-human.png
        type=blade
        range=melee
        damage=9
        number=4
    [/attack]
    [attack]
        name=crossbow
        description=_"crossbow"
        icon=attacks/crossbow-human.png
        type=pierce
        range=ranged
        damage=7
        number=3
    [/attack]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=100
            image="units/human-loyalists/general-idle-1.png"
        [/frame]
        [frame]
            duration=300
            image="units/human-loyalists/general-idle-2.png"
        [/frame]
        [frame]
            duration=500
            image="units/human-loyalists/general-idle-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/general-idle-4.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/general-idle-6.png"
        [/frame]
        [frame]
            duration=400
            image="units/human-loyalists/general-idle-4.png"
        [/frame]
        [frame]
            duration=300
            image="units/human-loyalists/general-idle-5.png"
        [/frame]
        [frame]
            duration=500
            image="units/human-loyalists/general-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/general-idle-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/general-idle-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-loyalists/general-idle-1.png"
        [/frame]
    [/idle_anim]
    [attack_anim]
        [filter_attack]
            name=crossbow
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [frame]
            begin=-400
            end=-300
            image="units/human-loyalists/general-crossbow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-300
                end=-150
                image="units/human-loyalists/general-crossbow-attack1.png"
                sound=crossbow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-300
                end=-150
                image="units/human-loyalists/general-crossbow-attack1.png"
                sound=crossbow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-150
            end=0
            image="units/human-loyalists/general-crossbow-attack2.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-300
            end=-250
            image="units/human-loyalists/general.png"
            offset=0.0~0.1
        [/frame]
        [frame]
            begin=-250
            end=-200
            image="units/human-loyalists/general-defend-1.png"
            offset=0.1~0.15
        [/frame]
        [frame]
            begin=-200
            end=-100
            image="units/human-loyalists/general-attack-sword1.png"
            offset=0.15~0.35
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=-25
                image="units/human-loyalists/general-attack-sword2.png"
                sound={SOUND_LIST:SWORD_SWISH}
                offset=0.35~0.45
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=-25
                image="units/human-loyalists/general-attack-sword2.png"
                sound={SOUND_LIST:MISS}
                offset=0.35~0.45
            [/frame]
        [/else]
        [frame]
            begin=-25
            end=75
            image="units/human-loyalists/general-attack-sword3.png"
            offset=0.45~0.5
        [/frame]
        [frame]
            begin=75
            end=95
            image="units/human-loyalists/general-attack-sword4.png"
            offset=0.5
        [/frame]
        [frame]
            begin=95
            end=125
            image="units/human-loyalists/general-attack-sword4.png"
            offset=0.5~0.4
        [/frame]
        [frame]
            begin=125
            end=200
            image="units/human-loyalists/general-attack-sword5.png"
            offset=0.4~0.2
        [/frame]
        [frame]
            begin=150
            end=225
            image="units/human-loyalists/general.png"
            offset=0.2~0.0
        [/frame]
    [/attack_anim]
[/unit_type]
