Actor EnragedLegTimeFreezeSphere : CustomInventory 
{
//$Category Powerups/LCA
//$Sprite ETI1A0
//$Title "Enraged Legendary Time Freeze"
Inventory.PickupMessage "Enraged Legendary Time Freeze, master of time the world is yours!"
Inventory.PickupSound "legtime/pickup"
Inventory.UseSound "legtime/use"
Inventory.Icon "ETI1Z0"
Inventory.MaxAmount 1
+FLOATBOB
+INVBAR
+COUNTITEM
+NOTIMEFREEZE
States
{
Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_NamedExecuteWithResult("NexusNoFloat") == 0,2)
	TNT1 A 0 A_ChangeFlag(FLOATBOB,0)
	ETI1 ABCDEFGHIJKLMNOPQRS 10 Bright A_CustomMissile("ELegendaryDRuneFlameSpawner",-20,0,random(0,-360),2,random(0,360)) 
	Loop	
Use:
    TNT1 A 0 A_JumpIfInventory("TimeFreezeCheck",1,"Nope")
	TNT1 A 0 A_PlaySound("legtime/use")
	TNT1 A 0 A_GiveInventory("EnragedLegTimeFreezer")
	TNT1 A 0 A_GiveInventory("EnragedTimeFreezeSpeed")
	TNT1 A 0 A_GiveInventory("EnragedTimeFreezeProtection")
	TNT1 A 0 A_GiveInventory("TimeFreezeCheck")
	TNT1 A 0 A_SpawnItemEx("EnragedTimeFreezeSoundEffect")
	Stop  	
Nope:
    TNT1 A 1
    TNT1 A 0 A_Print("You are already using a Powerup of the same type.")
	Fail
}
}

Actor EnragedLegTimeFreezer : PowerupGiver
{
Inventory.MaxAmount 0
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
+NOTIMEFREEZE
Powerup.Duration -17
Powerup.Color RedMap
Powerup.Type "PowerTimeFreezer"
}

Actor EnragedTimeFreezeSpeed : PowerSpeed 
{
  PowerUp.Duration -17
  Speed 1.2
}

Actor EnragedTimeFreezeProtection : PowerProtection 
{
DamageFactor "Normal", 0.65
PowerUp.Duration -17
}

Actor EnragedTimeFreezeSoundEffect
{
+NOTIMEFREEZE
States
{ 	
Spawn:
	TNT1 A 0
	TNT1 A 45 A_PlaySound("timefreeze/effect1",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)  
	TNT1 A 300 A_PlaySound("timefreeze/effect2",CHAN_BODY|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE) 
	TNT1 A 1 A_StopSound(CHAN_BODY)  
	TNT1 A 1 A_PlaySound("timefreeze/effect3",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)  
	Stop	
}
}