//////////////////////////////
// CACODEMON				//
//////////////////////////////
ACTOR CacodemonNew
{
	SpawnID 19
	Health 400
	Radius 31
	Height 56
	Mass 400
	Speed 8
	PainChance 128
	MONSTER 
	+FLOAT 
	+NOGRAVITY
	SeeSound "caco/sight"
	PainSound "caco/pain"
	DeathSound "caco/death"
	ActiveSound "caco/active"
	Obituary "$OB_CACO"
	HitObituary "$OB_CACOHIT"
	DropItem "ArmorBonus"
	States
	{
	Spawn:
		HEAD A 10 A_Look
	Loop
		
	See:
		HEAD A 3 A_Chase
	Loop
		
	Missile:
		HEAD B 5 A_FaceTarget
		HEAD C 5 A_FaceTarget
		HEAD D 5 BRIGHT A_HeadAttack
	Goto See
		
	Pain:
		HEAD E 3
		HEAD E 3 A_Pain
		HEAD F 6
	Goto See

	Death.SmallBullets:
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		HEAD G 8 A_NoBlocking
		HEAD H 8 A_Scream
		HEAD I 8
		HEAD J 8
		HEAD K 8
		HEAD L -1 A_SetFloorClip
	Stop
		
	Death:
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAAA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
		HEAD G 8 A_NoBlocking
		HEAD H 8 A_Scream
		HEAD I 8
		HEAD J 8
		HEAD K 8
		HEAD L -1 A_SetFloorClip
	Stop

	XDeath:
		TNT1 A 0 A_CustomMissile("XCacodemonDeathLowTorso", 60,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("XCacodemonDeathHighTorso", 60,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("XCacoEyeballDeath", 60,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("XDeathMonster2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("IntestinalGutsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("RibsFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("OrgansFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("TorsoFlying", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_Playsound ("BIGDETH", 1, 128, FALSE)
	Stop
		
	Raise:
		HEAD L 8 A_UnSetFloorClip
		HEAD KJIHG 8
	Goto See
	}
}

///////////////////////////////////////
ACTOR XCacoEyeballDeath
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+BOUNCEONWALLS
	+SKYEXPLODE
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+RIPPER
	+BLOODLESSIMPACT 
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE6"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		CZEY ABCD 3 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		TNT1 A 0 A_SpawnItem("BloodSpot",0,0,0,1)
		CZEY E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XCacodemonDeathHighTorso
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+BOUNCEONCEILINGS
	+SKYEXPLODE
	+MOVEWITHSECTOR
	-DONTSPLASH
	+THRUGHOST
	DeathSound "LILGORE5"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		CZHD A 1 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		TNT1 A 0 A_Playsound ("LILGORE5", 1, 128, FALSE)
		TNT1 A 0 A_CustomMissile ("ThickBloodSlatter", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_CustomMissile ("UniversalBloodSlatter", 0, 0, random (0, 360), 2, random (0, 360))
		CZHD A -1
	Stop
	
	Crash:
		CZHD A 0 A_Playsound ("LILGORE5", 1, 128, FALSE)
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XCacodemonDeathLowTorso
{
	Radius 8
	Height 8
	Mass 1
	Speed 24
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+SKYEXPLODE
	+BOUNCEONCEILINGS
	+MOVEWITHSECTOR
	-DONTSPLASH
	+THRUGHOST
	DeathSound "LILGORE5"
	Decal BloodSuperSplatter
	States
{
	Spawn:
		CAZZ ABCD 5 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		TNT1 A 0 A_Playsound ("LILGORE5", 1, 128, FALSE)
		TNT1 A 0 A_Playsound ("LILGORE5", 1, 128, FALSE)
		TNT1 A 0 A_Playsound ("LILGORE5", 1, 128, FALSE)
		TNT1 A 0 A_CustomMissile ("ThickBloodSlatter", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_CustomMissile ("UniversalBloodSlatter", 0, 0, random (0, 360), 2, random (0, 360))
		CAZZ D -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}