actor ChromeJustice : Weapon replaces SuperShotgun
{
  Game Doom
  Weapon.AmmoUse 1
  Weapon.AmmoUse2 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 24
  Weapon.AmmoType "ChromeJusticeClip"
  Weapon.AmmoType2 "ShellsAmmo"
  Weapon.SlotNumber 3
  Weapon.SelectionOrder 3
  Weapon.UpSound "ChromeJustice/Up"
  Weapon.Kickback 150
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "Got yourself a ''Chrome Justice'' shotgun! Preserving law'n'order, now with 140% more fire! (3)"
  Obituary "%o had to remain calm, and even dead, enforced by %k's ''Chrome Justice''."
  Weapon.BobStyle InverseSmooth
  Weapon.BobSpeed 1.8
  Weapon.BobRangeY 0.4
  Weapon.BobRangeX 0.8
  +AMMO_CHECKBOTH
  +NOALERT
  +NOAUTOFIRE
  +NOAUTOAIM
  States
  {
  Ready:
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP I 1 A_JumpIf(Health<75,2)
	PCFP HG 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP F 1 A_JumpIf(Health<50,2)
	PCFP ED 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP C 1 A_JumpIf(Health<25,2)
	PCFP BA 1
  ReadyMain:
    PCFG B 0 A_JumpIfInventory("MacheteGoesFast",1,"CaberToss")
    PCFG B 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM) //Why I defined the exactly same frame in TEXTURES to use here? Dunno why, but it fixes rendering issues with Doom's sprite, soooo... why not?
    Loop
  DryFire:
	PCFG B 0 A_PlaySound("ChromeJustice/Dry",4,0.7)
	PCFT DCBABCD 1
	PCFG B 1
	Goto ReadyMain
  Deselect:
    PCFG BA 0 A_Lower
    PCFG B 1 A_Lower
    Loop
  Select:
    PCFP II 0 A_Raise
    PCFP I 1 A_Raise
    Loop
  Fire:
    PC2F A 0 A_JumpIfInventory("IsReloading",1,"ReloadFinish")
    PC2F A 0 A_JumpIfInventory("ChromeJusticeClip",1,1)
	Goto DryFire
	PC2F A 0 A_PlaySound("ChromeJustice/Fire",1,0.9)
	PC2F A 0 A_PlaySound("ChromeJustice/Alt",5,0.75)
	//PC2F A 0 A_TakeInventory("ChromeJusticeClip",3,TIF_NOTAKEINFINITE)
    PC2F A 0 A_FireCustomMissile("ChromeJusticeSonicfire",frandom(6.000,-6.000),1,11,4,0,frandom(2.000,-2.000))
    PC2F AAAAAA 0 A_FireCustomMissile("ChromeJusticeSonicfire",frandom(6.000,-6.000),0,11,4,0,frandom(2.000,-2.000))
	PC2F A 0 A_FireCustomMissile("GunsmokeSpawner_Medium_Dark",0,0,10,4)
	PC2F A 0 A_AlertMonsters
	PC2F A 0 A_GunFlash
	PC2F A 0 A_Recoil(6)
	PC2F A 0 A_ZoomFactor(0.93)
    PC2F A 1 Bright A_SetPitch(pitch-2.5)
	PC2F A 0 A_ZoomFactor(0.95)
	PC2F B 1 Bright A_SetPitch(pitch-1.75)
	PC2P A 1 A_ZoomFactor(0.955)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<75,2)
	PC2P B 1 A_ZoomFactor(0.96)
	PC2P C 1 A_ZoomFactor(0.97)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<50,2)
	PC2P D 1 A_ZoomFactor(0.98)
	PC2P E 1 A_ZoomFactor(0.99)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<25,2)
	PC2P F 1 A_ZoomFactor(0.995)
	PC2P G 1 A_ZoomFactor(1)
	PC2P HI 1
	PC2P A 0 A_PlaySound("ChromeJustice/Pump",4,0.6)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PC2P J 1 A_JumpIf(Health<75,2)
	PC2P K 1
	PCFP L 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP M 1 A_JumpIf(Health<50,2)
	PCFP M 1 //A_FireCustomMissile("ShottyCasingSpawner",0,0,0,0)
	PCFP L 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,0,0)
	PCFP K 1 //A_FireCustomMissile("ShottyCasingSpawner",0,0,0,0) //Hurrgineer was here.
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP J 1 A_JumpIf(Health<25,2)
	PCFP IHG 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP F 1 A_JumpIf(Health<75,2)
	PCFP EDC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP B 1 A_JumpIf(Health<50,2)
	PCFP A 1
	PCFT AB 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFT C 1 A_JumpIf(Health<25,2)
	PCFT D 1
	PCFG B 1
	PCFG B 0 A_ReFire
	Goto ReadyMain
  Altfire:
    PCFF A 0 A_JumpIfInventory("IsReloading",1,"ReloadFinish")
    PC2F A 0 A_JumpIfInventory("ChromeJusticeClip",1,1)
	Goto DryFire
	PCFF A 0 A_PlaySound("ChromeJustice/Fire",1)
	PCFF A 0 A_FireCustomMissile("GunsmokeSpawner_Medium",0,0,10,4)
    PCFF A 0 A_FireBullets(2.2, 2.2, 30, 5, "BulletPuff", 0)
	PCFF A 0 A_TakeInventory("ChromeJusticeClip",1,TIF_NOTAKEINFINITE)
	PCFF A 0 A_AlertMonsters
	PCFF A 0 A_GunFlash
	PCFF A 0 A_Recoil(1)
    PCFF A 1 Bright A_SetPitch(pitch-1.5)
	PCFF B 1 Bright A_SetPitch(pitch-0.75)
	PCFP A 1 A_ZoomFactor(0.975)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<75,2)
	PCFP B 1 A_ZoomFactor(0.98)
	PCFP C 1 A_ZoomFactor(0.985)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<50,2)
	PCFP D 1 A_ZoomFactor(0.99)
	PCFP E 1 A_ZoomFactor(0.9925)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<25,2)
	PCFP F 1 A_ZoomFactor(0.995)
	PCFP G 1 A_ZoomFactor(1)
	PCFP HI 1
	PCFP A 0 A_PlaySound("ChromeJustice/Pump",4,0.6)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP J 1 A_JumpIf(Health<75,2)
	PCFP KL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP M 1 A_JumpIf(Health<50,2)
	PCFP M 1
	PCFP L 1 A_FireCustomMissile("ShottyCasingSpawner",0,0,0,0)
	PCFP K 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP J 1 A_JumpIf(Health<25,2)
	PCFP IHG 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP F 1 A_JumpIf(Health<75,2)
	PCFP EDC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP B 1 A_JumpIf(Health<50,2)
	PCFP A 1
	PCFT AB 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFT C 1 A_JumpIf(Health<25,2)
	PCFT D 1
	PCFG B 1
	PCFG B 0 A_ReFire
	Goto ReadyMain
  DriedToBoot:
    PCFG B 0 A_GiveInventory("DryToken",1)
	Goto ReloadMainie
  Reload:
	TNT1 A 0 A_JumpIfInventory("IsReloading2",1,"Reload2")
	TNT1 A 0 A_JumpIfInventory("ChromeJusticeClip",0,"ReadyMain")
	TNT1 A 0 A_JumpIfInventory("ShellsAmmo",3,1)
	Goto ReadyMain
  ReloadMain:
    PCFG B 0 A_JumpIfInventory("ChromeJusticeClip",1,1)
	Goto DriedToBoot
  ReloadMainie:
	TNT1 A 0 A_GiveInventory("IsReloading",1)
	PCFP A 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP B 1 A_JumpIf(Health<75,2)
	PCFP CDEF 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP G 1 A_JumpIf(Health<50,2)
	PCFP HI 1
	PCFH CE 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFH G 1 A_JumpIf(Health<25,2)
	PCFH HJK 1
	PCFH L 4
  ReloadWorking:
    PCFR A 0 A_PlaySound("ChromeJustice/Load",4)
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFR E 1 A_JumpIf(Health<50,2)
	PCFR FHI 1
	TNT1 A 0 A_TakeInventory("ShellsAmmo",3,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFR K 1 A_JumpIf(Health<25,2)
	PCFR LM 1
	TNT1 A 0 A_GiveInventory("ChromeJusticeClip",1)
	PCFH L 3 A_WeaponReady(WRF_NOBOB|WRF_NOSWITCH|WRF_ALLOWZOOM)
	SDKU A 0 A_TakeInventory("ZoomReFire",1)
	TNT1 A 0 A_JumpIfInventory("ChromeJusticeClip",0,"ReloadFinish")
	TNT1 A 0 A_JumpIfInventory("ShellsAmmo",3,"ReloadWorking")
	Goto ReloadFinish
  Reload2:
    PCFR A 0 A_TakeInventory("IsReloading2",1)
	TNT1 A 0 A_JumpIfInventory("ChromeJusticeClip",0,"ReloadFinish")
	TNT1 A 0 A_JumpIfInventory("ShellsAmmo",3,"ReloadWorking")
	Goto ReloadFinish
  ReloadFinish:
	FMGU A 0 A_TakeInventory("ZoomReFire",1)
    PCFH L 1 A_TakeInventory("IsReloading",1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,4)
	PCFH L 0 A_JumpIf(Health<50,3)
	PCFH LKJH 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFH G 1 A_JumpIf(Health<25,2)
	PCFH EC 1
	PCFH A 0 A_JumpIfInventory("DryToken",1,"Kaczink")
  GoingBackToMacDonalds:
	PCFP IHG 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP F 1 A_JumpIf(Health<75,2)
	PCFP EDC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP B 1 A_JumpIf(Health<50,2)
	PCFP A 3
	PCFT B 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFT C 1 A_JumpIf(Health<25,2)
	PCFT D 1
	PCFG B 2 A_ReFire
	Goto ReadyMain
  Kaczink:
    FMGG A 0 A_TakeInventory("DryToken",1)
	PCFP A 0 A_PlaySound("ChromeJustice/Pump",4,0.6)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP J 1 A_JumpIf(Health<75,2)
	PCFP KL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	PCFP M 1 A_JumpIf(Health<50,2)
	PCFP MLKJ 1
	Goto GoingBackToMacDonalds
  Flash:
    TNT1 A 6 A_Light2
    TNT1 A 8 A_Light1
    TNT1 A 0 A_Light0
    Stop
  AltFlash:
    TNT1 A 3 A_Light2
    TNT1 A 6 A_Light1
    TNT1 A 0 A_Light0
    Stop
  Zoom:
    PCFN A 0 A_JumpIfInventory("ZoomReFire",1,"PunchCriminalScums")
	PCFP ACEGI 1
	PCFH CEGHJK 1
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
  PunchCriminalScums:
	QML1 A 0 A_Gunflash("PunchFlash", GFF_NOEXTCHANGE)
	QML1 A 0 A_JumpIfInventory("PowerStrength2",1,2)
    QML1 A 0 A_Jump(256,3)
  	FML1 A 0 A_SetBlend("Orange",0.05,10)
	FML1 A 0 A_PlaySound("Melee/Firepunch",0)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" A 1 A_SetPitch(pitch-0.3)
	"####" B 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" C 1 A_SetPitch(pitch-0.3)
	"####" D 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerStrength2",1,3)
	"####" A 0 A_CustomPunch(30, 1, 0, "PunchCracker", 100)
	"####" A 0 A_Jump(256,2)
	"####" A 0 A_CustomPunch(90, 1, 0, "FlamePunchCracker", 150)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" E 1 A_SetPitch(pitch+0.3)
	"####" F 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" G 1 A_SetPitch(pitch+0.3)
	"####" H 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" I 1
	"####" J 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" K 1
	TNT1 A 3 A_GiveInventory("IsReloading2",1)
	TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWRELOAD|WRF_NOBOB)
	TNT1 A 1 A_TakeInventory("IsReloading2",1)
	TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
	PCFH KJHGEC 1
    PCFP IGEDCBA 1
	FMGU A 0 A_TakeInventory("IsReloading",1)
	FMGU A 0 A_TakeInventory("ZoomReFire",1)
	Goto ReadyMain
  PunchFlash:
	PCFH L 1 A_PlaySound("Punch/Swing",6,1.0)
	PCFM ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<75,2)
	PCFM BA 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<50,2)
	PCFH LL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<25,2)
	PCFH LL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<75,2)
	PCFH LL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<50,2)
	PCFH LL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	TNT1 A 0 A_JumpIf(Health<25,2)
	PCFH LL 1
	Stop
  CaberToss:
	PCFG B 1 A_JumpIfInventory("MacheteAmmo",1,1)
	Goto ReadyMain
	MCHT A 0 A_TakeInventory("MacheteAmmo",1)
	PCFN CBA 1

    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<75,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<50,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<25,1)
	TNT1 A 1
    MC4S A 0 A_PlaySound("Machete1/Slash",1,0.9)
    MC4S A 0 A_PlaySound("Machete2/Slash",5,0.2)
	MCHT ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerStrength2",1,3)
	MCHT A 0 A_SpawnItemEX("MacheterangProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*35,0,sin(-pitch)*35,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	TNT1 A 0 A_Jump(256,2)
	MCHT A 0 A_SpawnItemEX("MacheterangBerserkProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*25,0,sin(-pitch)*25,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	// This solution is ten times better. Just let it bouncecount out.
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT D 1 A_JumpIf(Health<75,1)
	MCHT E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT F 1 A_JumpIf(Health<50,1)
	MCHT G 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT H 1 A_JumpIf(Health<25,1)
	MCHT I 1
	TNT1 A 3

	PCFN ABC 1
	Goto ReadyMain
  Spawn:
    PCFG X -1
    Stop
  }
}

