#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Thunderer
    name= _ "Dwarvish Thunderer"
    race=dwarf
    image="units/dwarves/thunderer/thunderer.png"
    profile="portraits/dwarves/thunderer.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=34
    movement_type=dwarvishfoot
    movement=4
    experience=40
    level=1
    alignment=neutral
    advances_to=Dwarvish Thunderguard
    cost=17
    usage=mixed fighter
    description= _ "When the men of Wesnoth first encountered the dwarves, they were mystified by the power of the Dwarvish Thunderers, who were able to hurl death from afar through the apparatus of these strange wands they carried into battle. The deafening noise of these ‘thundersticks’ is terrifying to behold, and is made more so by the secrecy which dwarves wrap about their workings."
    die_sound={SOUND_LIST:DWARF_DIE}
    {STANDING_ANIM_DIRECTIONAL_6_FRAME "units/dwarves/thunderer/thunderer"}

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

    {DEFENSE_ANIM_DIRECTIONAL_FILTERED "units/dwarves/thunderer/thunderer-se-defend2.png" "units/dwarves/thunderer/thunderer-se-defend1.png" "units/dwarves/thunderer/thunderer-ne-defend2.png" "units/dwarves/thunderer/thunderer-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]

    [death]
        start_time=0
        [frame]
            image="units/dwarves/thunderer/thunderer-die[1~3].png:200"
        [/frame]
    [/death]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            image="units/dwarves/thunderer/thunderer-idle-[1~6,5,6,5,6,4,2,1].png:[100*3,800,200,300,200,300,200*2,500,100*2]"
        [/frame]
    [/idle_anim]

    [attack]
        name=dagger
        description=_"dagger"
        icon=attacks/dagger-human.png
        type=blade
        range=melee
        damage=6
        number=2
    [/attack]
    [attack]
        name=thunderstick
        description=_"thunderstick"
        type=pierce
        range=ranged
        damage=18
        number=1
    [/attack]
    [attack_anim]
        [filter_attack]
            name=thunderstick
        [/filter_attack]
        start_time=-750

        [if]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_SOUTH -6 -5}
            direction=s
            hits=yes
            [frame]
                image="units/dwarves/thunderer/thunderer-s-ranged[1~9].png:[100*3,200,140*2,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer.png:280"
            [/frame]
        [/if]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS -4 6}
            direction=s
            hits=no
            [frame]
                image="units/dwarves/thunderer/thunderer-s-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_NORTH -3 20}
            direction=ne,nw
            hits=yes
            [frame]
                image="units/dwarves/thunderer/thunderer-ne-ranged[1~9].png:[100*3,200,140*2,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer-ne.png:280"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 5 0}
            direction=ne,nw
            hits=no
            [frame]
                image="units/dwarves/thunderer/thunderer-ne-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer-ne.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_NORTH 4 21}
            direction=n
            hits=yes
            [frame]
                image="units/dwarves/thunderer/thunderer-n-ranged[1~9].png:[100*3,200,140*2,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer-ne.png:280"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 3 -2}
            direction=n
            hits=no
            [frame]
                image="units/dwarves/thunderer/thunderer-n-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer-ne.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_SOUTH -10 10}
            direction=se,sw
            hits=yes
            [frame]
                image="units/dwarves/thunderer/thunderer-se-ranged[1~9].png:[100*3,200,140*2,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer.png:280"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 4 11}
            direction=se,sw
            hits=no
            [frame]
                image="units/dwarves/thunderer/thunderer-se-ranged[1~4,4,2,1].png:[100*3,200,100*3]"
            [/frame]
            [frame]
                image="units/dwarves/thunderer/thunderer.png:20"
            [/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/thunderer/thunderer-se-blade[1~9,1].png:[50,100*8,50]"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/dwarves/thunderer/thunderer-ne-blade[1~9,1].png:[50,100*8,50]"
            [/frame]
        [/else]

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

    [victory_anim]
        range=ranged
        direction=s,se,sw
        [frame]
            image="units/dwarves/thunderer/thunderer-se-ranged-kill1.png:100"
        [/frame]
        [frame]
            image="units/dwarves/thunderer/thunderer-se-ranged-kill[2~12].png:100"
            halo="halo/thunderer/smoke-se-ranged-kill[1~11].png"
        [/frame]
        [frame]
            image="units/dwarves/thunderer/thunderer-se-ranged-kill13.png:100"
        [/frame]
    [/victory_anim]

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