/*
CREDITS:
Sprites - Inferno Interactive (Shadow Warrior Expansion, Ripped by Zero X. Diamond)

Sounds:
Up - Mashup. One part by Epic Games (UT2004)
Idle, Start, Loop, End, Click - ? (Not sure, but I give my bets for Gore: Ultimate Soldier by 4D Rulers?)
Boom - ? (No ducking idea, found it on friend's old hardware, heh.)
Air Throw - ?
Air End - EA (C&C Generals)
*/

ACTOR Immolator : Weapon 24523
{
   //$Category Weapons
   //$Title Immolator
   //$Sprite NLMGX0
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You got the ''Immolator'' Mark MMMMCLXXIV Explosionthrower! I hope this version will be better than Mark MMMMCLXXIII! (6)"
   Obituary "%k spewed on %o a cloud of explosions with a fatal results. For %o."
   Weapon.UpSound "Weapons/ImmolatorUp"
   Weapon.SelectionOrder 3
   Weapon.AmmoGive 20
   Weapon.AmmoType "RawketAmmo"
   Weapon.AmmoUse 1
   Weapon.AmmoUse2 0
   Weapon.AmmoType2 "ImmolatorTrigger"
   Weapon.AmmoGive2 0
   Weapon.Kickback 50
   Weapon.SlotNumber 6
   Scale 0.65
   +NOAUTOFIRE
   +AMMO_OPTIONAL
   States
   {
   Spawn:
      NLMG X -1
      Stop
   NoAmmo:
       NLMG A 0
       Goto Ready
   Ready:
      NLMG B 0 A_PlaySoundEx("weapons/ImmolatorIdle","SoundSlot5",1)
      NLMG A 1 A_WeaponReady
	  TNT1 A 0 A_JumpIfInventory("RO_GotoReload", 1, "Reload")
      Loop
   Deselect:
      NLMG A 0 A_TakeInventory("ImmolatorTrigger",1)
      NLMG A 0 A_StopSound(6)
      NLMG A 0 A_StopSound(5)
      NLMG A 0 A_ZoomFactor(1)
      NLMG A 1 A_Lower
      NLMG A 0 A_Lower
      Loop
   Select:
      NLMG A 1 A_Raise
      Loop
   Fire:
      NLMG A 0 A_JumpIfInventory("ImmolatorMode",1,"FireAirstream")
      NLMG A 0 A_JumpIfInventory("ImmolatorTrigger",1,"ChargingStop")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",1,"ExploBlast")
      NLMG A 0 A_JumpIfInventory("RawketAmmo",2,1)
      Goto NoAmmo
      NLMG B 5 A_PlayWeaponSound("Weapons/ImmolatorStart")
      NLMG B 1 A_ZoomFactor(0.97)
      NLMG B 1 A_ZoomFactor(0.95)
      NLMG B 0 A_StopSound(5)
   Hold:
      NLMG A 0 A_JumpIfInventory("ImmolatorMode",1,"HoldAirstream")
      NLMG A 0 A_JumpIfInventory("ImmolatorTrigger",1,"ChargingStop")
      NLMG B 0 A_PlaySound("weapons/ImmolatorLoop",5,1.0,1)
      NLMG B 0 A_PlaySound("weapons/ImmolatorALoop",6,0.7,1)
      
      NLMG B 0 A_JumpIfNoAmmo("Endo")
      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(8,40) A_FireCustomMissile("ImmolatorBoom",0.1*random(40,-40),1,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(12,44) A_ZoomFactor(0.93)
      
      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(16,48) A_FireCustomMissile("ImmolatorBoom",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(12,44) A_ZoomFactor(0.94)

      NLMG B 0 A_JumpIfNoAmmo("Endo")
      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(8,40) A_FireCustomMissile("ImmolatorBoom",0.1*random(40,-40),1,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(12,44) A_ZoomFactor(0.93)

      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(16,48) A_FireCustomMissile("ImmolatorBoom",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(12,44) A_ZoomFactor(0.94)
      
      NLMG A 0 A_Refire("Hold")
   Endo:
      NLMG A 1 Offset(8,40) A_ZoomFactor(0.95)
      NLMG A 1 Offset(5,37) A_ZoomFactor(0.96)
      NLMG A 1 Offset(4,36) A_ZoomFactor(0.97)
      NLMG A 1 Offset(3,35) A_ZoomFactor(0.98)
      NLMG A 1 Offset(2,34) A_ZoomFactor(0.99)
      NLMG A 1 Offset(1,33) A_ZoomFactor(0.995)
      NLMG A 1 Offset(0,32) A_ZoomFactor(1)
      NLMG A 0 A_StopSound(6)
      NLMG A 0 A_StopSound(5)
      NLMG A 0 A_PlayWeaponSound("weapons/ImmolatorEnd")
      NLMG A 24 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
      NLMG A 0 A_PlaySoundEx("Weapons/ImmolatorIdle","SoundSlot5",1)
      NLMG A 8 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
      NLMG A 0 A_ReFire("Ready")
      Goto Ready
   FireAirstream:
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",1,"Blast")
      NLMG B 5 A_PlayWeaponSound("Weapons/ImmolatorStart")
      NLMG B 1 A_ZoomFactor(0.98)
      NLMG B 1 A_ZoomFactor(0.97)
      NLMG B 0 A_StopSound(5)
   HoldAirstream:
      NLMG A 0 A_JumpIfInventory("ImmolatorTrigger",1,"ChargingStop")
      NLMG B 0 A_PlaySoundEx("Weapons/ImmolatorAirstream","SoundSlot5",1)
      
      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(4,36) A_FireCustomMissile("ImmolatorAirflector",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(8,40) A_ZoomFactor(0.96)
      
      NLMG B 1 Offset(12,44) A_FireCustomMissile("ImmolatorAirflector",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(8,40) A_ZoomFactor(0.95)

      NLMG B 0 A_Recoil(1)
      NLMG B 0 A_SetPitch(pitch-1)
      NLMG B 1 Offset(4,36) A_FireCustomMissile("ImmolatorAirflector",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(8,40) A_ZoomFactor(0.96)

      NLMG B 1 Offset(12,44) A_FireCustomMissile("ImmolatorAirflector",0.1*random(40,-40),0,10,-5,0,0.1*random(20,-20))
      NLMG B 1 Offset(8,40) A_ZoomFactor(0.95)
      
      NLMG A 0 A_Refire("Hold")
   Airendo:
      NLMG A 1 Offset(8,40) A_ZoomFactor(0.95)
      NLMG A 1 Offset(5,37) A_ZoomFactor(0.96)
      NLMG A 1 Offset(4,36) A_ZoomFactor(0.97)
      NLMG A 1 Offset(3,35) A_ZoomFactor(0.98)
      NLMG A 1 Offset(2,34) A_ZoomFactor(0.99)
      NLMG A 1 Offset(1,33) A_ZoomFactor(0.995)
      NLMG A 1 Offset(0,32) A_ZoomFactor(1)
      NLMG A 0 A_StopSound(6)
      NLMG A 0 A_StopSound(5)
      NLMG A 0 A_PlayWeaponSound("Weapons/ImmolatorAirstreamEnd")
      NLMG A 12 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
      NLMG A 0 A_PlaySoundEx("Weapons/ImmolatorIdle","SoundSlot5",1)
      NLMG A 8 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
      NLMG A 0 A_ReFire("Ready")
      Goto Ready

   AltFire:
      NLMG A 0 A_GiveInventory("ImmolatorTrigger",1)
      NLMG A 2 A_PlaySoundEx("Weapons/ImmolatorClick","SoundSlot5")
      NLMG A 0 A_PlaySoundEx("Weapons/ErasusHammerStart","SoundSlot6")
      NLMG BC 2
      NLMG B 0 A_ReFire("Charging")
      Goto Blast
   Charging:
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",6,"Blast")
      NLMG A 0 A_PlaySoundEx("Weapons/ErasusHammerLoop","SoundSlot6",1)
      NLMG A 0 A_GiveInventory("ImmolatorCounter",1)
      ERAG A 0 A_Quake(5,11,0,6,none)
      NLMG C 1 Offset(2,34) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(0,32) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(1,31) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(-1,33) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(2,32) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(1,33) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(0,32) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(2,30) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(-2,34) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(0,32) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG C 1 Offset(0,30) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      NLMG A 0 A_ReFire("Charging")
      Goto Blast
   ChargingStop:
      NLMG A 0 A_PlaySoundEx("Weapons/ErasusHammerStop","SoundSlot6")
      NLMG A 0 A_TakeInventory("ImmolatorTrigger",1)
      NLMG A 0 Offset(0,32)
      NLMG CBA 2
      NLMG A 8
      NLMG A 0 A_ClearReFire//("Fire")
      Goto Ready
   Blast:
      NLMG A 0 A_TakeInventory("ImmolatorTrigger",1)
      NLMG A 0 Offset(0,32)
      NLMG A 0 A_StopSound(6) //A_PlaySoundEx("Weapons/ErasusHammerStop","SoundSlot6")
      NLMG A 0 A_PlaySound("Weapons/ImmolatorBlast",1,0.9)
      NLMG CCCC 1 A_SetPitch(pitch+6)
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",6,"6Blast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",5,"5Blast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",4,"4Blast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",3,"3Blast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",2,"2Blast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",1,"1Blast")
      Goto 0Blast
   0Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 50, 0, 1)
      NLMG A 0 A_Recoil(-10)
      Goto BlastAnim
   1Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 65, 0, 1)
      NLMG A 0 A_Recoil(-15)
      Goto BlastAnim
   2Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 80, 0, 1)
      NLMG A 0 A_Recoil(-20)
      Goto BlastAnim
   3Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 95, 0, 1)
      NLMG A 0 A_Recoil(-25)
      Goto BlastAnim
   4Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 110, 0, 1)
      NLMG A 0 A_Recoil(-30)
      Goto BlastAnim
   5Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 125, 0, 1)
      NLMG A 0 A_Recoil(-35)
      Goto BlastAnim
   6Blast:
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 ThrustThingZ(0, 140, 0, 1)
      NLMG A 0 A_Recoil(-40)
      Goto BlastAnim
   BlastAnim:
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG C 1 Offset(8,40) A_SetPitch(pitch-5)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG C 1 Offset(12,44) A_SetPitch(pitch-5)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG B 1 Offset(16,48) A_SetPitch(pitch-5)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG B 1 Offset(12,44) A_SetPitch(pitch-5)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(8,40) A_ZoomFactor(0.95)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(5,37) A_ZoomFactor(0.96)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(4,36) A_ZoomFactor(0.97)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(3,35) A_ZoomFactor(0.98)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(2,34) A_ZoomFactor(0.99)
      NLMG C 0 A_FireCustomMissile("ImmolatorAirblast",0,0,10,-5,0,0)
      NLMG A 1 Offset(1,33) A_ZoomFactor(0.995)
      NLMG A 1 Offset(0,32) A_ZoomFactor(1)
      NLMG A 0 A_StopSound(6)
      NLMG A 10
      Goto Ready

   ExploBlast:
      NLMG A 2 A_PlaySoundEx("Weapons/ImmolatorClick","SoundSlot5")
      NLMG B 2
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",6,"6ExploBlast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",5,"5ExploBlast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",4,"4ExploBlast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",3,"3ExploBlast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",2,"2ExploBlast")
      NLMG A 0 A_JumpIfInventory("ImmolatorCounter",1,"1ExploBlast")
      NLMG B 4
      NLMG A 1
      Goto Ready
   1ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",2,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",2)
      NLMG AAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(50,-50),0,10,-5,0,0.1*random(30,-30))
      NLMG A 0 A_Recoil(6)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim+5
   2ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",3,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",3)
      NLMG AAAAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(60,-60),0,10,-5,0,0.1*random(30,-30))
      NLMG A 0 A_Recoil(8)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim+4
   3ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",4,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",4)
      NLMG AAAAAAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(70,-70),0,10,-5,0,0.1*random(40,-40))
      NLMG A 0 A_Recoil(11)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim+3
   4ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",5,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",5)
      NLMG AAAAAAAAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(80,-80),0,10,-5,0,0.1*random(40,-40))
      NLMG A 0 A_Recoil(14)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim+2
   5ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",6,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",6)
      NLMG AAAAAAAAAAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(90,-90),0,10,-5,0,0.1*random(50,-50))
      NLMG A 0 A_Recoil(17)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim+1
   6ExploBlast:
      NLMG A 0 A_JumpIfInventory("RawketAmmo",7,1)
      Goto Blast
      NLMG A 0 A_TakeInventory("ImmolatorCounter",9)
      NLMG A 0 A_TakeInventory("RawketAmmo",7)
      NLMG AAAAAAAAAAAAAA 0 A_FireCustomMissile("ImmolatorBoom",0.1*random(100,-100),0,10,-5,0,0.1*random(50,-50))
      NLMG A 0 A_Recoil(20)
      NLMG A 0 A_PlaySound("weapons/ImmolatorEnd")
      NLMG C 0 A_PlaySound("Weapons/ImmolatorBoom",1,0.7)
      NLMG A 0 A_StopSound(5)
      Goto SplosionBlastAnim
   SplosionBlastAnim:
      NLMG B 1 Offset(8,40) A_SetPitch(pitch-6)
      NLMG B 1 Offset(12,44) A_SetPitch(pitch-6)
      NLMG B 1 Offset(16,48) A_SetPitch(pitch-6)
      NLMG B 1 Offset(12,44) A_SetPitch(pitch-6)
      NLMG B 1 Offset(8,40) A_ZoomFactor(0.95)
      NLMG B 1 Offset(5,37) A_ZoomFactor(0.96)
      NLMG B 1 Offset(4,36) A_ZoomFactor(0.97)
      NLMG A 1 Offset(3,35) A_ZoomFactor(0.98)
      NLMG A 1 Offset(2,34) A_ZoomFactor(0.99)
      NLMG A 1 Offset(1,33) A_ZoomFactor(0.995)
      NLMG A 1 Offset(0,32) A_ZoomFactor(1)
      NLMG A 24 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
      NLMG A 0 A_PlaySoundEx("Weapons/ImmolatorIdle","SoundSlot5",1)
      NLMG A 8 A_WeaponReady
      Goto Ready
   Reload:
      NLMG A 0 A_JumpIfInventory("ImmolatorMode",1,"UnReload")
      NLMG A 0 A_Print("Reflector Mode")
      NLMG A 0 A_GiveInventory("ImmolatorMode",1)
      Goto HNNNNNNG
   UnReload:
      NLMG A 0 A_Print("Master Exploder Mode")
      NLMG A 0 A_TakeInventory("ImmolatorMode",1)
      Goto HNNNNNNG
   HNNNNNNG:
      NLMG A 0 A_PlaySoundEx("Weapons/ImmolatorClick","SoundSlot6")
      NLMG A 1 Offset(1,33) A_SetPitch(pitch+1)
      NLMG A 1 Offset(3,35) A_SetPitch(pitch+2)
      NLMG A 1 Offset(5,37) A_SetPitch(pitch+3)
      NLMG A 1 Offset(6,38) A_SetPitch(pitch+2)
      NLMG A 5 Offset(7,39)
      NLMG A 1 Offset(8,40) A_SetPitch(pitch-1)
      NLMG A 1 Offset(9,41) A_SetPitch(pitch-1)
      NLMG A 1 Offset(7,39) A_SetPitch(pitch-2)
      NLMG A 1 Offset(5,37) A_SetPitch(pitch-2)
      NLMG A 1 Offset(3,35) A_SetPitch(pitch-1)
      NLMG A 1 Offset(1,33) A_SetPitch(pitch-1)
      NLMG A 1 Offset(0,32)
      Goto Ready
   }
}

