class PaintGun : SquareWeapon
{
	Default
	{
		Weapon.SelectionOrder 1100;
		Weapon.AmmoGive 0;
		Weapon.AmmoUse 0;
		Weapon.AmmoType "None";
		Weapon.Kickback 400;
		Inventory.PickupMessage "$GOTPAINTGUN";
		Inventory.PickupSound "misc/w_pkup";
		Obituary "$OB_PAINTGUN";
		Tag "$TAG_PAINTGUN";
		AttackSound "weapons/pistol";
		Decal 'PaintSpray1';

		+WEAPON.WIMPY_WEAPON;
	}
	States
	{
	Spawn:
		PNTP A -1;
		Stop;
	Ready:
		PNTG A 1 A_WeaponReady();
		Loop;
	Deselect:
		PNTG A 1 A_Lower();
		PNTG A 0 A_Lower();
		Loop;
	Select:
		PNTG A 1 A_Raise();
		PNTG A 0 A_Raise();
		Loop;
	ResetSprite:
		PNTG A 0;
		Goto Reraise;
	Fire:
	Hold:
		PNTG B 0 A_AlertMonsters();
		PNTG B 2 A_FireBullets(2,2,1,12,"PaintPuff1", FBF_USEAMMO | FBF_NORANDOM);
		PNTG CDEFA 2;
		PNTG A 0 A_Refire();
		Goto Ready;
	}
}

class PaintGuns : PaintGun
{
	Default
	{
		Weapon.SelectionOrder 600;
		Inventory.PickupMessage "$GOTPAINTGUN2";
		Obituary "$OB_PAINTGUN2";
		Tag "$TAG_PAINTGUN2";
		Weapon.AmmoGive 50;
		Weapon.AmmoUse 1;
		Weapon.AmmoType "PaintAmmo";
	}
	States
	{
	Spawn:
		PNTP B -1;
		Stop;
	Ready:
		PNT2 A 1 A_WeaponReady();
		Loop;
	Deselect:
		PNT2 A 1 A_Lower();
		PNT2 A 0 A_Lower();
		Loop;
	Select:
		PNT2 A 1 A_Raise();
		PNT2 A 0 A_Raise();
		Loop;
	ResetSprite:
		PNT2 A 0;
		Goto Reraise;
	Fire:
		PNT2 B 0 A_AlertMonsters();
		PNT2 B 2 A_FireBullets(3,3,1,10,"PaintPuff1", FBF_NORANDOM);
		PNT2 CD 2;
		PNT2 E 0 A_AlertMonsters();
		PNT2 E 2 A_FireBullets(3,3,1,10,"PaintPuff2", FBF_USEAMMO | FBF_NORANDOM);
		PNT2 FG 2;
		PNT2 A 0 A_Refire();
		PNT2 JK 2;
		Goto Ready;
	Hold:
		PNT2 H 0 A_AlertMonsters();
		PNT2 H 2 A_FireBullets(3,3,1,10,"PaintPuff1", FBF_NORANDOM);
		PNT2 ID 2;
		PNT2 E 0 A_AlertMonsters();
		PNT2 E 2 A_FireBullets(3,3,1,10,"PaintPuff2", FBF_USEAMMO | FBF_NORANDOM);
		PNT2 FG 2;
		PNT2 A 0 A_Refire();
		PNT2 JK 2;
		Goto Ready;
	}
}

class PaintPuff1 : SquareActor
{
	Default
	{
		+NOGRAVITY;
		+NOBLOCKMAP;
		+NOCLIP;
		+PUFFONACTORS;
		+FORCEXYBILLBOARD;
		Translation "198:202=38:42";
		Decal 'PaintSplat';
	}
	States
	{
	Spawn:
	Frames:
		TNT1 A 0;
		TNT1 A 0 A_PlaySound("weapons/painthit");
		BLOB A 1;
		BLOB BCDEFG 2;
		Stop;
	}
}

class PaintPuff2 : PaintPuff1
{
	Default
	{
		Translation "198:202=70:74";
		Decal 'PaintSplat_Blue';
	}
}

class PaintPuff3 : PaintPuff1
{
	Default
	{
		Translation "198:202=116:120";
		Decal 'PaintSplat_Green';
	}
}

class PaintPuff4 : PaintPuff1
{
	Default
	{
		Translation "198:202=244:248";
		Decal 'PaintSplat_Yellow';
		Scale 0.65;
	}
}
