class Shadling : SquareMonster
{
	Default
	{
		Health 100;
		Speed 8;
		Radius 16;
		Height 32;
		FastSpeed 12;
		BloodType 'SpectraBlood';
		BloodColor "00 be ff";
		Obituary "$OB_SHADLING";
		Species 'E2Boss';
		Mass 1000;

		PainSound "shadling/pain";
		DeathSound "shadling/death";

		DamageFactor "Vacuum", 0.0;

		+FLOAT;
		+NOGRAVITY;
		+DONTFALL;
		-COUNTKILL;
	}
	States
	{
	Spawn:
		SHDH A 7 Bright A_Look();
		Loop;
	See:
		SHDH A 3 Bright A_Chase();
		Loop;
	Missile:
		SHDH A 5 Bright A_FaceTarget();
		SHDH C 0 Bright A_PlaySound("shadling/attack");
		SHDH C 5 Bright A_SpawnProjectile("ShadlingBall", 12);
		SHDH B 5 Bright;
		Goto See;
	Pain:
		SHDH D 3 Bright;
		SHDH D 3 Bright A_Pain();
		Goto See;
	Stun:
		SHDH AAAABBBBCCCCBBBB 1 Bright A_ChangeVelocity(frandom(-1, 1), frandom(-1, 1), frandom(-1, 1), CVF_REPLACE);
		Loop;
	Death:
		SHDH A 2 Bright;
		SHDH A 0 Bright A_SpawnItemEx("ShadiusPoof");
		SHDH A 2 Bright A_Scream();
		TNT1 A 50; // for death sound
		Stop;
	}
}
