#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Thunderguard
    name= _ "Dwarvish Thunderguard"
    # wmllint: general spelling thunderguard thunderguards
    race=dwarf
    image="units/dwarves/thunderguard.png"
    profile="portraits/dwarves/thunderer.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=44
    movement_type=dwarvishfoot
    movement=4
    experience=95
    level=2
    alignment=neutral
    advances_to=Dwarvish Dragonguard
    undead_variation=dwarf
    cost=30
    usage=mixed fighter
    description= _ "The Dwarven Thunderguards are famed for their curious weaponry, these strange staffs of wood and iron that make a thunderous noise in their anger. The machinations behind this weaponry are a mystery, a secret taken to the grave by the dwarves of Knalga who wield them, and are assumed to have even forged them. The most that is known are reports of dwarves pouring a strange black dust into the mouth of their weapons, which some say is a food to fuel the beast imprisoned within.

Though a single shot from these 'thundersticks' can take several minutes to prepare, the results are seen by the Dwarves as being well worth the wait."
    die_sound={SOUND_LIST:DWARF_DIE}
    {DEFENSE_ANIM_RANGE "units/dwarves/thunderguard-blade-defend-2.png" units/dwarves/thunderguard-blade-defend-1.png {SOUND_LIST:DWARF_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/dwarves/thunderguard-defend.png" units/dwarves/thunderguard.png {SOUND_LIST:DWARF_HIT} ranged}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/dwarves/transparent/thunderer.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/dwarves/transparent/thunderer.png"
    [/portrait]
    [attack]
        name=dagger
        description=_"dagger"
        icon=attacks/dagger-human.png
        type=blade
        range=melee
        damage=6
        number=3
    [/attack]
    [attack]
        name=thunderstick
        description=_"thunderstick"
        type=pierce
        range=ranged
        damage=28
        number=1
        icon=attacks/thunderstick.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=thunderstick
        [/filter_attack]
        [if]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_SOUTH 0 0}
            direction=se,sw
            hits=yes
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-se.png"
                sound=thunderstick.ogg
            [/frame]
        [/if]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS}
            direction=se,sw
            hits=no
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-se.png"
                sound=thunderstick-miss.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_NORTH 0 20}
            direction=ne,nw
            hits=yes
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-ne.png"
                sound=thunderstick.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS}
            direction=ne,nw
            hits=no
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-ne.png"
                sound=thunderstick-miss.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_NORTH 0 20}
            direction=n
            hits=yes
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-n.png"
                sound=thunderstick.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS}
            direction=n
            hits=no
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-n.png"
                sound=thunderstick-miss.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_SOUTH 0 0}
            direction=s
            hits=yes
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-s.png"
                sound=thunderstick.ogg
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS}
            direction=s
            hits=no
            [frame]
                begin=-400
                end=0
                image="units/dwarves/thunderguard-attack-ranged-s.png"
                sound=thunderstick-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=0
            end=1
            image="units/dwarves/thunderguard-attack-ranged-se.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=dagger
        [/filter_attack]
        start_time=-250
        offset=0.0~0.1:200,0.1~0.6:200,0.6~0.0:250
        [frame]
            duration=50
            image="units/dwarves/thunderguard-blade.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/thunderguard-blade-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/thunderguard-blade-2.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/dwarves/thunderguard-blade-3.png"
                sound=axe.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/dwarves/thunderguard-blade-3.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/dwarves/thunderguard-blade-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/thunderguard-blade-5.png"
        [/frame]
    [/attack_anim]
[/unit_type]
