#textdomain wesnoth-utbs
# This is the same as the core Mudcrawler, except that it has a 6-1 melee attack
[unit_type]
    [base_unit]
        id=Mudcrawler
    [/base_unit]
    id=Small Mudcrawler
    name= _ "Small Mudcrawler"

    # NOTE: Both attacks are given here, since there didn't seem to be a way to
    # insert the extra attack before the existing ranged attack.
    [attack]
        name=fist
        description= _"fist"
        icon=attacks/mud-glob.png
        type=impact
        range=melee
        damage=6
        number=1
    [/attack]
    [attack]
        name=mud glob
        description=_"mud glob"
        icon=attacks/mud-glob.png
        type=impact
        range=ranged
        damage=4
        number=3
    [/attack]

    # The first [attack_anim] is needed to prevent the second one from
    # overwriting the base unit's ranged attack anim.
    [attack_anim]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fist
        [/filter_attack]
        start_time=-400
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-3.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/monsters/mudcrawler-attack-4.png"
                sound=fist.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/monsters/mudcrawler-attack-4.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-5.png"
        [/frame]
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/monsters/mudcrawler-attack-1.png"
        [/frame]
    [/attack_anim]
[/unit_type]
