#textdomain wesnoth-units
[unit_type]
    id=Orcish Crossbowman
    name= _ "Orcish Crossbowman"
    race=orc
    image="units/orcs/xbowman.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=43
    movement_type=orcishfoot
    movement=5
    experience=80
    level=2
    alignment=chaotic
    advances_to=Orcish Slurbow
    undead_variation=archer
    cost=26
    usage=archer
    description= _ "Orcish crossbows are crude imitations of human or dwarvish design; a crossbow of any make, though, is a fairly potent device. The orcs privileged enough to wield them are capable warriors, and what they lack in finesse, they make up for in numbers."
    die_sound={SOUND_LIST:ORC_DIE}
    {DEFENSE_ANIM_RANGE "units/orcs/xbowman-melee-defend-2.png" "units/orcs/xbowman-melee-defend-1.png" {SOUND_LIST:ORC_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/orcs/xbowman-defend.png" "units/orcs/xbowman.png" {SOUND_LIST:ORC_HIT} ranged}
    [attack]
        name=short sword
        description=_"short sword"
        icon=attacks/sword-orcish.png
        type=blade
        range=melee
        damage=4
        number=3
    [/attack]
    [attack]
        name=crossbow
        description=_"crossbow"
        icon=attacks/crossbow-orcish.png
        type=pierce
        range=ranged
        damage=8
        number=3
    [/attack]
    [attack]
        name=crossbow
        description=_"crossbow"
        icon=attacks/crossbow-orcish.png
        type=fire
        range=ranged
        damage=10
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=crossbow
            type=fire
        [/filter_attack]
        [if]
            hits=yes

            [missile_frame]
                begin=-150
                end=0
                image="projectiles/missile-fire-n.png"
                image_diagonal="projectiles/missile-fire-ne.png"
                offset=0~0.8
            [/missile_frame]

            {FIRE_BURST_SMALL}

            [frame]
                begin=-300
                end=-100
                image="units/orcs/xbowman-ranged-1.png"
                sound=crossbow-fire.ogg
            [/frame]
        [/if]
        [else]
            hits=no

            [missile_frame]
                begin=-150
                end=0
                image="projectiles/missile-fire-n.png"
                image_diagonal="projectiles/missile-fire-ne.png"
            [/missile_frame]

            [frame]
                begin=-300
                end=-100
                image="units/orcs/xbowman-ranged-1.png"
                sound=crossbow-fire-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-100
            end=0
            image="units/orcs/xbowman-ranged-2.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=crossbow
            type=pierce
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [if]
            hits=yes
            [frame]
                begin=-300
                end=-150
                image="units/orcs/xbowman-ranged-1.png"
                sound=crossbow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-300
                end=-150
                image="units/orcs/xbowman-ranged-1.png"
                sound=crossbow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-150
            end=0
            image="units/orcs/xbowman-ranged-2.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=short sword
        [/filter_attack]

        offset=0.0~0.3,0.3~0.55,0.55~0.3,0.3~0.0
        start_time=-250
        [frame]
            duration=100
            image="units/orcs/xbowman-melee.png"
        [/frame]
        [if]
            hits=no
            [frame]
                duration=100
                image="units/orcs/xbowman-melee-attack-1.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                duration=100
                image="units/orcs/xbowman-melee-attack-1.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/orcs/xbowman-melee-attack-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/orcs/xbowman-melee-attack-3.png"
        [/frame]
        [frame]
            duration=150
            image="units/orcs/xbowman-melee-attack-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/orcs/xbowman-melee.png"
        [/frame]
    [/attack_anim]
[/unit_type]