actor ImmolatorCounter : Ammo
{
	Inventory.Amount 1
	Inventory.MaxAmount 6
	ammo.backpackamount 0
	ammo.backpackmaxamount 6
	Inventory.Icon "ERAGX0"
}

actor ImmolatorTrigger : Ammo
{
	Inventory.Amount 1
	Inventory.MaxAmount 1
	ammo.backpackamount 0
	ammo.backpackmaxamount 1
}

actor ImmolatorMode : Inventory
{
	Inventory.MaxAmount 1
}

//Fire
ACTOR ImmolatorBoom
{
   Obituary "%k spewed on %o a cloud of explosions with a fatal results. For %o."
   Radius 6
   Height 9
   Speed 40
   Damage 10
   //BounceType Doom
   //BounceCount 2
   ReactionTime 8
   PROJECTILE
   +RANDOMIZE
   +THRUGHOST
   +FORCERADIUSDMG
   +EXPLODEONWATER
   +RIPPER
   States
   {
   Spawn:
      TNT1 A 0
      TNT1 A 0 A_PlaySound("weapons/larpaexp")
      TNT1 A 0 A_Countdown
      TNT1 A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerSpawn")
      TNT1 A 0 A_Explode(90,96,0)
      TNT1 A 2 A_SpawnItemEx("ImmolatorExplode",frandom(3,-3),frandom(3,-3),frandom(3,-3),0,0,0,0,128,0)
      Loop
   Death:
      TNT1 A 1
      Stop
   NukerSpawn:
      TNT1 A 0 A_Explode(180,144,0)
      TNT1 A 2 A_SpawnItemEx("NukerImmolatorExplode",frandom(3,-3),frandom(3,-3),frandom(3,-3),0,0,0,0,128,0)
      goto Spawn
   }
}


