Actor NemesisTimeFreezeSphere : CustomInventory
{
//$Category Powerups/LCA
//$Sprite NTI1A0
//$Title "Nemesis Time Freeze"
Inventory.PickupMessage "Nemesis Time Freeze, master of time the Galaxy is yours!"
Inventory.PickupSound "legtime/pickup"
Inventory.UseSound "legtime/use"
Inventory.Icon "NTI1Z0"
Inventory.MaxAmount 1
Tag "Nemesis Time Freeze Sphere"
+FLOATBOB
+INVBAR
+COUNTITEM
+NOTIMEFREEZE
States
{
Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_NamedExecuteWithResult("NexusNoFloat") == 0,2)
	TNT1 A 0 A_ChangeFlag(FLOATBOB,0)
	NTI1 ABCDEFGHIJKLMNOPQRS 10 Bright A_CustomMissile("NemesisHellionSmokeSpawner",-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("NemesisTimeFreezer")
	TNT1 A 0 A_GiveInventory("NemesisTimeFreezeSpeed")
	TNT1 A 0 A_GiveInventory("NemesisTimeFreezeProtection")
	TNT1 A 0 A_GiveInventory("TimeFreezeCheck")
	TNT1 A 0 A_SpawnItemEx("NemesisTimeFreezeSoundEffect")
	Stop  	
Nope:
    TNT1 A 1
    TNT1 A 0 A_Print("You are already using a Powerup of the same type.")
	Fail
}
}

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

Actor NemesisTimeFreezeSpeed : PowerSpeed 
{
  PowerUp.Duration -17
  Speed 1.35
}

Actor NemesisTimeFreezeProtection : PowerProtection 
{
DamageFactor "Normal", 0.5
PowerUp.Duration -17
}

ACTOR TimeFreezeCheck : PowerDamage
{
  DamageFactor "Normal", 1
  PowerUp.Duration -17
}

Actor NemesisTimeFreezeSoundEffect
{
+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	
}
}