class SquareBlood : Actor
{
	Default
	{
		+CLIENTSIDEONLY;
		+NOGRAVITY;
		+NOCLIP;
		+NOBLOCKMAP;
		+DONTBLAST;
		VSpeed 0;
		Args 160;
	}
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 AAA 0 A_SpawnItemEx("BloodBits",
			random[SquareBloodRandom](-4,4),
			random[SquareBloodRandom](-4,4),
			random[SquareBloodRandom](-4,4),
			random[SquareBloodRandom](-3,3),
			random[SquareBloodRandom](-3,3),
			random[SquareBloodRandom](0,7),
			0, SXF_TRANSFERTRANSLATION, args[0]
		);
	Frames:
		BLUD A 0 A_Jump(256,1,2,3);
		BLUD ABCD 3;
		Stop;
	}
}

class BloodBits : Actor
{
	Default
	{
		PROJECTILE;
		+CLIENTSIDEONLY;
		+FORCEXYBILLBOARD;
		-NOGRAVITY;
		+THRUACTORS;
		+DONTBLAST;

		Speed 3;
		VSpeed 8;
		Radius 1;
		Height 1;
		Gravity 0.5;
		Alpha 1.0;

		ReactionTime 20; // For Countdown TTL

		DeathSound "effects/blood/splat";
		Decal 'BloodSplat';
		RenderStyle 'Translucent';
	}
	States
	{
	Spawn:
		BLUD E 0 A_Countdown();
		BLUD EFGH 4 A_SpawnItemEx("BloodDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Goto Spawn;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_JumpIf(pos.z-floorz<2, "Splat");
		BLUD ABCD 3;
		Stop;
	Splat:
		TNT1 A 0 A_Jump(256,1,11,21);
		BLDP A 525;
		BLDP AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		BLDP B 525;
		BLDP BBBBBBBBB 2 A_FadeOut(0.1);
		Stop;
		BLDP C 525;
		BLDP CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
	}
}

class BloodDroplet : Actor
{
	Default
	{
		PROJECTILE;
		+CLIENTSIDEONLY;
		+FORCEXYBILLBOARD;
		+NODAMAGETHRUST;
		+DONTSPLASH;
		+DONTBLAST;

		Speed 2;
		Radius 1;
		Height 1;
		Scale 0.8;
		Alpha 1.0;

		RenderStyle 'Translucent';
	}
	States
	{
	Spawn:
		BLUD IJKL 4;
		Stop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		BLDP D 525;
		BLDP DDDDDDDDD 2 A_FadeOut(0.1);
		Stop;
		BLDP E 525;
		BLDP EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
		BLDP F 525;
		BLDP FFFFFFFFF 2 A_FadeOut(0.1);
		Stop;
	}
}

class GenericGib : BloodBits
{
	Default
	{
		-NOBLOCKMAP;
		+BOUNCEONWALLS;
		+BOUNCEONCEILINGS;
		Scale 1.0;
		Alpha 1.0;
		DeathSound "effects/plop";
	}
	States
	{
	Spawn:
		TNT1 A 1;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		BLDP A 394;
		BLDP AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		BLDP B 394;
		BLDP BBBBBBBBB 2 A_FadeOut(0.1);
		Stop;
		BLDP C 394;
		BLDP CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
	}
}

class GenericBouncyGib : GenericGib
{
	Default
	{
		+BOUNCEONWALLS;
		+BOUNCEONFLOORS;
		+BOUNCEONCEILINGS;
		+ALLOWBOUNCEONACTORS;
		+BOUNCEAUTOOFF;
		DeathSound "";
		Gravity 1.0;
	}
	States
	{
	Spawn:
		TNT1 A 1;
		Loop;
	Death:
		#### # 0 A_QueueCorpse();
		#### # 525;
		#### # 2 A_FadeOut(0.1);
		Wait;
	}
}

class Gib1 : GenericGib
{
	States
	{
	Spawn:
		GIB1 A 0 A_Countdown();
		GIB1 ABCD 3	A_SpawnItemEx("BloodDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Goto Spawn;
	}
}

class Gib2 : GenericGib
{
	States
	{
	Spawn:
		GIB2 A 0 A_Countdown();
		GIB2 ABCD 3	A_SpawnItemEx("BloodDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Goto Spawn;
	}
}

class Gib3 : GenericGib
{
	States
	{
	Spawn:
		GIB3 A 0 A_Countdown();
		GIB3 ABCD 3	A_SpawnItemEx("BloodDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Goto Spawn;
	}
}

class Gib4 : GenericGib
{
	States
	{
	Spawn:
		GIB4 A 5;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		BLDP D 525;
		BLDP DDDDDDDDD 2 A_FadeOut(0.1);
		Stop;
		BLDP E 525;
		BLDP EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
		BLDP F 525;
		BLDP FFFFFFFFF 2 A_FadeOut(0.1);
		Stop;
	}
}

class Gib5 : Gib4
{
	States
	{
	Spawn:
		GIB5 A 5;
		Loop;
	}
}

class Gib6 : Gib4
{
	States
	{
	Spawn:
		GIB6 A 5;
		Loop;
	}
}

class GenericMechGib : GenericGib
{
	States
	{
	Death:
		Stop;
	}
}

class Mib1 : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIB1 ABCD 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		MIB1 X 525;
		MIB1 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		TNT1 A 0;
		Stop;
	}
}

class Mib2 : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIB2 ABCDEFGH 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		MIB2 X 525;
		MIB2 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		MIB2 Y 525;
		MIB2 YYYYYYYYY 2 A_FadeOut(0.1);
		Stop;
		TNT1 A 0;
		Stop;
	}
}

