ACTOR Fists : Weapon
{
	+WEAPON.MELEEWEAPON
	+NOALERT
	Weapon.SelectionOrder 2900
	States
	{
	Ready:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "ReadyBloodFists")
	    PNCH A 1 A_Jump(256,"Ready1","Ready2")
		Goto Ready
		    ReadyBloodFists:
	           PNCH E 1 A_Jump(256,"Ready1BloodFists","Ready2BloodFists")
		       Goto ReadyBloodFists
	Ready1:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "Ready1BloodFists")
	    PNCH A 1 A_WeaponReady 
	    Loop
		    Ready1BloodFists:
	           PNCH E 1 A_WeaponReady 
	           Loop
	Ready2:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "Ready2BloodFists")
	    PNCH B 1 A_WeaponReady
		Loop
		    Ready2BloodFists:
	           PNCH F 1 A_WeaponReady 
	           Loop
	Deselect:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "DeselectBloodFists")
	    PNCH A 0 A_TakeInventory("FistsSelect",1)
		PNCH A 0 A_Lower
        PNCH A 1 A_Lower
		Loop
	DeselectBloodFists:
	    PNCH E 0 A_TakeInventory("FistsSelect",1)
		PNCH E 0 A_Lower
        PNCH E 1 A_Lower
		Loop	
	Select:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "SelectBloodFists")
	    TNT1 A 0 A_PlaySound("LoWang/Fists", 5)
		PNCH A 0 A_GiveInventory("FistsSelect",1)
		PNCH A 0 A_Raise
	    PNCH A 1 A_Raise
	    Goto Select+2
	SelectBloodFists:
	    TNT1 A 0 A_PlaySound("LoWang/Fists", 5)
	    PNCH E 0 A_GiveInventory("FistsSelect",1)
		PNCH E 0 A_Raise
	    PNCH E 1 A_Raise
		Goto SelectBloodFists+1
		
		
		
	Fire:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "FireBloodFists")
	    PNCH C 0 A_Playsound("PUNCH")
        PNCH C 2
		PNCH C 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		TNT1 A 5
		TNT1 A 1 A_ReFire
		PNCH A 1 offset(1, 142)A_WeaponReady(1)
		PNCH A 1 offset(1, 133)A_WeaponReady(1)
	    PNCH A 1 offset(1, 124)A_WeaponReady(1)
	    PNCH A 1 offset(1, 106)A_WeaponReady(1)
	    PNCH A 1 offset(1, 97)A_WeaponReady(1)
	    PNCH A 1 offset(1, 88)A_WeaponReady(1)
		PNCH A 1 offset(1, 70)A_WeaponReady(1)
		PNCH A 1 offset(1, 60)A_WeaponReady(1)
		PNCH A 1 offset(1, 52)A_WeaponReady(1)
		PNCH A 1 offset(1, 34)A_WeaponReady(1)
		PNCH A 1 offset(1, 32)A_WeaponReady(1)
		Goto Ready
	FireBloodFists:
	    PNCH G 0 A_Playsound("PUNCH")
        PNCH G 2
		PNCH G 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		TNT1 A 5
		TNT1 A 1 A_ReFire
		PNCH E 1 offset(1, 142)A_WeaponReady(1)
		PNCH E 1 offset(1, 133)A_WeaponReady(1)
	    PNCH E 1 offset(1, 124)A_WeaponReady(1)
	    PNCH E 1 offset(1, 106)A_WeaponReady(1)
	    PNCH E 1 offset(1, 97)A_WeaponReady(1)
	    PNCH E 1 offset(1, 88)A_WeaponReady(1)
		PNCH E 1 offset(1, 70)A_WeaponReady(1)
		PNCH E 1 offset(1, 60)A_WeaponReady(1)
		PNCH E 1 offset(1, 52)A_WeaponReady(1)
		PNCH E 1 offset(1, 34)A_WeaponReady(1)
		PNCH E 1 offset(1, 32)A_WeaponReady(1)
		Goto Ready