//IMMOLATOR CUSTOM EXP
ACTOR ImmolatorExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AA 0 A_SpawnItemEx("ImmolatorExploder", 0, 0, 0, 0.1*random(13,20), 0.1*random(13,20), 0.1*random(13,20), random(0,360), 128, 0)
      TNT1 A 0 A_SpawnItemEx("PelletExpSmoke", 0, 0, 0, 0.1*random(1,3), 0.1*random(1,3), 0.1*random(1,3), random(0,360), 128, 0)
      TNT1 BB 2 A_SpawnItemEx("PelletExpSmoke", 0, 0, 0, 0.1*random(1,3), 0.1*random(1,3), 0.1*random(1,3), random(0,360), 128, 0)
      TNT1 CD 4
      Stop
    }
}

ACTOR ImmolatorExploder
{ 
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AAA 2 A_SpawnItemEx("PelletExp", 0.1*random(40,30), 0.1*random(40,30), 0.1*random(40,30), 0, 0, 0, 0, 128, 0)
      Stop
    }
}

//NUKER UPGRADE
ACTOR NukerImmolatorExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 0 A_SpawnItemEx("NukerPelletFlash",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerImmolatorExploder",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerImmolatorSmoker",0,0,0,0,0,0,0,128,0)
      TNT1 A 1
      Stop
    }
}

