#textdomain wesnoth-utbs
# This is the Alien Central Body with his immune to attacks
[unit_type]
    id=Central Body Base
    name= _ "Central Body"
    race=monster
    image=units/alien/core-compact.png
    image_icon="units/alien/core-compact.png~SCALE(72,72)"
    [standing_anim]
        [frame]
            duration=100
            image="units/alien/core-compact.png"
            auto_hflip=no
        [/frame]
    [/standing_anim]
    hitpoints=100
    movement_type=smallfoot
    [movement_costs]
        cave={UNREACHABLE}
        flat={UNREACHABLE}
    [/movement_costs]
    [resistance]
        blade=0
        pierce=0
        impact=0
        fire=0
        cold=0
        arcane=0
    [/resistance]
    movement=7
    experience=150
    {AMLA_DEFAULT}
    level=3
    alignment=chaotic
    advances_to=null
    cost=20
    usage=fighter
    do_not_list=yes
    description= _ "This thing is impossible to describe, no one has seen anything like it before."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}
    {DEFENSE_ANIM_FILTERED ("units/alien/core-compact.png") ("units/alien/core-compact.png") ("wail.wav") (direction=n,ne,se,s)}
    {DEFENSE_ANIM_FILTERED ("units/alien/core-compact.png~FL(horiz)") ("units/alien/core-compact.png~FL(horiz)") ("wail.wav") (direction=nw,sw)}

    [attack]
        name=energy ray
        description= _"energy ray"
        icon=attacks/energyray.png
        type=cold
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=7
        number=3
    [/attack]
    [attack]
        name=energy ray
        description= _"energy ray"
        icon=attacks/energyray.png
        type=cold
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=7
        number=3
    [/attack]
    [attack_anim]
        # NOTE: The following attack filter deliberately matches both ranged and melee.
        [filter_attack]
            name=energy ray
        [/filter_attack]
        start_time=-100
        missile_start_time=-50
        [missile_frame]
            duration=200
            image="projectiles/darkmissile-n.png"
            image_diagonal="projectiles/darkmissile-ne.png"
        [/missile_frame]
        [frame]
            image="units/alien/core-compact.png:200"
            auto_hflip=no
        [/frame]
        {SOUND:HIT_AND_MISS magic-dark.ogg magic-dark-miss.ogg -100}
    [/attack_anim]
[/unit_type]

# This is the Alien Central Body which is vulnerable to attacks
[unit_type]
    [base_unit]
        id=Central Body Base
    [/base_unit]
    id=Central Body1
    hide_help=yes
    do_not_list=yes
    [abilities]
        [regenerate]
            value=100
            id=regenerates_yec
            name= _ "alien regenerates"
            female_name= _ "female^alien regenerates"
            description= _ "The unit will heal itself 100 HP per turn. If it is poisoned, it will remove the poison instead of healing."
            affect_self=yes
            poison=cured
        [/regenerate]
    [/abilities]
[/unit_type]

# This is the Alien Central Body which is vulnerable to attacks
[unit_type]
    [base_unit]
        id=Central Body Base
    [/base_unit]
    id=Central Body2
    name= _ "Weakened Central Body"
    hitpoints={ON_DIFFICULTY 50 75 100}
    [resistance]
        blade=110
        pierce=110
        impact=80
        fire=150
        cold=150
        arcane=200
    [/resistance]

    hide_help=yes
    do_not_list=yes
    die_sound=wail-long.wav

    [attack]
        damage=3
    [/attack]
    [attack]
        damage=3
    [/attack]

    [death]
        [die_sound_frame]
            duration=600
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound=lich-hit-1.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=400
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound=lich-hit-2.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=900
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=600
            sound=lich-die.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound=explosion.ogg
        [/die_sound_frame]

        # Creating timed explosions at POS
#define BURST_FRAME NUMBER TIME DELAY POS
    burst_{NUMBER}_start_time={TIME}
    [burst_{NUMBER}_frame]
        duration={DELAY}
        halo=halo/flame-burst-[1~8].png:50,misc/blank-hex.png:1
        halo_x,halo_y={POS}
        auto_hflip=no
        auto_vflip=no
    [/burst_{NUMBER}_frame]
    [burst_{NUMBER}_frame]
        halo=projectiles/fireball-impact-[1,1~16].png,misc/blank-hex.png:1
        halo_x,halo_y={POS}
        auto_hflip=no
        auto_vflip=no
    [/burst_{NUMBER}_frame]
#enddef

        {BURST_FRAME 1    0 1800  -9,17}
        {BURST_FRAME 2  600 1700  18,0}
        {BURST_FRAME 3 1200 1600  -9,-18}
        {BURST_FRAME 4 1800 1500   9,17}
        {BURST_FRAME 5 2400 1400   8,-18}
        {BURST_FRAME 6 3000 1300 -18,0}

#undef BURST_FRAME

        [frame]
            duration=2500
            image="units/alien/core-compact.png"
            blend_color=255,255,255
            blend_ratio=0.0~1.0
            auto_hflip=no
        [/frame]
        [frame]
            duration=2600
            image="units/alien/core-compact.png"
            blend_color=255,255,255
            blend_ratio=1.0
            alpha=1.0~0.0
            auto_hflip=no
        [/frame]
        [frame]
            duration=1
            image="misc/blank-hex.png"
        [/frame]
    [/death]
[/unit_type]
