#textdomain wesnoth-trow
[unit_type]
    id=Familiar
    name= _ "Familiar"
    race=undead
    image="units/familiar-3.png"
    hitpoints=36
    movement_type=smallfly
    movement=8
    experience=100
    level=2
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=40
    usage=scout
    description= _ "Powerful magic users sometimes have familiars, creatures which have had a spirit or minor demon drawn into them. A familiar may act as a spy or messenger for its master."
    die_sound=bat-flapping.wav

    # Use undeadfoot resistances despite the smallfly movement values
    [resistance]
        blade=90
        pierce=70
        impact=110
        fire=120
        cold=40
        arcane=150
    [/resistance]

    [attack]
        name=bite
        description= _"bite"
        icon=attacks/fangs-animal.png
        type=blade
        range=melee
        damage=5
        number=5
    [/attack]
    [defend]
        [if]
            hits=miss
            offset=0.0~-0.15,-0.15~0.0
        [/if]
        start_time=-126
        [frame]
            image="units/familiar-3.png:1,units/familiar-4.png:250,units/familiar-3.png:1"
        [/frame]
        [if]
            hits=hit
            hit_sound_start_time=-26
            [hit_sound_frame]
                sound=familiar-teeth.ogg
            [/hit_sound_frame]
        [/if]
    [/defend]
    [standing_anim]
        layer=60
        start_time=0
        [frame]
            image="units/familiar-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/standing_anim]
    [movement_anim]
        start_time=0
        [frame]
            image="units/familiar-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/movement_anim]
    [attack_anim]
        [filter_attack]
            name=bite
        [/filter_attack]

        offset=0.0~0.9:200,0.9~0.0:160
        start_time=-200

        [frame]
            image="units/familiar-[3~2].png:30"
        [/frame]
        [frame]
            image="units/familiar-1.png:30"
            sound=bat-flapping.wav
        [/frame]
        [frame]
            image="units/familiar-[2~4,3,2,3].png:[30*2,70,50*2,40]"
        [/frame]
        {SOUND:HIT_AND_MISS bite-small.ogg {SOUND_LIST:MISS} -50}
    [/attack_anim]
[/unit_type]
