#textdomain wesnoth-sof
[unit_type]
    id=Cave Wyrmlet
    name= _ "Cave Wyrmlet"
    race=monster
    image="units/monsters/wyrmlet-se-3.png"
    profile="portraits/monsters/wyrm.webp"
    hide_help=yes
    hitpoints=16
    movement_type=smallfly
    movement=8
    experience=22
    level=0
    alignment=chaotic
    advances_to=Cave Wyrm
    cost=13
    usage=scout
    description= _ "Cave Wyrms are strange beasts, stout serpents with wings, but no legs. They are relatively rare, and their presence is attributed to some eccentric wizard or dragon. The young are small, but hungry and aggressive."
    die_sound=bat-flapping.wav
    undead_variation=drake

    [resistance]
        fire=70
        arcane=100
    [/resistance]
    [defense]
        village=50
    [/defense]

    # based on the bats, though no north-facing frames yet
    [defend]
        # direction=s,sw,se
        [if]
            hits=miss
            offset=0.0~-0.15,-0.15~0.0
        [/if]
        start_time=-126
        [frame]
            image="units/monsters/wyrmlet-se-[3,4].png:[1,100]"
        [/frame]
        [if]
            hits=hit
            [frame]
                image="units/monsters/wyrmlet-se-4.png:150"
                sound={SOUND_LIST:BAT_HIT}
            [/frame]
        [/if]
        [else]
            hits=miss,kill
            [frame]
                image="units/monsters/wyrmlet-se-4.png:150"
            [/frame]
        [/else]
        [frame]
            image="units/monsters/wyrmlet-se-3.png:1"
        [/frame]
    [/defend]

    [standing_anim]
        # direction=s,se,sw
        start_time=0
        layer=60
        [frame]
            image="units/monsters/wyrmlet-se-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/standing_anim]
    [movement_anim]
        # direction=s,se,sw
        start_time=0
        [frame]
            image="units/monsters/wyrmlet-se-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/movement_anim]
    [attack]
        name=fangs
        description=_"fangs"
        icon=attacks/fangs-snake.png
        type=blade
        range=melee
        damage=4
        number=3
    [/attack]
    [attack]
        name=breath
        description=_"breath"
        icon=attacks/fireball.png
        type=fire
        range=ranged
        damage=6
        number=1
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        # direction=s,se,sw
        offset=0.0~0.9:200,0.9~0.0:160
        start_time=-200
        [frame]
            image="units/monsters/wyrmlet-se-[3,2].png:30"
        [/frame]
        [frame]
            image="units/monsters/wyrmlet-se-1.png:30"
            sound=bat-flapping.wav
        [/frame]
        [frame]
            image="units/monsters/wyrmlet-se-[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]
    [attack_anim]
        [filter_attack]
            name=breath
        [/filter_attack]
        # direction=s,se,sw
        missile_start_time=-300
        [missile_frame]
            halo=projectiles/fire-breath-[1~10].png:[70*10]
            offset=0.0~1.0:300,1.0:350
        [/missile_frame]

        offset=0.0
        start_time=-300
        [frame]
            image="units/monsters/wyrmlet-se-[3,4].png:[350*2]"
        [/frame]
        {SOUND:HIT_AND_MISS fire.wav bow-puny-fire-miss.ogg -150}
    [/attack_anim]
[/unit_type]
