actor KaonaGeeno 18497
{
//$Category MM8BDM-Props
+SOLID
height 32
radius 11
scale 2.5
States
{
Spawn:
KAON A 100
KAON A 1 A_Jump(128, "Flip")
loop
Flip:
KAON B 0 A_SpawnItemEx("KaonaGeenoHead", -1, 0, 32, 0, 0, 15)
KAON BCD 4
HeadWait:
KAON E 18
Goto Spawn
}
}

actor KaonaGeenoHead
{
PROJECTILE
damage (0)
+DONTREFLECT
-NOGRAVITY
scale 2.5
states
{
Spawn:
KAON H 1
KAON H -1 A_ClearTarget
stop
}
}


actor ChillIceCube 18498
{
	//$Category MM8BDM-Interactive Props
	+SOLID
	-CANPASS
	+NOGRAVITY
	+SHOOTABLE
	+NODAMAGE
	+NORADIUSDMG
	+DONTBLAST
	+DONTRIP
    +FORCEYBILLBOARD
	Health 100
	painchance 256
	height 64
	radius 32
	scale 2.0
	species "IceCube"
	States
	{
	Spawn:
		CHIC A 0
		CHIC A -1
		loop
	Spawn2:
		CHIC B -1 // pegg was here
		loop
	Pain:
		CHIC A 0 A_JumpIfInventory("CutterFlag", 1, "Broken")
		CHIC A 0 A_PlaySound("weapon/ChillBlockCrack",1,0.5)
		CHIC A 1 A_GiveInventory("CutterFlag", 1)
		Goto Spawn2
	Broken:
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 AAAAA 0 A_SpawnItemEx("ChillIceCubeShard",0,0,0,random(1,5),random(-10,10),random(8,12),random(-5,5)) 
		TNT1 A 0 A_PlaySound("weapon/ChillBlockBreak",1,0.5)
	Respawning: // 525
		TNT1 A 525 A_ChangeFlag("SOLID", 0)
		TNT1 A 90 A_SpawnItemEX("ChillIceCubeRespawnFX")
		TNT1 A 1 A_SpawnItemEx("ChillIceCubeRespawnCheck")
		TNT1 A 0 A_JumpIfInventory("BossHealth2", 1, "Respawned")
		loop
	Respawned:
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 1)
		CHIC A 0 A_ChangeFlag("SOLID", 1)
		TNT1 A 0 A_PlaySound("misc/SpawnIn",1,0.5)
		TFOG A 3 A_TakeInventory("BossHealth2", 999)
		TFOG CB 2
		TNT1 A 0 A_TakeInventory("CutterFlag", 999)
		CHIC A 1
		Goto Spawn
	}
}

actor ChillIceCubeRespawnCheck
{
PROJECTILE
damage (0)
speed 0
+DONTREFLECT
+DONTBLAST
-SOLID
+THRUSPECIES
species "IceCube"
height 63
radius 31
States
{
	Spawn:
	TNT1 A 1
	TNT1 A 1 A_GiveInventory("BossHealth2", 1, AAPTR_TARGET)
	stop
	Death:
	TNT1 A 0 A_SpawnItemEx("ChillIceCubeRespawnDamager")
	TNT1 AAAAA 0 A_SpawnItemEx("ChillIceCubeShard",0,0,0,random(1,5),random(-10,10),random(8,12),random(-5,5)) 
	stop	
}
}

actor ChillIceCubeRespawnDamager : ChillIceCubeRespawnCheck
{
+FOILINVUL
+THRUACTORS
Damage (5)
Damagetype "ChillCubeRespawn"
SelfObituary "$OB_CHILLCUBERESPAWN"
states
{
	Spawn:
	TNT1 A 0
	TNT1 A 1 A_ClearTarget // this actor is needed for this (minus frags)
	TNT1 A 1 A_ChangeFlag("THRUACTORS", 0)
	stop
	Death:
	TNT1 A 0
	stop
}
}

actor ChillIceCubeShard //sakugarnedebris
{
	PROJECTILE
	+DONTSPLASH
	+CLIENTSIDEONLY
	+THRUACTORS
	-NOGRAVITY
	Damage (0)
	Height 3
	Radius 3
	Speed 5
	scale 1.5
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 A_Jump(256,"Shard1","Shard2","Shard3")
		Shard1:
		CHIC C -1
		Shard2:
		CHIC D -1
		Shard3:
		CHIC E -1
		stop
	}
}

actor ChillIceCubeRespawnFX
{
	+CLIENTSIDEONLY
	+NOINTERACTION
	+NOGRAVITY
	-SOLID
    +FORCEYBILLBOARD
	radius 2
	height 2
	scale 2.0
	renderstyle translucent
	alpha 0.5
	States
	{
	Spawn:
		CHIC FHFHFHFHF 10 //Frame F exists as a duplicate of Frame A so that it doesnt render the voxel, frame H doesnt exist and is used as a blinky thing
		stop
	}
}
