Actor Stickguyragefists : weapon
{
	Weapon.SelectionOrder 60
	Weapon.AmmoType "CELL"
	Weapon.ammouse 1
	Weapon.ammogive 40
	Weapon.kickback 100
	Inventory.RestrictedTo "Stickguyclass"
	tag "Frustration"
	+weapon.noalert
	States
	{
		Select:
			TNT1 A 0 Offset(0,32)
			SGBG F 2
			//TNT1 A 0 A_playsound("characters/NERD/weapons/odysseyfire",5)
			TNT1 A 0 A_playsound("characters/JdG/PunchHitEnd",6)
			TNT1 A 0 a_quake(4,4,0,1)
			TNT1 A 0 a_quake(2,4,0,1)
			SBFG H 2 Offset(-5,32) a_quake(3,6,0,1)
			SBFG H 2 Offset(3,32) 
			SBFG H 2 Offset(-1,32)
			SBFG H 10 Offset(0,32)
		SelectQuick:
			TNT1 A 0 A_Weaponready(WRF_NOBOB|WRF_NOFIRE)
			SBFG I 1 Offset(0,32)
			SBFG I 1 Offset(0,34)
			Goto Ready
		Deselect:
			SBFG A 0 A_STOPSOUND(6)
			SBFG I 1 Offset(0,38)
			SBFG I 1 Offset(0,40)
			SBFG I 1 Offset(0,43)
			SBFG I 1 Offset(0,48)
			SBFG I 1 Offset(0,54)
		DeselectLoop:
			SBFG IIIII 1 A_LOWER
			loop
		Windown:
			TNT1 A 0 A_PlaySound("Weapons/MinigunWindDown", 1, 1) 
		Ready: //Credit here goes to Yholl and SGT SHivers as this is litterally a code steal
			SBFG A 2 a_weaponready
			Loop
		Fire:
			TNT1 A 0 A_jumpifinventory ("Cell",1,1)
			Goto TimeToFinish
			TNT1 A 0 A_PlaySound("Stickguy/ATATATA", 6, 1, 1)
			TNT1 A 0 A_Quake (1, 2, 0, 16, "NOSOUND")
			TNT1 A 0 A_AlertMonsters
			SBFG B 1 A_FireBullets (6, 3, 1, 28, "StickguyFrustrationPuffs", 0, 128)
			TNT1 A 0 A_Takeinventory("Cell",1)
			TNT1 A 0 A_jumpifinventory ("Cell",1,1)
			Goto TimeToFinish
			SBFG C 1 A_Quake (1, 2, 0, 16, "NOSOUND")
			TNT1 A 0 A_jumpifinventory ("Cell",1,1)
			Goto TimeToFinish
			TNT1 A 0 A_Quake (1, 2, 0, 16, "NOSOUND")
			TNT1 A 0 A_AlertMonsters
			SBFG D 1 A_FireBullets (6, 3, 1, 28, "StickguyFrustrationPuffs", 0, 128)
			TNT1 A 0 A_Takeinventory("Cell",1)
			TNT1 A 0 A_jumpifinventory ("Cell",1,1)
			Goto TimeToFinish		
			SBFG E 1 A_Quake (1, 2, 0, 16, "NOSOUND")
			TNT1 A 0 A_REFIRE("Fire")
		TimeToFinish:
			TNT1 A 0 A_STOPSOUND(6)
			TNT1 A 0 A_Jumpifinventory("StickguyKBConfirm",1,"Finish")
			Goto Windown
		Finish:
			RELT C 2 A_Gunflash("Effect")
			REFT M 1 Offset(104,18) A_Takeinventory("StickguyKBConfirm",1)
			TNT1 A 0 A_AlertMonsters
			REFT N 2 Offset(0,32) A_FireCustomMissile("BFGFist",0,0,0,1)
			REFT P 1 Offset(39,32) 
			REFT P 10 offset(41,32)
			REFT P 1 Offset(44,33)
			REFT P 1 Offset(68,34)
			REFT P 1 Offset(82,36)
			REFT P 1 Offset(96,40)
			REFT P 1 Offset(110,46)
			REFT P 1 Offset(130,54)
			REFT P 1 Offset(160,64)
			REFT P 1 Offset(200,76)
			REFT P 1 Offset(250,90)
			REFT P 1 Offset(310,106)
			REFT U 1 offset(0,124)
			TNT1 A 16 Offset(0,32)
			TNT1 A 2 
			Goto SelectQuick
		Effect:
			TNT1 A 0 A_Takeinventory("StickguyKBConfirm",1)
			TNT1 A 2 A_ZoomFactor(0.95)
			TNT1 A 1 A_ZoomFactor(0.9)
			TNT1 A 2 A_Zoomfactor(1.15)
			TNT1 A 0 A_Quake(2,10,0,1,"NOSOUND")
			TNT1 A 0 A_Quake(3,5,0,1,"NOSOUND")
			TNT1 A 0 A_Quake(5,2,0,1,"NOSOUND")
			TNT1 A 1 A_ZoomFactor(1.1)
			TNT1 A 1 A_ZoomFactor(1.05)
			TNT1 A 1 A_ZoomFactor(1.0)
			Stop
		Spawn:
			TNT1 A -1
			Loop
	}

}