class Mib3 : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIB3 ABCDEFGH 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		MIB3 X 525;
		MIB3 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		MIB3 Y 525;
		MIB3 YYYYYYYYY 2 A_FadeOut(0.1);
		Stop;
		TNT1 A 0;
		Stop;
	}
}

class CrateMib1 : Mib1
{
	Default
	{
		DeathSound "";
	}
}

class CrateMib2 : Mib2
{
	Default
	{
		DeathSound "";
	}
}

class CrateMib3 : Mib3
{
	Default
	{
		DeathSound "";
	}
}

class CrystalGib1 : GenericBouncyGib
{
	Default
	{
		+RANDOMIZE;
		BounceSound "effects/glass/small/bounce";
	}
	States
	{
	Spawn:
		CYD1 ABCD 2;
		Loop;
	Death:
		CYD1 C 525;
		CYD1 C 2 A_FadeOut(0.1);
		Wait;
	}
}

class SilentCrystalGib : CrystalGib1
{
	Default
	{
		BounceSound "";
	}
}

class CrystalGib2 : GenericGib
{
	Default
	{
		+RANDOMIZE;
		DeathSound "effects/glass";
	}
	States
	{
	Spawn:
		CYD2 ABCDEFGH 3;
		Loop;
	Death:
		#### "#" 525;
		#### # 2 A_FadeOut(0.1);
		Wait;
	}
}

class GlassMib1 : Mib1
{
	Default
	{
		DeathSound "effects/glass";
		RenderStyle 'Translucent';
		Alpha 0.75;
	}
	States
	{
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		MIB1 X 525;
		MIB1 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		BULT CDEF 3;
		Stop;
	}
}

class GlassMib2 : Mib2
{
	Default
	{
		DeathSound "effects/glass";
		RenderStyle 'Translucent';
		Alpha 0.75;
	}
	States
	{
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		MIB2 X 525;
		MIB2 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		MIB2 Y 525;
		MIB2 YYYYYYYYY 2 A_FadeOut(0.1);
		Stop;
		BULT CDEF 3;
		Stop;
	}
}

class GlassMib3 : Mib3
{
	Default
	{
		DeathSound "effects/glass";
		RenderStyle 'Translucent';
		Alpha 0.75;
	}
	States
	{
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21);
		MIB3 X 525;
		MIB3 XXXXXXXXX 2 A_FadeOut(0.1);
		Stop;
		MIB3 Y 525;
		MIB3 YYYYYYYYY 2 A_FadeOut(0.1);
		Stop;
		BULT CDEF 3;
		Stop;
	}
}

