//=================================================================================================
//
// Turbosphere
//
//=================================================================================================

// [BB] This shows a HUD icon while the Turbosphere is active.
class PowerTurbo : PowerSpeed
{
	Default
	{
		Inventory.Icon "ARTITU1";
	}
}

class Turbosphere : PowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerTurbo";
		Powerup.Duration 1050;
		Inventory.PickupMessage "$PICKUP_TURBOSPHERE";
		Inventory.PickupAnnouncerEntry "turbosphere";
	}
	States
	{
	Spawn:
		TURB ABCD 3 Bright;
		Loop;
	}
}

//=================================================================================================
//
// Time freeze sphere
//
//=================================================================================================

class TimeFreezeSphere : PowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerTimeFreezer";
		Powerup.Color "GoldMap";
		Inventory.PickupMessage "$PICKUP_TIMEFREEZER";
		Inventory.PickupAnnouncerEntry "timefreeze";
	}
	States
	{
	Spawn:
		TIME ABCD 6 Bright;
		Loop;
	}
}

//=================================================================================================
//
// Skulltag's invisibility sphere. It's a little different in that it alters your alpha.
//
//=================================================================================================

class InvisibilitySphere : PowerupGiver 
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+VISIBILITYPULSE
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerTranslucency";
		RenderStyle "Translucent";
		Inventory.PickupMessage "$PICKUP_INVISIBILITY";
		Inventory.PickupAnnouncerEntry "invisibility";
	}
	States
	{
	Spawn:
		SINV ABCD 6 Bright;
		Loop;
	}
}	

//=================================================================================================
//
// Doomsphere
//
//=================================================================================================

class PowerQuadDamage : PowerDamage
{
	Default
	{
		Damagefactor "normal", 4;
	}
}

class Doomsphere : PowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerQuadDamage";
		Powerup.Color "RedMap";
		Inventory.PickupMessage "$PICKUP_DOOMSPHERE";
		Inventory.PickupAnnouncerEntry "doomsphere";
	}
	States
	{
	Spawn:
		DOOM A 10 Bright;
		DOOM B 15 Bright;
		DOOM C 8 Bright;
		DOOM D 6 Bright;
		Loop;
	}
}

//=================================================================================================
//
// Guardsphere
//
//=================================================================================================

class PowerQuarterDamage: PowerProtection
{
	Default
	{
		Damagefactor "normal", 0.25;
	}
}

class Guardsphere : PowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerQuarterDamage";
		Powerup.Color "GreenMap";
		Inventory.PickupMessage "$PICKUP_GUARDSPHERE";
		Inventory.PickupAnnouncerEntry "guardsphere";
	}
	States
	{
	Spawn:
		GARD ABCD 6 Bright;
		Loop;
	}
}

//=================================================================================================
//
// PowerTerminatorArtifact
//
//=================================================================================================

class PowerTerminatorArtifact : Powerup native
{
	Default
	{
		Powerup.Duration 0;
	}
}

//=================================================================================================
//
// [BB] ReturningPowerupGiver - Handles auto return of Terminator and PossessionStone
//
//=================================================================================================

class ReturningPowerupGiver : PowerupGiver native
{
}

//=================================================================================================
//
// Terminator
//
//=================================================================================================

class Terminator : ReturningPowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerTerminatorArtifact";
		Inventory.PickupMessage "$PICKUP_TERMINATOR";
		Inventory.PickupAnnouncerEntry "terminator";
	}
	States
	{
	Spawn:
		ARNO ABCD 6 Bright;
		Loop;
	}
}

//=================================================================================================
//
// PowerPossessionArtifact 
//
//=================================================================================================

class PowerPossessionArtifact : Powerup native
{
	Default
	{
		Powerup.Duration 0;
	}
}

//=================================================================================================
//
// Possession stone
//
//=================================================================================================

class PossessionStone : ReturningPowerupGiver
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerPossessionArtifact";
		Inventory.PickupMessage "$PICKUP_POSSESSIONSTONE";
	}
	States
	{
	Spawn:
		PPOS ABCDEF 6 Bright;
		Loop;
	}
}


//=================================================================================================
//
// RandomPowerup
//
//=================================================================================================

class RandomPowerup : Inventory  native
{
	Default
	{
		+COUNTITEM
		+NOGRAVITY
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
	}

	action native void A_RandomPowerupFrame ();

	States
	{
	Spawn:
		MEGA A 6 Bright A_RandomPowerupFrame;
		SOUL A 6 Bright A_RandomPowerupFrame;
		GARD A 6 Bright A_RandomPowerupFrame;
		PINS A 6 Bright A_RandomPowerupFrame;
		TIME A 6 Bright A_RandomPowerupFrame;
		SINV A 6 Bright A_RandomPowerupFrame;
		DOOM A 6 Bright A_RandomPowerupFrame;
		TURB A 6 Bright A_RandomPowerupFrame;
		Loop;
	}
}
