Actor PicoUNDYINGPENLINIANHEAD : Weapon
{
	+INVENTORY.UNTOSSABLE
	Weapon.SlotNumber 7
	Inventory.RestrictedTo "Pico"
	Inventory.Pickupmessage "You got a pelininian head on a stick! You wonder if this is Cassandra's"
	Inventory.PickupSound"PicoUPH/equip"
	Weapon.AmmoType "PicoBloodenergy"
	+Weapon.Ammo_Optional
	Weapon.AmmoGive 100
	Weapon.AmmoUse 50
	+Weapon.NOALERT
	Tag "U.P.H."
	
	States
	{
		Ready:
			PCUH A 2 A_weaponready
			Loop
		Select:
			PCUH A 1 A_Raise
			Loop
		Deselect:
			PCUH A 1 A_Lower
			Loop
		Fire:
			TNT1 A 0 A_Jumpifinventory("PicoBloodenergy",50,"ActualFire")
			TNT1 A 0 A_playsound("Pico/WeaponClick",CHAN_AUTO)
			PCUH A 6 OFFSET(0,38)
			Goto Ready
		ActualFire:
			TNT1 A 0 A_Alertmonsters
			TNT1 A 0 A_Playsound("PicoUPH/Charge",Chan_weapon)
			PCUH B 2 Bright Offset(-2,30) A_Quake(2,2,0,16)
			PCUH C 2 Bright Offset(4,28) A_Quake(3,2,0,16)
			PCUH B 2 Bright Offset(-3,26) A_Quake(4,2,0,16)
			PCUH C 2 Bright Offset(2,24) A_Quake(5,2,0,16)
			PCUH BCBCBC 2 Bright Offset(0,22) A_Quake(6,2,0,16)
			TNT1 A 0 A_Playsound("PicoUPH/Fire",Chan_weapon)
			TNT1 A 0 A_Firecustommissile("PicoUPHLaser",4,0,4,0,SXF_TRANSFERPOINTERS)
			TNT1 A 0 A_Firecustommissile("PicoUPHLaser",0,0,0,0,SXF_TRANSFERPOINTERS)
			TNT1 A 0 A_Firecustommissile("PicoUPHLaser",-4,1,-4,0,SXF_TRANSFERPOINTERS)
			PCUH E 10 Offset(0,42)
			PCUH E 10 Offset(0,37)
			PCUH D 10 Offset(0,40)
			PCUH D 10 Offset(0,32)
			PCUH A 2
			GOTO Ready
		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
		Click:
			PCUH A 1 OFFSET(0,48) A_playsound("Pico/WeaponClick")
			PCUH A 1 OFFset(0,47)
			PCUH A 1 OFFset(0,36)
			PCUH A 1 OFFset(0,32)
			PCUH A 5 A_weaponReady(WRF_NOFIRE)
			Goto Ready
		Spawn:
			TNT1 A -1
			Stop

	}
}