class MibChip : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIBC ABCD 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		MIBC A 525;
		MIBC AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		MIBC C 525;
		MIBC CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
	}
}

class MibGear : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIBG AB 3;
		Loop;
	}
}

class MibBoard : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIBM ABCDEFGH 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11,21,31);
		MIBM A 525;
		MIBM AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		MIBM C 525;
		MIBM CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
		MIBM E 525;
		MIBM EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
		MIBM G 525;
		MIBM GGGGGGGGG 2 A_FadeOut(0.1);
		Stop;
	}
}

class MibSpring : GenericMechGib
{
	Default
	{
		DeathSound "effects/debris";
	}
	States
	{
	Spawn:
		MIBS ABCDEFGH 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		MIBS A 525;
		MIBS AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		MIBS E 525;
		MIBS EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibEye : GenericBouncyGib
{
	Default
	{
		BounceSound "effects/eye/bounce";
	}
	States
	{
	Spawn:
		GIBE ABCDEFGH 3;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		GIBE A 525;
		GIBE AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		GIBE E 525;
		GIBE EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibEye2 : GibEye
{
	Default
	{
		Scale 0.9;
	}
}

class GibTooth : GenericBouncyGib
{
	States
	{
	Spawn:
		GIBT ABCDEFGH 4;
		Loop;
	Death:
		TNT1 A 0 A_QueueCorpse();
		TNT1 A 0 A_Jump(256,1,11);
		GIBT C 525;
		GIBT CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
		GIBT G 525;
		GIBT GGGGGGGGG 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibTooth2 : GenericBouncyGib
{
	States
	{
	Spawn:
		GIBT IJ 4;
		Loop;
	Death:
		GIBE I 525 A_QueueCorpse();
		GIBE IIIIIIIII 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibKey : GenericBouncyGib
{
	States
	{
	Spawn:
		GIBK ABCDEFGH 4;
		Loop;
	Death:
		GIBK A 525 A_QueueCorpse();
		GIBK AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibAntenna : GenericBouncyGib
{
	States
	{
	Spawn:
		GIBA ABCDEFGH 4;
		Loop;
	Death:
		TNT1 A 0 A_Jump(256,1,11,21);
		GIBA A 525;
		GIBA AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		GIBA C 525;
		GIBA CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
		GIBA G 525;
		GIBA GGGGGGGGG 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibHardHat : GenericBouncyGib
{
	Default
	{
		BounceSound "effects/hardhat/bounce";
	}
	States
	{
	Spawn:
		GIBH ABCDEFGH 4;
		Loop;
	Death:
		TNT1 A 0 A_Jump(256,1,11,21);
		GIBH A 525;
		GIBH AAAAAAAAA 2 A_FadeOut(0.1);
		Stop;
		GIBH C 525;
		GIBH CCCCCCCCC 2 A_FadeOut(0.1);
		Stop;
		GIBH F 525;
		GIBH FFFFFFFFF 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibCheck : Inventory
{
	Default
	{
		Inventory.MaxAmount 999;
	}
}

class GibSpawner : Actor
{
	Default
	{
		+CLIENTSIDEONLY;
		+NOBLOCKMAP +NOGRAVITY +NOCLIP;
		Args 48, 4;
	}
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GibCheck", 1);
		TNT1 AAA 0 A_SpawnItemEx("Gib1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Gib2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Gib3", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Gib4", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Gib5", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Gib6", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 A 1 A_JumpIfInventory("GibCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class MibSpawner : GibSpawner
{
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GibCheck", 1);
		TNT1 AAAAAAAAAA 0 A_SpawnItemEx("Mib1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAAAAAAA 0 A_SpawnItemEx("Mib2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAAAAAAA 0 A_SpawnItemEx("Mib3", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAAA 0 A_SpawnItemEx("MibChip", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0);
		TNT1 AA 0 A_SpawnItemEx("MibGear", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0);
		TNT1 AA 0 A_SpawnItemEx("MibSpring", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0);
		TNT1 A 0 A_SpawnItemEx("MibBoard", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, 1, 128);
		TNT1 A 1 A_JumpIfInventory("GibCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class CribSpawner : GibSpawner
{
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GibCheck", 1);
		TNT1 AAA 0 A_SpawnItemEx("CrateMib1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("CrateMib2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("CrateMib3", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 A 1 A_JumpIfInventory("GibCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class CribSpawnerPlain : CribSpawner
{
	Default
	{
		BloodColor "d7 8c 5a";
		Args 24, 4;
	}
}

class CribSpawnerTNT : CribSpawner
{
	Default
	{
		BloodColor "ff 00 00";
		Args 24, 4;
	}
}

class GlassMibSpawner : GibSpawner
{
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GibCheck", 1);
		TNT1 AAAAAAAAAA 0 A_SpawnItemEx("GlassMib1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR );
		TNT1 AAAAAAAA 0 A_SpawnItemEx("GlassMib2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR );
		TNT1 AAAAAAAA 0 A_SpawnItemEx("GlassMib3", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR );
		TNT1 A 1 A_JumpIfInventory("GibCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class CrystalGibSpawner : GibSpawner
{
	Default
	{
		Args 16, 1;
	}
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 AA 0 A_SpawnItemEx("SilentCrystalGib", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, 0 );
		Stop;
	}
}

class CrystalFragmentSpawner : GibSpawner
{
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GibCheck", 1);
		TNT1 AA 0 A_SpawnItemEx("CrystalGib1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, 0);
		TNT1 AA 0 A_SpawnItemEx("CrystalGib2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, 0);
		TNT1 A 1 A_JumpIfInventory("GibCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class CrystalFragmentSpawnerSmall : CrystalFragmentSpawner
{
	Default
	{
		Args 16, 1;
	}
}

class CrystalFragmentSpawnerMedium : CrystalFragmentSpawner
{
	Default
	{
		Args 16, 3;
	}
}

class CrystalFragmentSpawnerLarge : CrystalFragmentSpawner
{
	Default
	{
		Args 24, 8;
	}
}

class GibSpawnerPlayer : GibSpawner
{
	Default
	{
		BloodColor "6f 00 6b";
		Args 24, 4;
	}
}

class GibSpawnerNonPlayer : GibSpawner
{
	Default
	{
		BloodColor "6f 00 6b";
		Args 24, 4;
	}
}

class GibSpawnerFizzoCrate : GibSpawner
{
	Default
	{
		BloodColor "6f 00 6b";
		Args 24, 4;
	}
}

class GibSpawnerCircleJerk : GibSpawner
{
	Default
	{
		BloodColor "00 00 ff";
		Args 24, 3;
	}
}

class GibSpawnerOvolt : MibSpawner
{
	Default
	{
		BloodColor "ff dc 3f";
		Args 16, 3;
	}
}

class GibSpawnerAirvolt : MibSpawner
{
	Default
	{
		BloodColor "00 ff ff";
		Args 16, 3;
	}
}

class GibSpawnerRevolt : MibSpawner
{
	Default
	{
		BloodColor "ff 00 00";
		Args 16, 3;
	}
}

class GibSpawnerChatterbox : MibSpawner
{
	Default
	{
		BloodColor "00 99 11";
		Args 32, 3;
	}
}

class GibSpawnerRectangolier : GibSpawner
{
	Default
	{
		BloodColor "ff 00 ff";
		Args 32, 3;
	}
}


class GibSpawnerAngleFish : GibSpawner
{
	Default
	{
		BloodColor "fa b9 a5";
		Args 16, 1;
	}
}

class GibSpawnerJetpackJerk : GibSpawner
{
	Default
	{
		BloodColor "ff dc 3f";
		Args 40, 5;
	}
}

class MibSpawnerTritankle : MibSpawner
{
	Default
	{
		BloodColor "79 1a 33";
		Args 16, 3;
	}
}

class MibSpawnerColorCube : MibSpawner
{
	Default
	{
		BloodColor "aa aa aa";
		Args 48, 5;
	}
}

class MibSpawnerDestructinator : MibSpawner
{
	Default
	{
		BloodColor "cc cc cc";
		Args 48, 2;
	}
}

class MibSpawnerCylonder : MibSpawner
{
	Default
	{
		BloodColor "9a 81 69";
		Args 32, 2;
	}
}

class GlassMibSpawnerShatterbox : GlassMibSpawner
{
	Default
	{
		BloodColor "00 ff ff";
		Args 32, 3;
	}
}

class GooCheck : Inventory
{
	Default
	{
		Inventory.MaxAmount 999;
	}
}

class GooSpawner : Actor
{
	Default
	{
		BloodColor "00 ff 00";
		+NOBLOCKMAP +NOGRAVITY +NOCLIP;
		Args 32, 1;
	}
	States
	{
	Spawn:
		TNT1 A 0;
		TNT1 A 0 A_GiveInventory("GooCheck", 1);
		TNT1 AAA 0 A_SpawnItemEx("Goo1", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-8,8), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Goo2", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Goo3", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Goo4", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Goo5", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 AAA 0 A_SpawnItemEx("Goo6", random[SquareGibRandom](args[0]-(args[0]*2),args[0]), random[SquareGibRandom](-4,4), random[SquareGibRandom](4,12), random[SquareGibRandom](-4,4), random[SquareGibRandom](-4,4), random[SquareGibRandom](0,8), 0, SXF_USEBLOODCOLOR);
		TNT1 A 1 A_JumpIfInventory("GooCheck",args[1],1);
		Loop;
		TNT1 A 0;
		Stop;
	}
}

class RedGooSpawner : GooSpawner
{
	Default
	{
		BloodColor "ff 00 00";
	}
}

class Goo1 : Gib1
{
	Default
	{
		RenderStyle 'Add';
	}
	States
	{
	Spawn:
		GIB1 ABCD 3	A_SpawnItemEx("GooDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Loop;
	}
}

class Goo2 : Gib2
{
	Default
	{
		RenderStyle 'Add';
	}
	States
	{
	Spawn:
		GIB2 ABCD 3	A_SpawnItemEx("GooDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Loop;
	}
}

class Goo3 : Gib3
{
	Default
	{
		RenderStyle 'Add';
	}
	States
	{
	Spawn:
		GIB3 ABCD 3	A_SpawnItemEx("GooDroplet", 0, 0, 0, 0, 0, -1, 0, SXF_TRANSFERTRANSLATION, 160);
		Loop;
	}
}

class GooDroplet : BloodDroplet { Default { RenderStyle 'Add'; } }

class Goo4 : Gib4 { Default { RenderStyle 'Add'; } }
class Goo5 : Gib5 { Default { RenderStyle 'Add'; } }
class Goo6 : Gib6 { Default { RenderStyle 'Add'; } }

class GibSpawnerStrongman : GibSpawner
{
	Default
	{
		BloodColor "f5 73 31";
		Args 48, 5;
	}
}

class GibSpawnerSpyEye : GibSpawner
{
	Default
	{
		BloodColor "fa fa fa";
		Args 16, 3;
	}
}

class GibSpawnerBossSpyEye : GibSpawner
{
	Default
	{
		BloodColor "55 da ff";
		Args 16, 3;
	}
}

class GibSpawnerEyescreamer : GibSpawner
{
	Default
	{
		BloodColor "fa fa fa";
		Args 48, 7;
	}
}

class GibSpawnerEyescreamerBallStart : GibSpawner
{
	Default
	{
		BloodColor "fa fa fa";
		Args 8, 1;
	}
}

class GibSpawnerEyescreamerBallEnd : GibSpawner
{
	Default
	{
		BloodColor "fa fa fa";
		Args 24, 3;
	}
}

class GibSpawnerShadiusHand : GibSpawner
{
	Default
	{
		BloodColor "24 24 24";
		Args 16, 3;
	}
}

class GibSpawnerPyramineSee : GibSpawner
{
	Default
	{
		BloodColor "ff dc 3f";
		Args 8, 1;
	}
}

class MibSpawnerPyramine : MibSpawner
{
	Default
	{
		BloodColor "ff dc 3f";
		Args 16, 3;
	}
}

class MibSpawnerRigging : MibSpawner
{
	Default
	{
		BloodColor "aa aa aa";
		Args 32, 4;
	}
}

class GlassMibSpawnerRigging : GlassMibSpawner
{
	Default
	{
		BloodColor "dd dd dd";
		Args 32, 3;
	}
}

class GenericClothGib : GenericGib
{
	Default
	{
		+BOUNCEONWALLS;
		+BOUNCEONCEILINGS;
		DeathSound "effects/cloth";
	}
	States
	{
	Death:
		Stop;
	}
}

class GibTenGallonHat : GenericClothGib
{
	Default
	{
		Gravity 0.25;
	}
	States
	{
	Spawn:
		HAT1 ABCDDEEEDDCB 1;
		HAT1 AFGHHIIIHHGF 1;
		Loop;
	Death:
		HAT1 J 525 A_QueueCorpse();
		HAT1 JJJJJJJJJ 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibTenGallonPinkHat : GenericClothGib
{
	Default
	{
		Gravity 0.25;
	}
	States
	{
	Spawn:
		HAT3 ABCDDEEEDDCB 1;
		HAT3 AFGHHIIIHHGF 1;
		Loop;
	Death:
		HAT3 J 525 A_QueueCorpse();
		HAT3 JJJJJJJJJ 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibSheriffHat : GenericClothGib
{
	Default
	{
		Gravity 0.25;
	}
	States
	{
	Spawn:
		HAT4 ABCDDEEEDDCB 1;
		HAT4 AFGHHIIIHHGF 1;
		Loop;
	Death:
		HAT4 J 525 A_QueueCorpse();
		HAT4 JJJJJJJJJ 2 A_FadeOut(0.1);
		Stop;
	}
}

class SpectraBlood : Actor
{
	Default
	{
		+NOBLOCKMAP +NOGRAVITY +NOCLIP +CLIENTSIDEONLY;
		RenderStyle 'Translucent';
		Alpha 1.0;
	}
	States
	{
	Spawn:
		SBLD A 0 A_SetScale(scale.x * 0.9);
		SBLD A 1 A_FadeOut(0.05);
		Loop;
	}
}

class GibWhiteGlove : GenericClothGib
{
	States
	{
	Spawn:
		GSG1 ABCD 3;
		Loop;
	Death:
		GSG1 E 525 A_QueueCorpse();
		GSS1 EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibWhiteGlove2 : GenericClothGib
{
	States
	{
	Spawn:
		GSG2 ABCD 3;
		Loop;
	Death:
		GSG2 E 525 A_QueueCorpse();
		GSG2 EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibHeadCrystal : GenericBouncyGib
{
	Default
	{
		BounceSound "effects/glass/small/bounce";
		DeathSound "effects/glass/small/bounce";
	}
	States
	{
	Spawn:
		GBSJ ABCDABCD 4;
		Loop;
	Death:
		GBSJ E 525 A_QueueCorpse;
		GBSJ EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibBlackGlove : GenericClothGib
{
	States
	{
	Spawn:
		GDG1 ABCD 3;
		Loop;
	Death:
		GDG1 E 525 A_QueueCorpse();
		GDS1 EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibBlackGlove2 : GenericClothGib
{
	States
	{
	Spawn:
		GDG2 ABCD 3;
		Loop;
	Death:
		GDG2 E 525 A_QueueCorpse();
		GDG2 EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}

class GibDarkCrystal : GenericBouncyGib
{
	Default
	{
		BounceSound "effects/glass/small/bounce";
		DeathSound "effects/glass/small/bounce";
	}
	States
	{
	Spawn:
		GDSJ ABCDABCD 4;
		Loop;
	Death:
		GDSJ E 525 A_QueueCorpse();
		GDSJ EEEEEEEEE 2 A_FadeOut(0.1);
		Stop;
	}
}