ACTOR ChromeJusticeClip : Ammo
{
   Inventory.MaxAmount 8
   Inventory.Icon PCFGX0
   +IGNORESKILL
}

ACTOR DryToken : Inventory { Inventory.MaxAmount 1 }
ACTOR IsReloading : Inventory { Inventory.MaxAmount 1 }
ACTOR IsReloading2 : Inventory { Inventory.MaxAmount 1 }

ACTOR ChromeJusticeSonicfire : FastProjectile
{
	Radius 10
	Height 12
	Speed 200
	Damage (2*random(1,3))
	Projectile
	MissileType "ChromeJusticeTrail"
	+RIPPER
	-DONTBLAST
	+BLOODLESSIMPACT
	+FORCERADIUSDMG
	ProjectileKickBack 0
	ReactionTime 6
	DamageType Fire
	Decal "ChromeScorch"
	States
	{
	Spawn:
	TNT1 A 0 NoDelay A_PlaySound("ChromeJustice/Fly1",5,0.6,1)
	TNT1 A 0 A_PlaySound("ChromeJustice/Fly2",5,0.4,1)
	TNT1 A 1 A_Countdown
	Loop
	Death:
	TNT1 A 0 A_SpawnItemEx("ChromeImpact")
	TNT1 A 0 A_StopSound(5)
	TNT1 A 1 A_StopSound(6)
	Stop
	}
}

