Actor GuyPI: StickguyWeapon
{
	Inventory.RestrictedTo "Stickguyclass"
	Weapon.SlotNumber 2
	Weapon.AmmoType "Clip"
	Weapon.AmmoUse 1
	Obituary "%o died by %k 's Pea's shooter"
    +WEAPON.WIMPY_WEAPON
	+WEAPON.AMMO_OPTIONAL
    //Inventory.Pickupmessage "How did you forget your weapon of self defence?"
    Tag "$TAG_PISTOL"
	STATES
	{
	  Ready:
		REPI A 1 A_weaponready
		Loop
	  Deselect:
		TNT1 A 1 A_Lower
		TNT1 AAAAAAAAAAA 0 A_lower
		Loop
	  Select:
		TNT1 A 0 Offset(0,32)A_playsound("Stickguy/Tock",3)
		REPI DE 2 
		REPI A 2 
		Goto ready
	  Fire:
		TNT1 A 0 A_JumpIfInventory("Clip",1,"FireContinue")
		REPI A 2 A_FireBullets (5.6, 0.5, 1, 0, "Stickguypuffs",FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("Stickguy/Tock", CHAN_WEAPON)
		Goto RestofFireEmpty
	  FireContinue:
		TNT1 A 0 A_JumpIfInventory("Stickguyfastfingers",1,"SpeedFire")
		TNT1 A 0 A_GunFlash
		REPI A 2 Bright A_FireBullets (5.6, 0.5, 1, 5, "Stickguypuffs",FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("Stickguy/PISTOL", CHAN_WEAPON)
		Goto RestofFire
	  SpeedFire:
	    TNT1 A 0 A_JumpIfnoammo("FireContinue")
		REPI B 1 A_FireBullets (5.6, 0.5, 1, 3, "Stickguypuffs",FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("Stickguy/PISTOL", CHAN_WEAPON)
		REPI B 1 A_FireBullets (5.6, 0.5, 1, 3, "Stickguypuffs",FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("Stickguy/PISTOL", CHAN_WEAPON)
		REPI B 1 A_FireBullets (5.6, 0.5, 1, 3, "Stickguypuffs",FBF_USEAMMO|FBF_NORANDOM)
		TNT1 A 0 A_PlaySound("Stickguy/PISTOL", CHAN_WEAPON)
	  RestofFire:
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_SetPitch (pitch-0.4)
		REPI F 2 A_SetPitch (pitch+0.2)
		REPI G 2 A_SetPitch (pitch+0.2)
		REPI A 3
		REPI A 2
		REPI A 0 A_ReFire
		Goto Ready
	  RestofFireEmpty:
		REPI F 2
		REPI G 2
		REPI A 3
		REPI A 2
		REPI A 0 A_ReFire
		Goto Ready
	  Flash:
		REPI B 1 Bright A_Light1
		REPI C 1 Bright A_Light2
		Goto LightDone
	  Spawn:
		REPP A -1
		Stop
	//---------------------------------------MELEE STUFF
	  Altfire:
		TNT1 A 0 A_AlertMonsters 
		TNT1 A 0 Offset(0,32) A_JumpIfInventory("GuyStick",1,"XiaoMelee")
	  QuickPunch:
		REFT B 1 A_FireCustomMissile("FistImpact",0,0,0,1)
		REFT D 1 
		REFT D 2 
		REFT C 2 Offset(0,32)
		REFT B 2
		TNT1 A 6
		Goto Ready
	  XiaoMelee:
		TNT1 A 1 Offset(0,32)
		RXXS A 2 A_FireCustomMissile("StickImpact",0,0,0,1)
		RXXS B 2
		RXXS CD 2
		TNT1 A 4
		Goto Ready
	}
}