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

    {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/dark-missile.png
        type=cold
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=3
        number=3
    [/attack]
    [attack]
        name=energy ray
        description= _"energy ray"
        icon=attacks/dark-missile.png
        type=cold
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=3
        number=3
    [/attack]

#define CENTRAL_BODY_ATTACK_ANIMATION AFFIX
    # AFFIX must name an image function
    start_time=-100
    missile_start_time=-50
    [missile_frame]
        duration=200
        image="projectiles/darkmissile-n.png"
        image_diagonal="projectiles/darkmissile-ne.png"
    [/missile_frame]
    [if]
        hits=no
        [frame]
            duration=200
            image="units/alien/core-compact.png~{AFFIX}"
            sound=magic-dark-miss.ogg
        [/frame]
    [/if]
    [else]
        hits=yes
        [frame]
            duration=200
            image="units/alien/core-compact.png~{AFFIX}"
            sound=magic-dark.ogg
        [/frame]
    [/else]
#enddef

#define CENTRAL_BODY_DEATH_ANIMATION BASE_IMAGE_AFFIX OVERLAY_IMAGE_AFFIX
    start_time=0

    die_sound_start_time=0

    [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]

    flame_burst_1_start_time=0
    flame_burst_2_start_time=600
    flame_burst_3_start_time=1200
    flame_burst_4_start_time=1800
    flame_burst_5_start_time=2400
    flame_burst_6_start_time=3000

    [flame_burst_1_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=-9,17
    [/flame_burst_1_frame]
    [flame_burst_2_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=18,0
    [/flame_burst_2_frame]
    [flame_burst_3_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=-9,-18
    [/flame_burst_3_frame]
    [flame_burst_4_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=9,17
    [/flame_burst_4_frame]
    [flame_burst_5_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=8,-18
    [/flame_burst_5_frame]
    [flame_burst_6_frame]
        duration=800
        halo=misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,halo/flame-burst-1.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-2.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-3.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-4.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-5.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-6.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-7.png~{OVERLAY_IMAGE_AFFIX}:50,halo/flame-burst-8.png~{OVERLAY_IMAGE_AFFIX}:50,misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1
        halo_x,halo_y=-18,0
    [/flame_burst_6_frame]

    explosion_1_start_time=1800
    explosion_2_start_time=2300
    explosion_3_start_time=2800
    explosion_4_start_time=3300
    explosion_5_start_time=3800
    explosion_6_start_time=4300

    [explosion_1_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=-9,17
    [/explosion_1_frame]
    [explosion_2_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=18,0
    [/explosion_2_frame]
    [explosion_3_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=-9,-18
    [/explosion_3_frame]
    [explosion_4_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=9,17
    [/explosion_4_frame]
    [explosion_5_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=8,-18
    [/explosion_5_frame]
    [explosion_6_frame]
        duration=800
        halo="misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1,projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-1.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-2.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-3.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-4.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-5.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-6.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-7.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-8.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-9.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-10.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-11.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-12.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-13.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-14.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-15.png~{OVERLAY_IMAGE_AFFIX},projectiles/fireball-impact-16.png~{OVERLAY_IMAGE_AFFIX},misc/blank-hex.png~{OVERLAY_IMAGE_AFFIX}:1"
        halo_x,halo_y=-18,0
    [/explosion_6_frame]

    [frame]
        duration=2500
        image="units/alien/core-compact.png~{BASE_IMAGE_AFFIX}"
        blend_color=255,255,255
        blend_ratio=0.0~1.0
    [/frame]
    [frame]
        duration=2600
        image="units/alien/core-compact.png~{BASE_IMAGE_AFFIX}"
        blend_color=255,255,255
        blend_ratio=1.0
        alpha=1.0~0.0
    [/frame]
    [frame]
        duration=1
        image="misc/blank-hex.png~{BASE_IMAGE_AFFIX}"
    [/frame]
#enddef

    # NOTE: The following attack filters deliberately match both ranged and melee.
    [attack_anim]
        [filter_attack]
            name=energy ray
        [/filter_attack]
        direction=n,ne,se,s
        {CENTRAL_BODY_ATTACK_ANIMATION "NOP()"}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=energy ray
        [/filter_attack]
        direction=nw,sw
        {CENTRAL_BODY_ATTACK_ANIMATION "FL(horiz)"}
    [/attack_anim]

    [death]
        direction=n,ne
        {CENTRAL_BODY_DEATH_ANIMATION "NOP()" "NOP()"}
    [/death]
    [death]
        direction=s,se
        {CENTRAL_BODY_DEATH_ANIMATION "NOP()" "FL(vert)"}
    [/death]
    [death]
        direction=nw
        {CENTRAL_BODY_DEATH_ANIMATION "FL(horiz)" "NOP()"}
    [/death]
    [death]
        direction=sw
        {CENTRAL_BODY_DEATH_ANIMATION "FL(horiz)" "FL(vert)"}
    [/death]

#undef CENTRAL_BODY_ATTACK_ANIMATION
#undef CENTRAL_BODY_DEATH_ANIMATION
[/unit_type]
