ACTOR Ironblast2 : Ironblast replaces FWeapHammer
{
   Game Hexen
   Weapon.AmmoGive 48
   Weapon.AmmoType "GreenMana"
   Weapon.AmmoUse 8
   Tag "Ironblast"
   States
   {
   RIdle:
	  1RNG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  1RNG A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	  TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),"RIdle")
	  1RNG A 0 A_JumpIfInventory("PowerGunzerking",1,"RIdle") 
	  Goto BackToReady
   BackToReady:
	  1RNG A 0 A_GunFlash("Nullify",GFF_NOEXTCHANGE)
	  Goto Ready
   RFire:
      TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  1RNG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto BackToReady
	  1RNG A 1 A_JumpIfInventory("GreenMana",8,1)
	  Goto RIdle
	  1RNF A 0 A_TakeInventory("GreenMana",8,TIF_NOTAKEINFINITE)
      1RNF A 0 A_PlaySound("Ironblast/Fire",1,0.4)
      1RNF A 0 A_PlaySound("Ironblast/Add",5,0.5)
      1RNF A 0 A_SetBlend("Yellow",0.2,15)
      1RNF A 0 A_Recoil(10)
	  1RNF A 0 A_ChangeVelocity (Cos(Pitch) * -22, 0, Sin(Pitch) * 22,CVF_RELATIVE)
      1RNF A 0 A_AlertMonsters
      1RNF A 0 A_Quake (4, 10, 0, 24, none)
      //1RNF A 0 A_FireBullets(12,4,64,5*random(2.0,3.0),"HBulletPuff",FBF_NORANDOM)
	  1RNF AAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(7.0,-7.0),0,8+frandom(2.0,-2.0),frandom(2.0,-2.0),0,frandom(3.0,-3.0))
	  1RNF AAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(7.0,-7.0),0,12+frandom(2.0,-2.0),frandom(2.0,-2.0),0,frandom(3.0,-3.0))
      1RNG A 0 A_SetPitch(pitch-0.75)
      1RNG A 0 A_SetAngle(angle-0.75)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      1RNF A 1 Bright A_ZoomFactor(0.99)
      1RNG A 0 A_SetPitch(pitch-1)
      1RNG A 0 A_SetAngle(angle-1)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      1RNF A 1 Bright A_ZoomFactor(0.98)
      1RNG A 0 A_SetPitch(pitch-1)
      1RNG A 0 A_SetAngle(angle-1)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,6,-1)
	  1RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,15,-1)
      1RNF C 1 Bright A_ZoomFactor(0.95)
      1RNH A 1 A_ZoomFactor(0.9)
      1RNG A 0 A_SetPitch(pitch-1.25)
      1RNG A 0 A_SetAngle(angle-1.25)
      1RNH B 1 A_ZoomFactor(0.8)
      1RNH A 0 A_SetPitch(pitch-0.75)
      1RNG A 0 A_SetAngle(angle-0.75)
      1RNH C 1 A_ZoomFactor(0.75)
      1RNG A 0 A_SetPitch(pitch-0.65)
      1RNG A 0 A_SetAngle(angle-0.65)
      1RNH D 1 A_ZoomFactor(0.725)
      1RNG A 0 A_SetPitch(pitch-0.45)
      1RNG A 0 A_SetAngle(angle-0.45)
      1RNH E 1 A_ZoomFactor(0.71)
      1RNG A 0 A_SetPitch(pitch-0.35)
      1RNG A 0 A_SetAngle(angle-0.35)
      1RNH F 1 A_ZoomFactor(0.73)
      1RNG A 0 A_SetPitch(pitch-0.25)
      1RNG A 0 A_SetAngle(angle-0.25)
      1RNH G 1 A_ZoomFactor(0.8)
      1RNG A 0 A_SetPitch(pitch-0.15)
      1RNG A 0 A_SetAngle(angle-0.15)
      1RNH H 1 A_ZoomFactor(0.82)
      1RNG A 0 A_SetPitch(pitch+0.15)
      1RNG A 0 A_SetAngle(angle-0.25)
      1RNH I 1 A_ZoomFactor(0.83)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle-0.25)
      1RNH J 1 A_ZoomFactor(0.85)
      1RNG A 0 A_SetPitch(pitch+0.15)
      1RNG A 0 A_SetAngle(angle-0.15)
      1RNH K 1 A_ZoomFactor(0.87)
      1RNG A 0 A_SetPitch(pitch+0.35)
      1RNH L 1 A_ZoomFactor(0.89)
      1RNG A 0 A_SetPitch(pitch+0.35)
      1RNG A 0 A_SetAngle(angle+0.15)
      1RNH M 1 A_ZoomFactor(0.92)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.25)
      1RNH N 1 A_ZoomFactor(0.94)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.25)
      1RNH O 1 A_ZoomFactor(0.95)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.35)
      1RNH P 1 A_ZoomFactor(0.96)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.25)
      1RNH Q 1 A_ZoomFactor(0.97)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.25)
      1RNH R 1 A_ZoomFactor(0.98)
      1RNG A 0 A_SetPitch(pitch+0.35)
      1RNG A 0 A_SetAngle(angle+0.25)
      1RNH S 1 A_ZoomFactor(0.99)
      1RNG A 0 A_SetPitch(pitch+0.25)
      1RNG A 0 A_SetAngle(angle+0.15)
      1RNH T 1 A_ZoomFactor(1)
	  1RNR ABCDEFGHIJKL 1
      1RNR A 0 A_PlaySound("Ironblast/Pump/In",6,0.6)
	  1RNR MNOPQRSTTT 1 A_SetPitch(Pitch+1)
	  1RNR T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 0 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
	  1RNR T 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,30,-12)
      1RNR A 0 A_PlaySound("Ironblast/Pump/Out",6,0.6)
	  1RNR SRQPONM 1 A_SetPitch(Pitch-1)
	  1RNR LKJIHGFEDCBA 1
	  1RNG A 1
	  1RNG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	  Goto RIdle
	  
   //Left
	  
   Nullify:
	  TNT1 A 0
	  Stop
   Flash:
	  TNT1 A 0 A_Light0
   LIdle:
	  2RNG A 1 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Loop
   LFire:
	  TNT1 A 0 A_JumpIf(CallACS("GunslingerMode"),2)
	  2RNG A 0 A_JumpIfInventory("PowerGunzerking",1,1) 
	  Goto Nullify
	  2RNG A 1 A_JumpIfInventory("GreenMana",8,1)
	  Goto LIdle
	  2RNF A 0 A_TakeInventory("GreenMana",8,TIF_NOTAKEINFINITE)
      2RNF A 0 A_PlaySound("Ironblast/Fire",1,0.4)
      2RNF A 0 A_PlaySound("Ironblast/Add",5,0.5)
      2RNF A 0 A_SetBlend("Yellow",0.2,15)
      2RNF A 0 A_Recoil(10)
	  2RNF A 0 A_ChangeVelocity (Cos(Pitch) * -22, 0, Sin(Pitch) * 22,CVF_RELATIVE)
      2RNF A 0 A_AlertMonsters
      2RNF A 0 A_Quake (4, 10, 0, 24, none)
	  2RNF AAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(7.0,-7.0),0,-8+frandom(2.0,-2.0),frandom(2.0,-2.0),0,frandom(3.0,-3.0))
	  2RNF AAAAAAAAAA 0 A_FireCustomMissile("IronblastProjectile",frandom(7.0,-7.0),0,-12+frandom(2.0,-2.0),frandom(2.0,-2.0),0,frandom(3.0,-3.0))
      //2RNF A 0 A_FireBullets(12,4,64,5*random(2.0,3.0),"HBulletPuff",FBF_NORANDOM)
      2RNG A 0 A_SetPitch(pitch-0.75)
      2RNG A 0 A_SetAngle(angle+0.75)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      2RNF A 1 Bright A_ZoomFactor(0.99)
      2RNG A 0 A_SetPitch(pitch-1)
      2RNG A 0 A_SetAngle(angle+1)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      2RNF A 1 Bright A_ZoomFactor(0.98)
      2RNG A 0 A_SetPitch(pitch-1)
      2RNG A 0 A_SetAngle(angle+1)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-6,-1)
	  2RNF A 0 A_FireCustomMissile("GunsmokeSpawner_Large",0,0,-15,-1)
      2RNF C 1 Bright A_ZoomFactor(0.95)
      2RNH A 1 A_ZoomFactor(0.9)
      2RNG A 0 A_SetPitch(pitch-1.25)
      2RNG A 0 A_SetAngle(angle+1.25)
      2RNH B 1 A_ZoomFactor(0.8)
      2RNH A 0 A_SetPitch(pitch-0.75)
      2RNG A 0 A_SetAngle(angle+0.75)
      2RNH C 1 A_ZoomFactor(0.75)
      2RNG A 0 A_SetPitch(pitch-0.65)
      2RNG A 0 A_SetAngle(angle+0.65)
      2RNH D 1 A_ZoomFactor(0.725)
      2RNG A 0 A_SetPitch(pitch-0.45)
      2RNG A 0 A_SetAngle(angle+0.45)
      2RNH E 1 A_ZoomFactor(0.71)
      2RNG A 0 A_SetPitch(pitch-0.35)
      2RNG A 0 A_SetAngle(angle+0.35)
      2RNH F 1 A_ZoomFactor(0.73)
      2RNG A 0 A_SetPitch(pitch-0.25)
      2RNG A 0 A_SetAngle(angle+0.25)
      2RNH G 1 A_ZoomFactor(0.8)
      2RNG A 0 A_SetPitch(pitch-0.15)
      2RNG A 0 A_SetAngle(angle+0.15)
      2RNH H 1 A_ZoomFactor(0.82)
      2RNG A 0 A_SetPitch(pitch+0.15)
      2RNG A 0 A_SetAngle(angle+0.25)
      2RNH I 1 A_ZoomFactor(0.83)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle+0.25)
      2RNH J 1 A_ZoomFactor(0.85)
      2RNG A 0 A_SetPitch(pitch+0.15)
      2RNG A 0 A_SetAngle(angle+0.15)
      2RNH K 1 A_ZoomFactor(0.87)
      2RNG A 0 A_SetPitch(pitch+0.35)
      2RNH L 1 A_ZoomFactor(0.89)
      2RNG A 0 A_SetPitch(pitch+0.35)
      2RNG A 0 A_SetAngle(angle-0.15)
      2RNH M 1 A_ZoomFactor(0.92)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.25)
      2RNH N 1 A_ZoomFactor(0.94)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.25)
      2RNH O 1 A_ZoomFactor(0.95)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.35)
      2RNH P 1 A_ZoomFactor(0.96)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.25)
      2RNH Q 1 A_ZoomFactor(0.97)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.25)
      2RNH R 1 A_ZoomFactor(0.98)
      2RNG A 0 A_SetPitch(pitch+0.35)
      2RNG A 0 A_SetAngle(angle-0.25)
      2RNH S 1 A_ZoomFactor(0.99)
      2RNG A 0 A_SetPitch(pitch+0.25)
      2RNG A 0 A_SetAngle(angle-0.15)
      2RNH T 1 A_ZoomFactor(1)
	  2RNR ABCDEFGHIJKL 1
      2RNR A 0 A_PlaySound("Ironblast/Pump/In",6,0.6)
	  2RNR MNOPQRSTTT 1 A_SetPitch(Pitch+1)
	  2RNR T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 0 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
	  2RNR T 1 A_FireCustomMissile("ShottyCasingSpawnerLeft",0,0,-30,-12)
      2RNR A 0 A_PlaySound("Ironblast/Pump/Out",6,0.6)
	  2RNR SRQPONM 1 A_SetPitch(Pitch-1)
	  2RNR LKJIHGFEDCBA 1
	  2RNG A 1
	  2RNG A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	  Goto LIdle
	}
}