#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Dragonguard
    name= _ "Dwarvish Dragonguard"
    # wmllint: general spelling dragonguard dragonguards thunderstick thundersticks
    race=dwarf
    image="units/dwarves/dragonguard/dragonguard.png"
    profile="portraits/dwarves/dragonguard.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=59
    movement_type=dwarvishfoot
    movement=4
    experience=150
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=46
    usage=archer
    description= _ "It is not clear why the Dragonguards are called what they are, a name given by their dwarven brethren. Some speculate that the name comes from their weapon of choice, these strange staves that belch fire and death. Others have surmised that it is because such weapons would be a threat against even a true Dragon, should such a thing be seen again in the known world. Whatever the case, it is for these weapons that the guardians of the great Dwarven citadels are both renowned and feared; weapons that have broken the mightiest of warriors with a single blow."
    die_sound={SOUND_LIST:DWARF_DIE}
    {STANDING_ANIM_DIRECTIONAL_6_FRAME "units/dwarves/dragonguard/dragonguard"}

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

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

    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/dwarves/transparent/dragonguard.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/dwarves/transparent/dragonguard.png"
    [/portrait]
    [attack]
        name=dagger
        description=_"dagger"
        icon=attacks/dagger-human.png
        type=blade
        range=melee
        damage=9
        number=3
    [/attack]
    [attack]
        name=dragonstaff
        description=_"dragonstaff"	# wmllint: no spellcheck (until name->id)
        type=pierce
        range=ranged
        damage=40
        number=1
        icon=attacks/dragonstaff.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=dragonstaff
        [/filter_attack]
        start_time=-1250
        halo_start_time=-250

        [if]
            {MISSILE_FRAME_DG_SECOND_MUZZLE_FLARE_HIT_SOUTH 0 -4}
            direction=s
            hits=yes
            [frame]
                image="units/dwarves/dragonguard/dragonguard-s-ranged[1~22].png:[100*7,300,80*3,90,100,120*3,100*6]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-se-ranged23.png:100"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard.png:200"
            [/frame]

            [halo_frame]
                halo="halo/dragonguard/dg-muzzle-flash-s-[1~17].png:[80*3,90,100,120*3,100*9]"
                auto_vflip=false
            [/halo_frame]
        [/if]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 3 24}
            direction=s
            hits=no
            [frame]
                image="units/dwarves/dragonguard/dragonguard-s-ranged[1~8,8,6~2,22].png:[100*7,300,100*7]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-se-ranged23.png:100"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_DG_SECOND_MUZZLE_FLARE_HIT_DIAG_NORTH -8 10}
            direction=ne,nw
            hits=yes
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne-ranged[1~23].png:[100*7,300,80*3,90,100,120*3,100*7]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne.png:200"
            [/frame]

            [halo_frame]
                halo="halo/dragonguard/dg-muzzle-flash-ne-[1~17].png:[80*3,90,100,120*3,100*9]"
                auto_vflip=false
            [/halo_frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 19 -2}
            direction=ne,nw
            hits=no
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne-ranged[1~8,8,6~2,22,23].png:[100*7,300,100*8]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_DG_SECOND_MUZZLE_FLARE_HIT_NORTH -1 16}
            direction=n
            hits=yes
            [frame]
                image="units/dwarves/dragonguard/dragonguard-n-ranged[1~22].png:[100*7,300,80*3,90,100,120*3,100*6]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne-ranged23.png:100"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne.png:200"
            [/frame]

            [halo_frame]
                halo="halo/dragonguard/dg-muzzle-flash-n-[1~17].png:[80*3,90,100,120*3,100*9]"
                auto_vflip=false
            [/halo_frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS -7 -6}
            direction=n
            hits=no
            [frame]
                image="units/dwarves/dragonguard/dragonguard-n-ranged[1~8,8,6~2,22].png:[100*7,300,100*7]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne-ranged23.png:100"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard-ne.png:20"
            [/frame]
        [/else]
        [else]
            {MISSILE_FRAME_DG_SECOND_MUZZLE_FLARE_HIT_DIAG_SOUTH 0 8}
            direction=se,sw
            hits=yes
            [frame]
                image="units/dwarves/dragonguard/dragonguard-se-ranged[1~23].png:[100*7,300,80*3,90,100,120*3,100*7]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard.png:200"
            [/frame]

            [halo_frame]
                halo="halo/dragonguard/dg-muzzle-flash-se-[1~17].png:[80*3,90,100,120*3,100*9]"
                auto_vflip=false
            [/halo_frame]
        [/else]
        [else]
            {MISSILE_FRAME_MUZZLE_FLARE_MISS 18 17}
            direction=se,sw
            hits=no
            [frame]
                image="units/dwarves/dragonguard/dragonguard-se-ranged[1~8,8,6~2,22,23].png:[100*7,300,100*8]"
            [/frame]
            [frame]
                image="units/dwarves/dragonguard/dragonguard.png:20"
            [/frame]
        [/else]

        {SOUND:HIT_AND_MISS dragonstick.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/dragonguard/dragonguard-se-blade[1~9,1].png:[50,100*8,50]"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/dwarves/dragonguard/dragonguard-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/dragonguard/dragonguard"}
[/unit_type]
