#textdomain wesnoth-units
[unit_type]
    id=Horseman
    name= _ "Horseman"
    race=human
    image="units/human-loyalists/horseman/horseman.png"
    small_profile="portraits/humans/transparent/horseman.png~SCALE(205,205)"
    profile="portraits/humans/transparent/horseman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=38
    movement_type=mounted
    movement=8
    experience=44
    level=1
    alignment=lawful
    advances_to=Knight,Lancer
    undead_variation=mounted
    cost=23
    usage=fighter
    description= _ "Often hailing from the wilder and untamed regions of Wesnoth, Horsemen are trained from childhood to ride and to follow a strict code of honor. A charge made by a horseman is a powerful though risky tactic, the worth of which has been proven time and time again on the battlefield. Horsemen excel against most infantry, especially those who have fallen out of line, but must take care against both spearmen and archers for whom their large size provide inviting targets."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}
    die_sound=horse-die.ogg

    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/horseman.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/horseman.png"
    [/portrait]
    [attack]
        name=spear
        description=_"spear"
        type=pierce
        [specials]
            {WEAPON_SPECIAL_CHARGE}
        [/specials]
        range=melee
        damage=9
        number=2
    [/attack]

    {DEFENSE_ANIM_DIRECTIONAL "units/human-loyalists/horseman/horseman-se-defend2.png" "units/human-loyalists/horseman/horseman-se-defend1.png" "units/human-loyalists/horseman/horseman-ne-defend2.png" "units/human-loyalists/horseman/horseman-ne-defend1.png" {SOUND_LIST:HORSE_HIT} }

    [death]
        start_time=0
        [if]
            direction=sw,s,se
            [frame]
                image="units/human-loyalists/horseman/horseman-se-die[1~5].png:100"
            [/frame]
        [/if]
        [else]
            direction=nw,n,ne
            [frame]
                image="units/human-loyalists/horseman/horseman-ne-die[1~5].png:100"
            [/frame]
        [/else]
    [/death]

    {STANDING_ANIM_DIRECTIONAL_6_FRAME "units/human-loyalists/horseman/horseman"}

    {MOVING_ANIM_DIRECTIONAL_8_FRAME "units/human-loyalists/horseman/horseman"}

    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]

        start_time=-400
        sound_start_time=-400
        offset=0.0~0.3:300,0.3~0.45:210,0.45~0.0:420

        [sound_frame]
            sound=horse-canter.wav
        [/sound_frame]

        [if]
            direction=n
            [frame]
                image="units/human-loyalists/horseman/horseman-n-attack[1~12].png:[100*3,70*9]"
            [/frame]
        [/if]
        [else]
            direction=nw,ne
            [frame]
                image="units/human-loyalists/horseman/horseman-ne-attack[1~12].png:[100*3,70*9]"
            [/frame]
        [/else]
        [else]
            direction=sw,se
            [frame]
                image="units/human-loyalists/horseman/horseman-se-attack[1~12].png:[100*3,70*9]"
            [/frame]
        [/else]
        [else]
            direction=s
            [frame]
                image="units/human-loyalists/horseman/horseman-s-attack[1~12].png:[100*3,70*9]"
            [/frame]
        [/else]

        {SOUND:HIT_AND_MISS spear.ogg {SOUND_LIST:MISS} -100}
    [/attack_anim]
[/unit_type]
