//////////////////////////////
// NIGHTGAUNTS				//
//////////////////////////////
ACTOR Nightgaunt
{
	Health 400
	Radius 31
	Height 56
	Mass 400
	Speed 20
	Scale 0.8
	PainChance 120
	GibHealth 40
	MONSTER
	+FLOAT
	+NOGRAVITY
	SeeSound "NIGHTSEE"
	PainSound "NIGTPAIN"
	DeathSound "NIGTDETH"
	ActiveSound "NIGHTACT"
	Obituary "%o was spooked by a nightgaunt."
	DropItem "HealthBonus"
	States
{
	Spawn:
		NIGT ABCZDCB 3 A_Look
	Loop

	See:
		NIGT ABCZDCB 3 A_Chase
	Loop

	Missile:
		NIGT CZDE 3 A_FaceTarget
		NIGT E 3 Bright A_CustomMissile("NightgauntFire", 0, 0, 0)
	Goto See

	Pain:
		NIGT F 3 A_Pain
	Goto See

	Death.SmallBullets:
		NIGT F 3
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 360), 2, random(0, 90))
		NIGT G 3 A_Scream
		NIGT H 3
		NIGT IJKL 3 A_NoBlocking
		NIGT N -1 A_SetFloorClip
	Stop

	Death:
		NIGT F 3
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatterFast", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("FlyingBlood", 20,  0, random(0, 360), 2, random(0, 90))
		NIGT G 3 A_Scream
		NIGT H 3
		NIGT IJKL 3 A_NoBlocking
		NIGT N -1 A_SetFloorClip
	Stop
	
	XDeath:
		TNT1 A 1 A_PlaySound ("BIGDETH", CHAN_5)
		TNT1 AAA 0 A_CustomMissile("UniversalBloodSlatter", 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("UniversalBloodSlatterFast", 20,  0, random(0, 360), 2, random(0, 190))
		TNT1 AAA 0 A_CustomMissile("ThickBloodSlatter", 20,  0, random(0, 500), 2, random(0, 190))
		TNT1 A 0 A_CustomMissile("XNightgauntTorsoFlying", 50,  0, random(0, 360), 2, random(40, 90))
		TNT1 A 0 A_CustomMissile("XNightgauntWingsFlying", 50,  0, random(0, 460), 4, random(0, 290))
		TNT1 A 0 A_CustomMissile("XNightgauntWingsFlying", 50,  0, random(0, 460), 4, random(0, 290))
		TNT1 A 0 A_CustomMissile("FunnyFlyingNightgauntHead", 40,  0, random(0, 360), 2, random(45, 50))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AAA 0 A_CustomMissile("XDeathMonster2", 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 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 AA 0 A_CustomMissile("GoreChunk2", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("GoreChunk1", 20,  0, random(0, 360), 2, random(0, 90))
		TNT1 A 0 A_CustomMissile("GoreChunkSuper", 20,  0, random(0, 360), 2, random(0, 90))
	Stop

	Raise:
		NIGT ABC 4 A_UnSetFloorClip
		NIGT DZCBA 4
	Goto See
	}
}

///////////////////////////////////////
ACTOR XNightgauntWingsFlying
{
	Radius 8
	Height 8
	Mass 1
	Speed 10
	Mass 1
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+SKYEXPLODE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+RIPPER
	+BLOODLESSIMPACT 
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE2"
	Decal ZedekBloodSauce
	States
{
	Spawn:
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		NGWG ABCD 4 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))
	Loop
	
	Death:
		NGWG E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR FunnyFlyingNightgauntHead
{
	Radius 8
	Height 8
	Mass 1
	Speed 10
	Mass 1
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+SKYEXPLODE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+RIPPER
	+BLOODLESSIMPACT 
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE2"
	Decal ZedekBloodSauce
	States
{
	Spawn:
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		NGHE ABCD 5 A_CustomMissile ("FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		NGHE E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}

///////////////////////////////////////
ACTOR XNightgauntTorsoFlying
{
	Radius 8
	Height 8
	Mass 1
	Speed 10
	Mass 1
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+SKYEXPLODE
	+MOVEWITHSECTOR
	+CLIENTSIDEONLY
	+RIPPER
	+BLOODLESSIMPACT 
	-DONTSPLASH
	+THRUGHOST
	DamageType Blood
	DeathSound "LILGORE2"
	Decal ZedekBloodSauce
	States
{
	Spawn:
		TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
		NGTR ABCD 4 A_CustomMissile ("ThickBloodSlatter", 0, 0, random (0, 360), 2, random (0, 360))
	Loop
	
	Death:
		NGTR E -1
	Stop
		
	Splash:
		TNT1 A 0
	Stop
	}
}