Actor ZamasuAgilityRune : AgilityRune
{
  Inventory.PickupMessage "Agility Rune: High Speed and Insanity Rage"
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_NamedExecuteWithResult("TrueHardMode") == 1, "Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusNoFloat") == 0,2)
	TNT1 A 0 A_ChangeFlag(FLOATBOB,0)
	TNT1 A 0 A_PlaySound("ZamasuRune2/Idle",7,1.0,1)
    TNT1 A 0 A_SpawnItemEx("AgilityRuneLineSpawner")
	ZMRS AA 10 Bright A_SpawnItemEx("NemesisRuneFlameSpawner",0,0,-20)
    Goto Spawn+3
  Pickup:
	TNT1 A 0 A_JumpIfInventory("RuneArmorResetCooldown",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryRuneItem2",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryRuneItem",1,"Enhance")
    TNT1 A 0 A_JumpIfInventory("ZamasuAgilityRuneToken",1,"Nope")
	TNT1 A 0 A_PlaySound("ZamasuRune/Pickup",6)
    TNT1 A 0 A_GiveInventory("ZamasuAgilityRuneSpeed",1)
	TNT1 A 0 A_GiveInventory("ZamasuAgilityRuneRage",1)
	TNT1 A 0 A_GiveInventory("ZamasuAgilityRuneToken",1)
	TNT1 A 1 A_StopSound(7)
	Stop
	}
}

Actor ZamasuAgilityRuneRage : PowerDoubleFiringSpeed
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  Powerup.Duration 0x7FFFFFFF
}

Actor ZamasuAgilityRuneSpeed : PowerSpeed 
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  Powerup.Duration 0x7FFFFFFF
  Speed 1.7
}

Actor ZamasuAgilityRuneToken : LegendaryRuneItem { }
Actor ZamasuAgilityRuneUpgradeToken : GenericLegRuneToken { }

ACTOR AGPlayerSmokeSpawner : LegendaryRedParticleSpawner 
{
SCALE 0.01
States 
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	LMKE A 0 A_JumpIfInventory("AgilityRuneToken",1,"Smoking",AAPTR_TARGET)
	Stop
  Smoking:
	FRR1 A 0
	FRR1 AA 0 Bright A_SpawnItemEx("AgilityPlayerSmoke",random(12,-12),random(12,-12),random(-16,16),0,0,random(1,3),0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,0)
	FRR1 A 1
	Stop
	}
}

ACTOR AgilityPlayerSmoke : VitalityPlayerSmoke 
{
  RenderStyle Add
  States 
  {
  Spawn:
	FRR1 ABCDEFGHIJKL 2 Bright A_FadeOut
	Stop
	}	
}

ACTOR AgilityPlayerSmokeNoLight : AgilityPlayerSmoke {}

ACTOR NemesisRuneFlameSpawner : LegendarySphereFlameSpawner
{
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    TNT1 AAAAAA 0 A_SpawnItemEx("AgilityPlayerSmokeNoLight",random(20,-20),random(20,-20),random(20,40),0,0,random(2,6),0,128,0)
    TNT1 A 0
    Stop
	}
}

Actor RedPowerLineRune : RedPowerLine { +NOTIMEFREEZE Scale 0.8 }

Actor AgilityRuneLineSpawner : BluePowerLineSpawner
{
  +NOTIMEFREEZE
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	TNT1 AAAAAA 1 A_SpawnItemEx("RedPowerLineRune",random(-15,15),random(-15,15),random(28,44),0,0,random(1,4)) 
    Stop  
    }
}