#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Thunderguard
    name= _ "Dwarvish Thunderguard"
    # wmllint: general spelling thunderguard thunderguards
    race=dwarf
    image="units/dwarves/thunderguard/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
    cost=30
    usage=mixed fighter
    description= _ "The Dwarven Thunderguards are famed for their curious weaponry, these strange staves 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}
    {STANDING_ANIM_DIRECTIONAL_6_FRAME "units/dwarves/thunderguard/thunderguard"}

    {DEFENSE_ANIM_DIRECTIONAL_FILTERED "units/dwarves/thunderguard/thunderguard-se-blade-defend2.png" "units/dwarves/thunderguard/thunderguard-se-blade-defend1.png" "units/dwarves/thunderguard/thunderguard-ne-blade-defend2.png" "units/dwarves/thunderguard/thunderguard-ne-blade-defend1.png" {SOUND_LIST:DWARF_HIT} (
        [filter_second_attack]
            range=melee
        [/filter_second_attack]
    )}

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

    [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]
        start_time=-750

        [if]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_SOUTH 2 1}
            direction=s
            hits=yes
            [frame]
                image="units/dwarves/thunderguard/thunderguard-s-ranged[1~12].png:[100*3,200,100,70,150*2,100*4]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard.png:10"
            [/frame]
        [/if]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 4 7}
            direction=s
            hits=no
            [frame]
                image="units/dwarves/thunderguard/thunderguard-s-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_NORTH -1 16}
            direction=ne,nw
            hits=yes
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne-ranged[1~12].png:[100*3,200,100,70,150*2,100*4]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 8 -1}
            direction=ne,nw
            hits=no
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_NORTH -10 19}
            direction=n
            hits=yes
            [frame]
                image="units/dwarves/thunderguard/thunderguard-n-ranged[1~12].png:[100*3,200,100,70,150*2,100*4]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS -9 -4}
            direction=n
            hits=no
            [frame]
                image="units/dwarves/thunderguard/thunderguard-n-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_SOUTH -3 7}
            direction=se,sw
            hits=yes
            [frame]
                image="units/dwarves/thunderguard/thunderguard-se-ranged[1~12].png:[100*3,200,100,70,150*2,100*4]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard.png:10"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 11 8}
            direction=se,sw
            hits=no
            [frame]
                image="units/dwarves/thunderguard/thunderguard-se-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderguard/thunderguard.png:10"
            [/frame]
        [/else]

        {SOUND:HIT_AND_MISS thunderstick.ogg thunderstick-miss.ogg -250}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=dagger
        [/filter_attack]
        start_time=-550
        offset=0.0~0.0:200,0.0~0.5:270,0.5~0.5:180,0.5~0.0:200
        [if]
            direction=s,se,sw
            [frame]
                image="units/dwarves/thunderguard/thunderguard-se-blade[1~9,1].png:[50,100*8,50]"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/dwarves/thunderguard/thunderguard-ne-blade[1~9,1].png:[50,100*8,50]"
            [/frame]
        [/else]

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

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