#region Item Pieces
//$Color 3

//Fighter weapon assembly
class DreadfulPiece : WeaponPiece
{
	Default
	{
		Inventory.PickupSound "Misc/W_Pkup";
		WeaponPiece.Weapon "OldDreadful";
		+FLOATBOB
	}
}

class DreadfulPiece1 : DreadfulPiece replaces FWeaponPiece1
{
	Default
	{
		//$Title Old Dreadful (Gun Barrel)
		WeaponPiece.Number 1;
		Inventory.PickupMessage "Obtained Old Dreadful's gun barrel!";
	}
	
	States
	{
	Spawn:
		BFGP A 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("GreenParticle",
					frandom(18.0,-18.0),frandom(18.0,-18.0),22+frandom(24.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	} 
}

class DreadfulPiece2 : DreadfulPiece replaces FWeaponPiece2
{
	Default
	{
		//$Title Old Dreadful (Crystal Capacitor)
		WeaponPiece.Number 2;
		Inventory.PickupMessage "Obtained Old Dreadful's crystal capacitor!";
	}
	
	States
	{
	Spawn:
		BFGP B 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("GreenParticle",
					frandom(18.0,-18.0),frandom(18.0,-18.0),16+frandom(24.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	} 
}

class DreadfulPiece3 : DreadfulPiece replaces FWeaponPiece3
{
	Default
	{
		//$Title Old Dreadful (Buttstock)
		WeaponPiece.Number 3;
		Inventory.PickupMessage "Obtained Old Dreadful's buttstock!";
	}
	
	States
	{
	Spawn:
		BFGP C 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("GreenParticle",
					frandom(18.0,-18.0),frandom(18.0,-18.0),18+frandom(24.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	} 
}

//Mage weapon assembly
class PowersuitAssembled : Weapon
{
	Default
	{
		Health 3;
		Inventory.PickupSound "Bishop/Pickup";
		Inventory.PickupMessage "You have obtained the ''Bishop'' Battle Armored Dragon Assault Strike System! Ooooh boy.";
		Weapon.AmmoType1 "BlueMana";
		Weapon.AmmoType2 "GreenMana";
		Weapon.AmmoGive1 50;
		Weapon.AmmoGive2 50;
	}
	
	States
	{
	Spawn:
		SUIT B -1;
		Stop;
	Fire:
		TNT1 A 0;
		Stop;
	Select:
		TNT1 AAAAAAAAAAAAA 0 A_Raise;
	Ready:
		TNT1 A 0 A_GiveInventory("PowersuitBringer",1);
		TNT1 A 0 A_TakeInventory("PowersuitAssembled",1);
		Goto Deselect;
	Deselect:
		TNT1 AAAAAAAAAAAAA 0 A_Lower;
		Loop;
	}
}
		
class PowersuitPiece1 : WeaponPiece replaces MWeaponPiece1
{
	Default
	{
		//$Title Bishop (Legs)
		WeaponPiece.Weapon "PowersuitAssembled";
		WeaponPiece.Number 1;
		Inventory.PickupSound "Bishop/Pickup";
		Inventory.PickupMessage "Obtained ''Bishop'' B.A.D.A.S.S. lower body part.";
		Scale 0.65;
		+FLOATBOB;
	}
	
	States
	{
	Spawn:
		SUIT C 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("RedParticle",
					frandom(12.0,-12.0),frandom(12.0,-12.0),12+frandom(24.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	}
}

class PowersuitPiece2 : PowersuitPiece1 replaces MWeaponPiece2
{
	Default
	{
		//$Title Bishop (Torso)
		WeaponPiece.Number 2;
		Inventory.PickupMessage "Obtained ''Bishop'' B.A.D.A.S.S. upper body part.";
	}
	
	States
	{
	Spawn:
		SUIT D 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("RedParticle",
					frandom(18.0,-18.0),frandom(18.0,-18.0),12+frandom(48.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	}
}

class PowersuitPiece3 : PowersuitPiece1 replaces MWeaponPiece3
{
	Default
	{
		//$Title Bishop (Helmet)
		WeaponPiece.Number 3;
		Inventory.PickupMessage "Obtained ''Bishop'' B.A.D.A.S.S. mask.";
	}
	
	States
	{
	Spawn:
		SUIT E 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("RedParticle",
					frandom(6.0,-6.0),frandom(6.0,-6.0),24+frandom(8.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	}
}

//Cleric weapon assembly
class DraughTomeAssembled : Weapon
{
	Default
	{
		Health 3;
		Inventory.PickupSound "Tome/Pickup";
		Inventory.PickupMessage "Tome of the Draugh has been recollected!";
	}
	
	States
	{
	Spawn:
		DTOM A -1;
		Stop;
	Fire:
		TNT1 A 0;
		Stop;
	Select:
		TNT1 AAAAAAAAAAAAA 0 A_Raise;
	Ready:
		TNT1 A 0 A_GiveInventory("DraughTomeBringer",1);
		TNT1 A 0 A_TakeInventory("DraughTomeAssembled",1);
		Goto Deselect;
	Deselect:
		TNT1 AAAAAAAAAAAAA 0 A_Lower;
		Loop;
	}
}
		
class DraughTomePiece1 : WeaponPiece replaces CWeaponPiece1
{
	Default
	{
		//$Title Tome of the Draugh (Vol 1)
		WeaponPiece.Weapon "DraughTomeAssembled";
		WeaponPiece.Number 1;
		Inventory.PickupSound "Tome/Pickup";
		Inventory.PickupMessage "Obtained third volume of Tome of the Draugh."; //reversed it as it technically is found last in stock hexen... weirdness.
		+FLOATBOB
	}
	
	States
	{
	Spawn:
		DTOM C 1 NoDelay Bright {
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				A_SpawnItemEx("BlueParticle",
					frandom(6.0,-6.0),frandom(6.0,-6.0),20+frandom(24.0,0.0),
					frandom(0.2,-0.2),frandom(0.2,-0.2),frandom(1.6,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	}
}

class DraughTomePiece2 : DraughTomePiece1 replaces CWeaponPiece2
{
	Default
	{
		//$Title Tome of the Draugh (Vol 2)
		WeaponPiece.Number 2;
		Inventory.PickupMessage "Obtained second volume of Tome of the Draugh.";
	}
}

class DraughTomePiece3 : DraughTomePiece1 replaces CWeaponPiece3
{
	Default
	{
		//$Title Tome of the Draugh (Vol 3)
		WeaponPiece.Number 3;
		Inventory.PickupMessage "Obtained first volume of Tome of the Draugh.";
	}
}

#endregion
