#textdomain wesnoth-units
[unit_type]
    id=Cavalier
    name= _ "Cavalier"
    race=human
    image="units/human-loyalists/cavalier.png"
    profile="portraits/humans/cavalryman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=68
    movement_type=mounted
    movement=9
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    undead_variation=mounted
    cost=52
    #extra resistance for these units
    usage=scout
    description= _ "A triumphant sight on the battlefield, cavaliers are masters at the use of both sword and crossbow from horseback. This is fearsome when combined with their mobility; such might, and the daring deeds it fosters, are the subject of many a tale and song."
    die_sound=horse-die.ogg
    [movement_anim]
        [frame]
            begin=0
            end=150
            image="units/human-loyalists/cavalier-moving.png"
        [/frame]
    [/movement_anim]
    {DEFENSE_ANIM "units/human-loyalists/cavalier-defend.png" "units/human-loyalists/cavalier.png" {SOUND_LIST:HORSE_HIT} }
    [resistance]
        blade=70
        impact=60
        cold=80
    [/resistance]
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/greatsword-human.png
        type=blade
        range=melee
        damage=10
        number=4
    [/attack]
    [attack]
        name=crossbow
        description=_"crossbow"
        icon=attacks/crossbow-human.png
        type=pierce
        range=ranged
        damage=20
        number=1
    [/attack]
    [attack_anim]
        [filter_attack]
            name=crossbow
        [/filter_attack]
        [frame]
            begin=-1100
            end=-1000
            image="units/human-loyalists/cavalier-ranged-1.png"
        [/frame]
        [frame]
            begin=-1000
            end=-900
            image="units/human-loyalists/cavalier-ranged-2.png"
        [/frame]
        [frame]
            begin=-800
            end=-700
            image="units/human-loyalists/cavalier-ranged-3.png"
        [/frame]
        [frame]
            begin=-700
            end=-600
            image="units/human-loyalists/cavalier-ranged-4.png"
        [/frame]
        [frame]
            begin=-600
            end=-500
            image="units/human-loyalists/cavalier-ranged-5.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-500
                end=-300
                image="units/human-loyalists/cavalier-ranged-6.png"
                sound=crossbow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-500
                end=-300
                image="units/human-loyalists/cavalier-ranged-6.png"
                sound=crossbow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-300
            end=-0
            image="units/human-loyalists/cavalier-ranged-7.png"
        [/frame]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-225
            end=-200
            image="units/human-loyalists/cavalier.png"
        [/frame]
        [frame]
            begin=-200
            end=-150
            image="units/human-loyalists/cavalier-moving.png"
            sound=horse-canter.wav
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-150
                end=150
                image="units/human-loyalists/cavalier-attack.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-150
                end=150
                image="units/human-loyalists/cavalier-attack.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=150
            end=200
            image="units/human-loyalists/cavalier-moving.png"
        [/frame]
        [frame]
            begin=200
            end=225
            image="units/human-loyalists/cavalier.png"
        [/frame]
    [/attack_anim]
[/unit_type]
