#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Fighter
    name= _ "Dwarvish Fighter"
    race=dwarf
    image="units/dwarves/fighter.png"
    profile="portraits/dwarves/fighter.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=38
    movement_type=dwarvishfoot
    movement=4
    experience=41
    level=1
    alignment=neutral
    advances_to=Dwarvish Steelclad
    cost=16
    usage=fighter
    description= _ "Dwarvish Fighters wield mighty battle axes and hammers, which make them feared opponents in close-range combat. They are excellent in mountainous terrain or underground. Their power and endurance more than compensate for their relatively poor mobility."
    die_sound={SOUND_LIST:DWARF_DIE}
    {STANDING_ANIM_DIRECTIONAL_6_FRAME "units/dwarves/fighter"}

    {DEFENSE_ANIM_DIRECTIONAL_FILTERED "units/dwarves/fighter-se-defend2.png" "units/dwarves/fighter-se-defend1.png" "units/dwarves/fighter-ne-defend2.png" "units/dwarves/fighter-ne-defend1.png" {SOUND_LIST:DWARF_HIT} (
        [filter_second_attack]
            name=axe
        [/filter_second_attack]
    )}

    {DEFENSE_ANIM_DIRECTIONAL_FILTERED "units/dwarves/fighter-se-defend2.png" "units/dwarves/fighter-se-defend1.png" "units/dwarves/fighter-ne-defend2.png" "units/dwarves/fighter-ne-defend1.png" {SOUND_LIST:DWARF_HIT} (
        [filter_attack]
            range=ranged
        [/filter_attack]
    )}

    {DEFENSE_ANIM_DIRECTIONAL_FILTERED "units/dwarves/fighter-se-hammer-defend2.png" "units/dwarves/fighter-se-hammer-defend1.png" "units/dwarves/fighter-ne-hammer-defend2.png" "units/dwarves/fighter-ne-hammer-defend1.png" {SOUND_LIST:DWARF_HIT} (
        [filter_second_attack]
            name=hammer
        [/filter_second_attack]
    )}

    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/dwarves/transparent/fighter.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/dwarves/transparent/fighter.png"
    [/portrait]
    [attack]
        name=axe
        description=_"axe"
        type=blade
        range=melee
        damage=7
        number=3
    [/attack]
    [attack]
        name=hammer
        description=_"hammer"
        icon=attacks/hammer-dwarven.png
        type=impact
        range=melee
        damage=8
        number=2
    [/attack]

#ifdef __UNUSED__
    # Commented out because a dwarf jumping up and down looks nothing but silly.
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            image="units/dwarves/fighter-idle-[1~8,4~8,4,1].png:[100*3,1,100*2,200,100,200,100*2,1,100,300,100]"
        [/frame]
    [/idle_anim]
#endif
    [attack_anim]
        [filter_attack]
            name=hammer
        [/filter_attack]
        start_time=-350
        offset=0.0~-0.05,-0.05~0.1,0.1~0.55,0.55~0.55,0.5~0.0
        [if]
            direction=s,se,sw
            [frame]
                image="units/dwarves/fighter-se-hammer.png:40"
            [/frame]
            [frame]
                image="units/dwarves/fighter-se-hammer[1~7].png:100,units/dwarves/fighter-se-hammer.png:100"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/dwarves/fighter-ne-hammer.png:40"
            [/frame]
            [frame]
                image="units/dwarves/fighter-ne-hammer[1~7].png:100,units/dwarves/fighter-ne-hammer.png:100"
            [/frame]
        [/else]
        {SOUND:HIT_AND_MISS mace.wav {SOUND_LIST:MISS} -210}
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=axe
        [/filter_attack]
        start_time=-350
        #    offset=0.0~-0.15:30,-0.15~0.1:60,0.1~0.5:190,0.5~0.6:30,0.6~0.6:40,0.6~0.15:150,0.15~0.0:40
        offset=0.0~-0.15:40,-0.15~0.4:240,0.4~0.4:120,0.4~0.0:200
        [if]
            direction=s,se,sw
            [frame]
                image="units/dwarves/fighter-se-axe[1~9].png:[40,60*6,80*2]"
            [/frame]
            [frame]
                image="units/dwarves/fighter.png:40"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/dwarves/fighter-ne-axe[1~9].png:[40,60*6,80*2]"
            [/frame]
            [frame]
                image="units/dwarves/fighter-ne.png:40"
            [/frame]
        [/else]
        {SOUND:HIT_AND_MISS axe.ogg {SOUND_LIST:MISS} -130}
    [/attack_anim]

    {MOVING_ANIM_DIRECTIONAL_10_FRAME "units/dwarves/fighter"}
[/unit_type]
