Actor SentinelCube : McM_Monster replaces LostSoul {
	Health 75
	Radius 16
	Height 56
	Mass 150
	Speed 8
	PainChance 128
	Monster
	Obituary "%o got fried by a Sentinel Cube."
	+NoGravity
	+Float
	+DontFall
	+DontHurtSpecies
	+DONTBLAST
	+NOBLOOD
	SeeSound "monster/sensit"
	PainSound "monster/senpai"
	ActiveSound "monster/cubfly"
	deathsound "monster/sendth"
	Tag "Sentinel Cube"
	Species "SentinelCube"
	States  { 
		Idle: 
			CUBE A 10 A_Look 
		Loop 
		See: 
			CUBE ABC 5 A_Chase
		Loop 
		Missile:
			TNT1 A 0 A_JumpIfInventory("MCM_BehaviorToggle", 1, "MissileRepeat")
			CUBE D 5 Bright A_FaceTarget 
			TNT1 A 0 A_PlaySound("Cube/Fire", 5)
			CUBE E 0 A_CustomMissile("CubeShot",10,4,0,1)
			CUBE E 4 Bright A_CustomMissile("CubeShot",10,-4,0,1)
			CUBE D 4 Bright A_FaceTarget 
			TNT1 A 0 A_PlaySound("Cube/Fire", 5)
			CUBE E 0 A_CustomMissile("CubeShot",10,4,0,1)
			CUBE E 4 Bright A_CustomMissile("CubeShot",10,-4,0,1)
			CUBE D 4 Bright A_FaceTarget  
			TNT1 A 0 A_PlaySound("Cube/Fire", 5)
			CUBE E 0 A_CustomMissile("CubeShot",10,4,0,1)
			CUBE E 4 Bright A_CustomMissile("CubeShot",10,-4,0,1)
			CUBE D 4 Bright A_FaceTarget
		Goto See 
		MissileRepeat:
			CUBE D 3 Bright A_FaceTarget 
			TNT1 A 0 A_PlaySound("Cube/Fire", 5)
			TNT1 A 0 A_CustomMissile("CubeShot",10,4,0,1)
			CUBE E 4 Bright A_CustomMissile("CubeShot",10,-4,0,1)
			CUBE D 2 A_CPosRefire
		Loop
		Pain: 
			CUBE D 3 
			CUBE D 3 A_Pain 
		Goto See 
		Death:
			CUBE E 0 A_NoBlocking
			CUBE E 0 A_SetFloorClip
			CUBE E 6 Bright A_Scream 
			CUBE FGH 6 Bright
		Stop 
		Death.Corpse:
			TNT1 A -1
		Stop
	} 
}

Actor SentinelCube_NoCount : SentinelCube {
	-COUNTKILL
}

Actor CubeShot {
	Radius 5
	Height 5
	Speed 18
	Damage (random(2, 8))
	DamageType Fire
	RenderStyle Add
	Alpha 0.85
	Projectile
	Seesound "weapons/firsfi"
	DeathSound "weapons/maceex"
	Obituary "%o got fried by a Sentinel Cube."
	States {
		Spawn:
			CBAL AB 3 Bright A_SpawnItemEx("CubePuff",0,0,0,0,0,0,0,128)
		Loop
		Death:
			CBAL CDEFG 3 Bright
		Stop
	}
}

Actor CubePuff {   
	Radius 2
	Height 2
	Speed 0
	Scale 1.0
	Projectile
	RenderStyle Add
	Alpha 0.67
	+CLIENTSIDEONLY
	States {
		Spawn:
			CBAL HIJ 3 Bright
		Stop 
	}
}