class SpyEye : SquareMonster
{
	Default
	{
		Radius 16;
		Mass 50;
		Damage 3;
		Speed 10;
		FastSpeed 16;
		Height 32;
		PainChance 160;
		Health 80;
		BloodColor "fa fa fa";
		BloodType 'SquareBlood';
		Obituary "$OB_SPYEYE";
		MaxStepHeight 16;
		+FLOAT;
		+NOGRAVITY;
		+MISSILEMORE;
		+DONTFALL;
		+NOICEDEATH;
		+RANDOMIZE;
		AttackSound "spyeye/attack";
		PainSound "spyeye/pain";
		DeathSound "spyeye/death";
	}
	States
	{
	Spawn:
		SPYE ABCD 12 A_Look();
		Loop;
	See:
		SPYE A 0 A_SpawnItemEx("SpyEyeDrip", -8, 0, 8, 0, 0, 0, 0, SXF_CLIENTSIDE, 192);
		SPYE AABBCCDD 6 A_Chase();
		Loop;
	Missile:
		SPYE E 10 A_FaceTarget();
		SPYE F 4 A_SkullAttack(20);
	MissileLoop:
		SPYE G 4;
		SPYE F 4;
		Loop;
	Pain:
		SPYE H 4;
		SPYE H 4 A_Pain();
		Goto See;
	Death:
		SPYE H 0 A_Stop();
		SPYE H 0 A_NoBlocking();
		SPYE H 2 A_Scream();
		SPYE H 7 A_SpawnItem("GibSpawnerSpyEye");
		TNT1 A 18;
		Stop;
	}
}

class SpyEyeDrip : Gib4
{
	Default
	{
		Translation "198:198=10:10";
	}
}

class BossSpyEye : SpyEye
{
	Default
	{
		BloodColor "00 be ff";
		SeeSound "spyeye/melee";
		Obituary "$OB_SHADIUS_SPYEYE";
		Speed 12;
		FastSpeed 18;
		-COUNTKILL;
	}
	States
	{
	Spawn:
		SPYX A 10 Bright A_Look();
		Loop;
	See:
		SPYX A 4 Bright A_Chase();
		Loop;
	Missile:
		SPYX A 10 Bright A_FaceTarget();
	MissileStart:
		SPYX A 4 Bright A_SkullAttack();
	MissileLoop:
		SPYX A 4 Bright;
		Loop;
	Pain:
		SPYX A 3 Bright;
		SPYX A 3 Bright A_Pain();
		Goto See;
	Stun:
		SPYX A 1 Bright A_ChangeVelocity(frandom(-1, 1), frandom(-1, 1), frandom(-1, 1), CVF_REPLACE);
		Loop;
	Death:
		SPYX A 0 Bright A_Stop();
		SPYX A 0 Bright A_NoBlocking();
		SPYX A 2 Bright A_Scream();
		SPYX A 2 Bright A_SpawnItem("GibSpawnerBossSpyEye");
		TNT1 A 35;
		Stop;
	}

}
