Actor NexusRegenMsgCooldown : Inventory
{
 States
 {
  Held:
	TNT1 A 140
	Stop
 }
}

Actor NemesisPowerShard : CustomInventory  
{
  Inventory.PickupMessage "Nemesis Power Shard, can you feel the power of the dark?"
  Inventory.PickupSound "legendarycrystal/take"
  Inventory.UseSound "legendary/defense"
  Inventory.Icon "NPOWZ0"
  +DONTGIB
  +INVBAR
  +INVENTORY.BIGPOWERUP
  +NOTIMEFREEZE
  +FLOAT
  Scale 0.75
  Tag "$NENemShard"
  States
  {
  Spawn:
	NPOW A 0 NoDelay ACS_NamedExecuteAlways("SpawnEffectsOnItem",0,28)
  SpawnLoop:
	NPOW ABCDEF 4 Bright 
	Loop
  Use:
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("ItemChecks") == 1,"Nope")
	TNT1 A 0 A_RailWait
	TNT1 A 1 A_GiveInventory("NemesisCrystalCooldown",1)
	TNT1 A 0 ACS_NamedExecuteAlways("NexusRegen",0,0,450)
    Stop
  Nope:
	TNT1 A 0 ACS_NamedExecuteAlways("NexusRegenMessage")
	TNT1 A 1
	Fail
  }
}

Actor NemesisCrystalCooldown : PowerDamage { DamageFactor "notarealdamagetype", 1.0 Powerup.duration -30 }

Actor NLegCrystalSpeedGiver : PowerupGiver
{
 Inventory.MaxAmount 0
 Powerup.Color Black 0.15
 Powerup.Duration -60
 Powerup.Type Speed
 +INVENTORY.AUTOACTIVATE
 +INVENTORY.ALWAYSPICKUP
 States
 {
  Spawn:
	ROWL A 1 Bright
	Loop
 }
}

Actor NLegendaryCrystalProtectEffect : PowerProtection { DamageFActor "Normal",0.2 }

Actor NLegendaryCrystalProtect: PowerupGiver
{
 Inventory.MaxAmount 0
 Powerup.Type NLegendaryCrystalProtectEffect
 Powerup.Color Black 0.15
 Powerup.Duration -60
 +INVENTORY.AUTOACTIVATE
 +INVENTORY.ALWAYSPICKUP
 States
 {
  Spawn:
	ROWL A 1 Bright
	Loop
 }
}