Actor LegTimeFreezeSphere : CustomInventory 16705
{
//$Category Powerups/LCA
//$Sprite TTIMA0
//$Title "Legendary Time Freeze"
+FLOATBOB
+COUNTITEM
+NOTIMEFREEZE
+INVENTORY.INVBAR
Inventory.MaxAmount 1
Inventory.Icon "INVLB0"
Inventory.UseSound "legtime/use"
Inventory.PickupSound "legtime/pickup"
Inventory.PickupMessage "Legendary Time Freeze, master of time the world is yours!"
States
	{
	Spawn:
		TTIM ABCDE 10 Bright A_CustomMissile("LegendarySphereFlameSpawner",-20,0,random(0,-360),2,random(0,360)) 
		Loop	
	Use:
		TNT1 A 0
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SCR_IS_TIMEFREEZE_ALLOWED", 0, 0) == 1, "TooSoon")
		TNT1 A 0 A_PlaySound("legtime/use")
		TNT1 A 0 A_GiveInventory("LegTimeFreezer")
		TNT1 A 0 A_SpawnItemEx("TimeFreezeSoundEffect")
		TNT1 A 1 ACS_NamedExecute("SCR_TIMEFREEZE", 0, 11)
		Stop  	
	TooSoon:
		TNT1 A 1 ACS_NamedExecute("SCR_TIMEFREEZE_TOOSOON", 0, 0)
		Fail
	}
}

Actor LegTimeFreezer : PowerupGiver
{
+NOTIMEFREEZE
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
Inventory.MaxAmount 0
Powerup.Type "PowerTimeFreezer"
Powerup.Duration -11
Powerup.Color GoldMap
}

Actor TimeFreezeSoundEffect
{
+NOTIMEFREEZE
States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 45 A_PlaySound("timefreeze/effect1",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)  
		TNT1 A 245 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	
	}
}