actor ChasmChainFist : Weapon 
{
  Weapon.BobStyle Smooth 
  Decal "BulletChip"
  Weapon.UpSound "ChainFist/Up"
  Weapon.Slotnumber 1
  Radius 10
  Height 10
  Mass 250
  Inventory.PickupMessage "You got the ChainFist 9000!"
  Obituary "%o was cut down by %k's Chain Fist."
  Inventory.Icon "HUSAW2"
  States
  
  
  {
  
	Spawn:
		CHFX A 1 
		loop   

  Ready:
    TNT1 A 0 A_PlaySound("ChainFist/Idle", 6, 1, 1)
    CHF0 FGHI 2 A_WeaponReady //Idle
	TNT1 A 0
    Loop
  Deselect:
    TNT1 A 0
	TNT1 A 0 A_StopSound(6)
    CHF1 VWXYZ 2 A_Lower //Idle
    Goto Ready   
  Select:
	TNT1 A 0 SetPlayerProperty(0,1,2)
    CHF0 A 2
	CHF0 BCDE 2
    Goto Ready    
  Fire:
    TNT1 A 0
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_PlaySound("ChainFist/Attack", 1)
    TNT1 A 0 A_Jump(72, "Attack1")
	TNT1 A 0 A_Jump(100, "Attack2")
    CHF0 KLMN 1
	CHF0 O 2 A_CustomPunch(8,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 P 2 A_CustomPunch(9,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 Q 2 A_CustomPunch(10,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 R 2 A_CustomPunch(11,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 S 2 A_CustomPunch(12,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 T 2 A_CustomPunch(13,1,CPF_NOTURN,"ChasmSawPuff")
	CHF0 UVWX 2
    Goto Ready
  Attack1:
    CHF0 YZ 1
	CHF1 ABC 1
	CHF1 D 2 A_CustomPunch(10,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 E 2 A_CustomPunch(11,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 F 2 A_CustomPunch(12,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 G 2 A_CustomPunch(13,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 H 2 A_CustomPunch(14,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 IJ 2
	CHF1 K 2 A_CustomPunch(10,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 L 2 A_CustomPunch(11,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 M 2 A_CustomPunch(12,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 N 2 A_CustomPunch(13,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 O 2 A_CustomPunch(14,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 P 2
	Goto Ready
  Attack2:
	CHF1 PON 1
	CHF1 M 2 A_CustomPunch(11,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 L 2 A_CustomPunch(12,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 K 2 A_CustomPunch(13,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 J 2 A_CustomPunch(14,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 K 2 A_CustomPunch(15,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 L 2 A_CustomPunch(16,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 NOP 2
    Goto Ready
  AltFire:
    TNT1 A 0
	TNT1 A 0 A_StopSound(CHAN_6)
	TNT1 A 0 A_PlaySound("ChainFist/Start", 1)
    CHF0 YZ 1
	TNT1 A 0 A_PlaySound("ChainFist/Loop", 6, 1.0, 1)
	CHF1 ABC 1
	CHF1 D 2 A_CustomPunch(10,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 E 2 A_CustomPunch(11,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 F 2 A_CustomPunch(12,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 G 2 A_CustomPunch(13,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 H 2 A_CustomPunch(14,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 I 2
	CHF1 J 2
  AltHold:
    TNT1 A 0
	CHF1 K 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 K 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 L 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 L 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 M 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	CHF1 M 1
	TNT1 A 0 A_CustomPunch(3,1,CPF_NOTURN,"ChasmSawPuff")
	TNT1 A 0 A_ReFire("AltHold")
	TNT1 A 0
	LetGo:
	TNT1 A 0
	TNT1 A 0 A_StopSound(CHAN_6)
	TNT1 A 0 A_PlaySound("ChainFist/Stop", 1)
	CHF1 N 2
	CHF1 O 2
	CHF1 P 2
	Goto Ready
  }
}

Actor ChasmSawPuff
{
	+ALLOWPARTICLES
    attacksound "ChainFist/Surface"
    seesound "ChainFist/Hit"
	DamageType "ChasmFistDamage"
	States
	{
    Spawn:
	 TNT1 A 0
     TNT1 A 0 A_CustomMissile("BulletRic", 4, 0, random (0, 360), 2, random (0, 160))
	 TNT1 A 0 A_CustomMissile("BulletSmoke", 4, 0, random (0, 360), 2, random (0, 160))
     TNT1 A 0 BRIGHT A_SpawnDebris("BulletSparks")
	 Stop
    Crash:
  	 TNT1 A 0 A_CustomMissile("BulletRic", 4, 0, random (0, 360), 2, random (0, 160))
	 TNT1 A 0 A_CustomMissile("BulletSmoke", 4, 0, random (0, 360), 2, random (0, 160))
     TNT1 A 0 BRIGHT A_SpawnDebris("BulletSparks")
	 Stop
	Melee:
	 TNT1 A 0
	 TNT1 A 0 A_PlaySound("ChainFist/Hit")
     TNT1 AA 0 A_CustomMissile("BulletSmoke", 4, 0, random (0, 360), 2, random (0, 160))
	 Stop
	}
}
