Actor PicoKnifes : Weapon
{
	+INVENTORY.UNTOSSABLE
	Weapon.SlotNumber 6
	Inventory.RestrictedTo "Pico"
	Inventory.Pickupmessage "You got a book on how to throw knives, which comes with free knives!"
	Inventory.PickupSound "Pico/equip"
	Weapon.AmmoType "PicoKnifeAmmo"
	Weapon.AmmoGive 15
	Weapon.AmmoUse 1 //If it doesn't work il just have to use take inventories
	Tag "Knives"
	+Weapon.NOALERT
	States
	{
	Ready:
		PCKN A 2 A_WeaponReady
		Loop
	Select:
		PCKN A 0 A_raise
		TNT1 A 0 A_raise
		TNT1 A 0 A_raise
		TNT1 A 0 A_raise
		Loop
	Deselect:
		PCKN A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		Loop
	Fire:
		TNT1 A 0 a_jumpifnoammo("click")
		TNT1 A 0 A_Alertmonsters
		PCKN BC 1
		PCKN D 1 A_FirecustomMIssile("PicoKnoife")
		TNT1 A 0 A_PLAYSOUND("PicoKnifes/Throw")
		PCKN E 1
		PCKN F 1 A_Refire("OtherFire")
		Goto Select
	OtherFire:
		TNT1 A 0 a_jumpifnoammo("click")
		PCKR BC 1
		PCKR D 1 A_FirecustomMIssile("PicoKnoife")
		TNT1 A 0 A_PLAYSOUND("PicoKnifes/Throw")
		PCKR E 1
		PCKR F 1 A_Refire("Fire")
		Goto Select
	Altfire:
		"####" "#" 0 A_jumpifInventory("PicoMeterCountdown",0,1)
		Goto Click
		"####" "#"1 Offset(4,34) 
		"####" "#"1 Offset(9,36)
		"####" "#"1 Offset(15,40)
		"####" "#"1 Offset(15,40)
		"####" "#"1 Offset(22,48)
		"####" "#"1 Offset(30,54)
		"####" "#"1 Offset(39,65)
		"####" "#"1 Offset(45,72)
	Weed:
		TNT1 A 0 Offset(-1,32)
		TNT1 A 0 A_takeinventory("PicoAnxyStack",100)
		TNT1 A 0 A_takeinventory("PowerSlowdown",1)
		TNT1 A 0 A_takeinventory("PowerSlowerdown",1)
		TNT1 A 0 A_takeinventory("PowerSlowestdown",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage1",1)
		TNT1 A 0 A_takeinventory("PowerPicoDamage2",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability1",1)
		TNT1 A 0 A_takeinventory("PowerPicoVulnerability2",1)
		TNT1 A 0 A_Giveinventory("PicoWeedCoolDown",1)
		P2WD A 1 OFFSET(0,36) A_takeinventory("PicoMeterCountdown",256)
		P2WD A 1 OFFSET(0,33) Healthing(15,100)
		P2WD A 2 OFFSET(0,32)
		P2WD BCD 4
		P2WD E 2
		P2WD E 1 Offset(0,34)
		P2WD E 1 Offset(0,38)
		Goto Select
	Spawn:
		TNT1 A -1
		STOP
	Click:
		PCKN A 1 OFFSET(0,48) A_playsound("Pico/WeaponClick")
		PCKN A 1 OFFset(0,47)
		PCKN A 1 OFFset(0,36)
		PCKN A 1 OFFset(0,32)
		PCKN A 5 A_weaponReady(WRF_NOFIRE)
	Goto Ready
	}
}