#textdomain wesnoth-sof
[unit]
    id=Dwarvish Miner
    name= _ "Dwarvish Miner"
    race=dwarf
    image=units/dwarves/miner.png
    hitpoints=25
    movement_type=dwarvishfoot
    movement=5
    level=1
    alignment=neutral
    advanceto=null
    {AMLA_DEFAULT}
    experience=150
    cost=19
    usage=fighter
    unit_description= _ "Dwarvish miners are the grunt workers of Dwarvish society. They take the precious ores out of the ground, but do not ever take part in the crafting of weapons or artifacts."
    {DEFENSE_ANIM "units/dwarves/miner.png" "units/dwarves/miner.png" {SOUND_LIST:DWARF_HIT} }
    die_sound={SOUND_LIST:DWARF_DIE}
    [attack]
        name=pick
        description= _"pick"
        type=pierce
        range=melee
        damage=4
        number=2
        icon=attacks/pick-axe.png
    [/attack]
    [standing_anim]
        [unit_filter]
            role=loaded
            # These roles are associated with Scepter of Fire
            [or]
                role=has_coal
            [/or]
            [or]
                role=has_gold
            [/or]
        [/unit_filter]
        start_time=0
        [frame]
            duration=1000
            image=units/dwarves/miner-withstuff.png
        [/frame]
    [/standing_anim]

    # FIXME: this animation is defined to work around a crash due to no valid
    # standing animation being available to an unloaded miner otherwise
    [standing_anim]
        [unit_filter]
            [not]
                role=loaded

                [or]
                    role=has_coal
                [/or]
                [or]
                    role=has_gold
                [/or]
            [/not]
        [/unit_filter]
        start_time=0
        [frame]
            duration=1000
            image=units/dwarves/miner.png
        [/frame]
    [/standing_anim]
    [attack_anim]
        [attack_filter]
            name=pick
        [/attack_filter]
        [frame]
            begin=-200
            end=-100
            image=units/dwarves/miner-attack.png
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image=units/dwarves/miner-attack2.png
                sound=axe.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image=units/dwarves/miner-attack2.png
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image=units/dwarves/miner.png
        [/frame]
    [/attack_anim]
[/unit]

