// Fist (Doom)

ACTOR IDMFist : IDMWeapon
{
	//Weapon.PreferredSkin "FistMarine"
	Weapon.SelectionOrder 2000 // Lowest priority weapon.
	Weapon.Kickback 50
	Obituary "%o was  W I D E L Y  F I S T E D  by %k."
	Tag "F   i   s   t"
	Decal BulletChip
	Damagetype "Punch"
	+WEAPON.MELEEWEAPON
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	States
	{
	Ready:
	  PUNG A 1 A_WeaponReady
	  Loop
	Deselect:
	  TNT1 A 0 A_Lower
	  TNT1 A 0 A_Lower
      PUNG A 1 A_Lower
	  Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	  /*You can use the Weapon.Upsound property, but it's more delayed
	  serverside, depending on the ping, and bugs potentially more with the
	  sounds of the weapon.*/
	Sloop:
	  TNT1 A 0 A_Raise
	  TNT1 A 0 A_Raise
	  PUNG A 1 A_Raise
      Loop
	Fire:
      PUNG B 1
      TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "Berserked")
	
	 /* The line above is the berserk jump state for the original fist. It's
	 still present for testing purposes. If you use 'Give Berserk' or 'Give
	 PowerStrength' in console, the Fist will be permanently Berserked until the
	 end of the level.
	
	 However, if you use 'Summon Berserk', it spawns a powerup from the list of
	 the random spawner that replaces the Doom Berserk pickup.*/
	
      TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2", 1, "Berserked")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
      PUNG C 1 A_CustomPunch(random(100,200), TRUE,0,"FistHitPuff",96)
      PUNG D 6
	  Goto FireEnd
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
      PUNG C 1 A_CustomPunch(random(100,200), TRUE,0,"FistHitPuff",96)
      PUNG D 6
	  Goto FireEnd
	Berserked:
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadBerserked")
      PUNG E 1 Bright A_CustomPunch(random(100,200) * 10, TRUE,0,"FistHitPuff",96,1)
	  PUNG F 6 Bright
	  Goto FireEnd
    QuadBerserked:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
      PUNG E 1 Bright A_CustomPunch(random(100,200) * 10, TRUE,0,"FistHitPuff",96,1)
	  PUNG F 6 Bright
	FireEnd:
      PUNG C 2
	  PUNG B 1
	  PUNG B 2 Offset(0,40) A_WeaponReady(WRF_NOFIRE)
	  PUNG B 2 Offset(0,36) A_WeaponReady(WRF_NOFIRE)
	  PUNG B 2 Offset(0,33) A_WeaponReady(WRF_NOFIRE)
      TNT1 A 0 A_ReFire
      Goto Ready
	}
}

ACTOR FistingFist : IDMFist
{
	+WEAPON.CHEATNOTWEAPON
	States
	{
	Fire:
      PUNG B 1
      TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "Berserked")
      TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2", 1, "Berserked")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
      PUNG C 1 A_CustomPunch(random(300,600), TRUE,0,"FistHitPuff",96)
      PUNG D 6
	  Goto FireEnd
	}
}