ACTOR ChromeImpact //Used for GLDEF
{
	+NOINTERACTION
	+NOGRAVITY
	States
	{
	Spawn:
	TNT1 A 65
	Stop
	}
}

ACTOR ChromeJusticeTrail
{
	+NOINTERACTION
	+NOGRAVITY
	+FORCERADIUSDMG
	Renderstyle Add
	Alpha 0.99
	Scale 0.05
	DamageType IncreasedRange //So people won't obliterate themselves while using it.
	//I can't figure for life how the pointers are set up (if they are at all)
	//in this thing. And it works like a good DM nerf, anyway.
	States
	{
	Spawn:
		NTCT A 0 NoDelay A_Explode((2*random(1,3)),24,0,0,24)
	Looplet:
		FRNG A 0 A_SpawnItemEx("Chrome_Fire",random(5,-5),random(5,-5),random(5,-5),frandom(0.3,0.2),frandom(0.3,0.2),frandom(0.3,0.2),frandom(0.0,360.0),SXF_CLIENTSIDE)
		FRNG A 0 A_SpawnItemEx("Chrome_Smoke",random(5,-5),random(5,-5),random(5,-5),frandom(0.1,0.2),frandom(0.1,0.2),frandom(0.1,0.2),frandom(0.0,360.0),SXF_CLIENTSIDE)
	Looplo:
		"####" "#" 0 A_SetScale(ScaleX+0.01,ScaleX)
		"####" "#" 1 Bright A_FadeOut(0.075)
		Loop
	}
}