ACTOR NukerImmolatorExploder
{
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AAA 2 A_SpawnItemEx("NukerPelletExp", random(3,-3), random(3,-3), random(3,-3), 0, 0, 0, 0, 128, 0)
      Stop
    }
}

ACTOR NukerImmolatorSmoker
{
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 7
      TNT1 AAA 0 A_SpawnItemEx("NukerPelletExpSmoke", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      TNT1 AA 2 A_SpawnItemEx("NukerPelletExpSmoke", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      Stop
    }
}

//ALT-FIRE

ACTOR ImmolatorAirblast
{
    Obituary "IMMA BE BARANKE FOR TEH AWESUM, DERP DERP DERP DERP DERP DERP"
    +NOINTERACTION
	+CLIENTSIDEONLY
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 AA 0 A_SpawnItemEx("ImmolatorAir", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      TNT1 AA 3 A_SpawnItemEx("ImmolatorAir", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      Stop
    }
}

ACTOR ImmolatorAir : MissileExpSmoke
{ 
    Scale 0.4
    Renderstyle Add
	+CLIENTSIDEONLY
}

//ZOOM ADD. FIRE

ACTOR ImmolatorAirflector //A word-play on Reflector and Air... Ain't I smartypants!?
{
	Radius 16
	Height 12
	Speed 15
	Damage 2
	PROJECTILE
	+SHOOTABLE
	+REFLECTIVE
	+DEFLECT
	+THRUGHOST
	+GHOST
	+INVULNERABLE
	+BLOODLESSIMPACT
	+SKYEXPLODE
	+BOUNCEONACTORS
	+DONTSPLASH
	-NOBLOCKMAP
	//ProjectileKickback 1700
	Renderstyle Add
	BounceType Hexen
	BounceFactor 1
	Scale 0.4
	Alpha 0.4
    States
    {
    Spawn:
      SMKE A 0
      SMKE A 0 A_ChangeVelocity (frandom(-6, 4), 0, 0, 0)
      SMKE A 0 A_FadeOut(0.1)
      SMKE A 0 A_Jump(255,"SmokeA","SmokeB","SmokeC","SmokeD","SmokeE","SmokeF","SmokeG","SmokeH","SmokeI","SmokeJ","SmokeK")
    SmokeA:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE A 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeB:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE B 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeC:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE C 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeD:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE D 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeE:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE E 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeF:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE F 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeG:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE G 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeH:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE H 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeI:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE I 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeJ:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE J 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeK:
      SMKE A 0 A_FadeOut(0.03)
      SMKE A 0 A_SpawnItemEx("ImmolatorAirflectorTrail",random(4,-4),random(7,-7),random(7,-7),frandom(0.075,0.1),frandom(0.075,0.1),frandom(0.075,0.13),random(0,359),128,0)
      SMKE A 3 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    }
}

ACTOR ImmolatorAirflectorTrail : ImmolatorAirflector
{
+CLIENTSIDEONLY
    States
    {
    Spawn:
      SMKE A 0
      SMKE A 0 A_FadeOut(0.1)
      SMKE A 0 A_Jump(255,"SmokeA","SmokeB","SmokeC","SmokeD","SmokeE","SmokeF","SmokeG","SmokeH","SmokeI","SmokeJ","SmokeK")
    SmokeA:
      SMKE A 0 A_FadeOut(0.035)
      SMKE A 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeB:
      SMKE A 0 A_FadeOut(0.035)
      SMKE B 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeC:
      SMKE A 0 A_FadeOut(0.035)
      SMKE C 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeD:
      SMKE A 0 A_FadeOut(0.035)
      SMKE D 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeE:
      SMKE A 0 A_FadeOut(0.035)
      SMKE E 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeF:
      SMKE A 0 A_FadeOut(0.035)
      SMKE F 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeG:
      SMKE A 0 A_FadeOut(0.035)
      SMKE G 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeH:
      SMKE A 0 A_FadeOut(0.035)
      SMKE H 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeI:
      SMKE A 0 A_FadeOut(0.035)
      SMKE I 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeJ:
      SMKE A 0 A_FadeOut(0.035)
      SMKE J 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    SmokeK:
      SMKE A 0 A_FadeOut(0.035)
      SMKE A 2 //A_SetScale(ScaleX +0.005, ScaleY +0.005)
      Loop
    }
}
