ACTOR PicoShotgun : Weapon//  replaces shotgun
{
	Weapon.SelectionOrder 1200
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "PicoShell"
	Inventory.RestrictedTo "Pico"
	+Weapon.ammo_optional
	Inventory.PickupMessage "$GOTSHOTGUN"
	Obituary "$OB_MPSHOTGUN"
	Tag "Bear Shotgun"
	+Weapon.NOALERT
	States
	{
	Ready:
		PSHG A 1 A_WeaponReady
		Loop
	Deselect:
		PSHG A 1 A_Lower
		Loop
	Select:
		PSHG A 1 A_Raise
		Loop
	Fire:
        P2FL A 0 A_JumpifNoammo("Click")
        PSHG A 3
		TNT1 A 0 A_Alertmonsters
        TNT1 A 0 A_quake(2, 4,0,32,"NOSOUND") 
        tnt1 A 0 A_PlaySound("pico/PCSHF",5,0.8)
        PSHG C 2 bright A_FireBullets(4,0,7,5,"PicoBulletPuff")
        PSHG A 0 A_gunflash
        PSHG B 2 //  A_gunflash
        PSHG D 1 Offset(0,38)
        PSHG D 3 Offset(0,39)
        PSHG E 1 Offset(0,38)
        PSHG E 1 Offset(0,34)
        PSHG E 2 Offset(0,33)
        PSHG F 1 Offset(0,32)
        PSHG F 1 Offset(-2,33) 
        PSHG F 2 Offset(-4,36)  A_PlaySound("pico/PCSHPL",4)
        PSHG F 3 Offset(-6,37)
        PSHG F 3 Offset(-7,35)
        PSHG F 2 Offset(-2,36)
        PSHG F 2 A_PlaySound("pico/PCSHPL",4)
        PSHG E 2
        PSHG A 4
        Goto Ready
        Flash:
        TNT1 A 2 A_setpitch(pitch-2)
        tnt1 A 0 Bright A_Light2
        TNT1 AAAA 2 A_setpitch(pitch+0.5)
        Goto LightDone
	Spawn:
		SHOT A -1
		Stop
	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:
		PSHG A 1 OFFSET(0,48) A_playsound("Pico/WeaponClick")
		PSHG A 1 OFFset(0,47)
		PSHG A 1 OFFset(0,36)
		PSHG A 1 OFFset(0,32)
		PSHG A 5 A_weaponReady(WRF_NOFIRE)
		Goto Ready
	}
}