Actor Chrome_Fire
{
	+NoInteraction
	+ForceXYBillboard
	Alpha 0.65
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD",
								 "SpriteE", "SpriteF", "SpriteG", "SpriteH")
		SpriteA:
			SNCF A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			SNCF B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			SNCF C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			SNCF D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		SpriteE:
			SNCF E 0 A_Jump(255, "FadeIn")
			Goto SpriteE
		SpriteF:
			SNCF F 0 A_Jump(255, "FadeIn")
			Goto SpriteF
		SpriteG:
			SNCF G 0 A_Jump(255, "FadeIn")
			Goto SpriteG
		SpriteH:
			SNCF H 0 A_Jump(255, "FadeIn")
			Goto SpriteH
		FadeIn:
			"####" "#" 0 Bright A_SetScale(FRandom(0.25, 0.2))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(190, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.035)
			"####" "#" 0 A_ScaleVelocity(FRandom(1.01, 1.03))
			"####" "#" 0 A_SetScale(ScaleX - FRandom(0.001, 0.003))
			"####" "#" 0 A_JumpIf(ScaleX <= 0.0,"NULL")
			Loop

	}
}

Actor Chrome_Smoke
{
	+NoInteraction
	+ForceXYBillboard
	Alpha 0.0
	RenderStyle Translucent
	States
	{
		Spawn:
		    TNT1 A 3
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
		SpriteA:
			DYMI A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			DYMI B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			DYMI C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			DYMI D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		FadeIn:
			"####" "#" 0 A_SetScale(FRandom(0.045, 0.055))
			Goto RealFadeIn
		RealFadeIn:
			"####" "#" 1 A_FadeIn(FRandom(0.01, 0.03))
			"####" "#" 0 A_JumpIf(Alpha >= 0.35, "Idle")
			Loop
		Idle:
			"####" "#" 5 A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 A_FadeOut(FRandom(0.01,0.02))
			"####" "#" 0 A_ScaleVelocity(0.96)
			"####" "#" 0 A_SetScale(ScaleX + FRandom(0.005, 0.002))
			Loop
	}
}
