Actor NexusNemesisRune : CustomInventory
{
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "NMRZA0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "Nemesis Rune: Your nemesis weapons have faster fire rate and projectile speed"
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("nemesisrune/sex",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	NMRZ ABC 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	NMRZ DED 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	NMRZ CBA 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"Nope")
	TNT1 A 0 A_PlaySound("nemesisrune/consoom",6)
	TNT1 A 0 A_GiveInventory("NemesisRuneToken")
	TNT1 A 1 A_StopSound(7)
	Stop
  Nope:
	BLRN A 1
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

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

ACTOR NemesisRuneFlame : LegendaryRuneFlame
{
  States
  {
  Spawn:
	2HDT ABCDEFGHIJKL 2 Bright A_FadeOut
	Stop
	}
}

Actor NemesisRuneToken : LegendaryRuneItem { }

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


ACTOR NemPlayerSmokeSpawner : LegendaryRedParticleSpawner //Uh oh stinky
{
Scale 0.01
States 
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
	LMKE A 0 A_JumpIfInventory("NemesisRuneToken",1,"Smoking",AAPTR_TARGET)
	Stop
  Smoking:
	FIG1 A 0
	FIG1 AA 0 Bright A_SpawnItemEx("NemPlayerSmoke",random(12,-12),random(12,-12),random(-16,16),0,0,random(1,3),0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,0)
	FIG1 A 1
	Stop
	}
}

ACTOR NemPlayerSmoke : LPlayerSmoke
{
  +NOTIMEFREEZE
  +NOINTERACTION
  +CLIENTSIDEONLY
  Renderstyle Subtract
  Alpha 0.5
  Scale 0.7
  var int user_delay;
  States 
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Null")
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_SetScale(-1.0,1.0)
	TNT1 A 0 A_SetUserVar(user_delay,random(2,3))
	NRMF ABCDEFG 1 Bright A_SetTics(user_delay)
	Stop
	}	
}

ACTOR NemesisRuneSpawnerTier1 : RandomSpawner
{
DropItem "LegendaryRune2", 256, 55
DropItem "VitalityRune", 256, 55
DropItem "AgilityRune", 256, 55
DropItem "LegendaryRandomSphere", 256, 20
DropItem "NexusNemesisRune", 256, 10
}

ACTOR NemesisRuneSpawnerTier2 : RandomSpawner
{
DropItem "LegendaryRune2", 256, 55
DropItem "VitalityRune", 256, 55
DropItem "AgilityRune", 256, 55
DropItem "LegendaryRandomSphere", 256, 20
DropItem "NexusNemesisRune", 256, 17
}

ACTOR NemesisRuneSpawnerTier3 : RandomSpawner
{
DropItem "LegendaryRune2", 256, 55
DropItem "VitalityRune", 256, 55
DropItem "AgilityRune", 256, 55
DropItem "NexusNemesisRune", 256, 25
DropItem "LegendaryRandomSphere", 256, 20
}

ACTOR NemesisRuneSpawnerTier4 : RandomSpawner
{
DropItem "LegendaryRune2", 256, 55
DropItem "VitalityRune", 256, 55
DropItem "AgilityRune", 256, 55
DropItem "NexusNemesisRune", 256, 40
DropItem "LegendaryRandomSphere", 256, 20
}