// Guardsphere

ACTOR PowerIDMQuarterDamage : PowerProtection
{
  DamageFactor "Normal", 0.25
  Inventory.Icon "GARDA1"
  +DONTRIP
}

ACTOR GuardsphereProtection : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	Inventory.MaxAmount 0
	Powerup.Type "IDMQuarterDamage"
	Powerup.Duration -30
	Powerup.Color GreenMap
}

ACTOR IDMGuardSphere : CustomInventory
{
    +FLOAT
    +FLOATBOB
	+COUNTITEM
	+NOGRAVITY
	-INVENTORY.INVBAR
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickupMessage "Guardsphere!"
    Inventory.PickupSound "misc/impkup"
	Inventory.PickupAnnouncerEntry "guardsphere"
	Inventory.RespawnTics 3150
	States
	{
	Spawn:
		GARD ABCD 6 Bright
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("PickupProtection")
		TNT1 A 0 A_Print("\n\n\n\n\nGuardsphere!\n\n\n\n75% damage resistance!")
		TNT1 A 0 A_GiveInventory("GuardSphereProtection")
		Stop
	}
}