//--------------------------Holding-------------------------------------------//		
	Hold:
	    TNT1 A 0 A_JumpIfInventory("Punched", 1, "HoldBloodFists")
	    PNCH C 1 offset(1,32) A_Jump(256,"Hold1","Hold2","Hold3")
	    Goto Ready
	Hold1:
	    NULL A 1
       	PNCH C 0 A_Playsound("PUNCH")
        PNCH C 1 offset(1,32)
		PNCH C 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		TNT1 A 0 A_GiveInventory("LoWangPunchTaunt", 1)
		NULL A 1 A_ReFire
	  Goto HoldEnd
		
	Hold2:
	    NULL A 1
	    PNCH C 0 A_Playsound("PUNCH")
        PNCH C 1 offset(1,32)
		PNCH C 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		PNCH C 1 offset(-42, 14) 
		PNCH C 1 offset(-33, 62) 
		NULL A 3
		NULL A 1 A_ReFire
	  Goto HoldEnd

    Hold3:
	    NULL A 4
	    PNCH D 0 A_Playsound("PUNCH")
        PNCH D 1 offset(1,32)
		PNCH D 1 offset(30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		PNCH D 1 offset(42, 14) 
		PNCH D 1 offset(33, 62) 
		NULL A 1
		NULL A 1 A_ReFire
	  Goto HoldEnd  
//----------------------------------------------------------------------------//	  
    HoldBloodFists:
	    PNCH G 1 offset(1,32) A_Jump(256,"Hold1BloodFists","Hold2BloodFists","Hold3BloodFists")
	    Goto Ready
	Hold1BloodFists:
	    TNT1 A 1
       	PNCH G 0 A_Playsound("PUNCH")
        PNCH G 1 offset(1,32)
		PNCH G 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		TNT1 A 0 A_GiveInventory("LoWangPunchTaunt", 1)
		TNT1 A 1 A_ReFire
	  Goto HoldEndBloodFists
		
	Hold2BloodFists:
	    TNT1 A 1
	    PNCH G 0 A_Playsound("PUNCH")
        PNCH G 1 offset(1,32)
		PNCH G 1 offset(-30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		PNCH G 1 offset(-42, 14) 
		PNCH G 1 offset(-33, 62) 
		TNT1 A 3
		TNT1 A 1 A_ReFire
	  Goto HoldEndBloodFists

    Hold3BloodFists:
	    TNT1 A 4
	    PNCH H 0 A_Playsound("PUNCH")
        PNCH H 1 offset(1,32)
		PNCH H 1 offset(30, 14) A_FireBullets(2, 2, 1, 35, "FistsPuff", FBF_NORANDOM, 70)
		PNCH H 1 offset(42, 14) 
		PNCH H 1 offset(33, 62) 
		TNT1 H 1
		TNT1 H 1 A_ReFire
	  Goto HoldEndBloodFists 
	  
//------------End Holding-----------------------------------------------------//	  
	  HoldEnd:
	  	PNCH A 1 offset(1, 142)A_WeaponReady(1)
		PNCH A 1 offset(1, 133)A_WeaponReady(1)
	    PNCH A 1 offset(1, 124)A_WeaponReady(1)
	    PNCH A 1 offset(1, 106)A_WeaponReady(1)
	    PNCH A 1 offset(1, 97)A_WeaponReady(1)
	    PNCH A 1 offset(1, 88)A_WeaponReady(1)
		PNCH A 1 offset(1, 70)A_WeaponReady(1)
		PNCH A 1 offset(1, 60)A_WeaponReady(1)
		PNCH A 1 offset(1, 52)A_WeaponReady(1)
		PNCH A 1 offset(1, 34)A_WeaponReady(1)
		PNCH A 1 offset(1, 32)A_WeaponReady(1)
		Goto Ready
//----------------------------------------------------------------------------//		
	  HoldEndBloodFists:
	  	PNCH E 1 offset(1, 142)A_WeaponReady(1)
		PNCH E 1 offset(1, 133)A_WeaponReady(1)
	    PNCH E 1 offset(1, 124)A_WeaponReady(1)
	    PNCH E 1 offset(1, 106)A_WeaponReady(1)
	    PNCH E 1 offset(1, 97)A_WeaponReady(1)
	    PNCH E 1 offset(1, 88)A_WeaponReady(1)
		PNCH E 1 offset(1, 70)A_WeaponReady(1)
		PNCH E 1 offset(1, 60)A_WeaponReady(1)
		PNCH E 1 offset(1, 52)A_WeaponReady(1)
		PNCH E 1 offset(1, 34)A_WeaponReady(1)
		PNCH E 1 offset(1, 32)A_WeaponReady(1)
		Goto Ready



	}
}

actor FistsSelect : inventory 
{
   Inventory.MaxAmount 1
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   States
   {
   Spawn:
      TNT1 A 1
      Stop
   }
   
}

Actor Punched : inventory { Inventory.MaxAmount 1 }
