ACTOR SFortInvulnerabilitySphere : PowerupGiver replaces InvulnerabilitySphere
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.BIGPOWERUP
  Inventory.MaxAmount 0
  Inventory.RespawnTics 2100
  Powerup.Type "SFortInvulnerable"
  Powerup.Color InverseMap
  Inventory.PickupMessage "$GOTINVUL" // "Invulnerability!"
  Inventory.PickupAnnouncerEntry "invulnerability"
  States
  {
  Spawn:
    PINV ABCD 6 Bright
    Loop
  }
}

/* The Invulnerability sphere will need a new powerup type inherited from
   PowerInvulnerable, since the respawn invulnerability uses PowerInvulnerable
   and is removed by weapon fire and the mod's ACS Enter and Respawn scripts */

ACTOR PowerSFortInvulnerable : PowerInvulnerable {}

ACTOR SFortMegasphere : Megasphere replaces Megasphere
{
	Inventory.PickupMessage "Megasphere! 200 HP + Red Armor!"
	Inventory.PickupAnnouncerEntry "megasphere"
	Inventory.RespawnTics 2100
	States
	{
    Pickup:
      TNT1 A 0 A_GiveInventory("SFortRedArmor", 1)
      TNT1 A 0 A_GiveInventory("MegasphereHealth", 1)
      Stop
	}
}

ACTOR SFortSoulsphere : Soulsphere replaces Soulsphere
{
	Inventory.Amount 200
	Inventory.MaxAmount 300
	Inventory.RespawnTics 2100
	Inventory.PickupMessage "Soulsphere! 200 HP!"
	Inventory.PickupAnnouncerEntry "soulsphere"
	Inventory.PickupSound "misc/soul_pkup"
}

ACTOR SFortDoomSphere : CustomInventory replaces DoomSphere
{
	Inventory.PickupMessage "Doomsphere! 4x damage!"
	Inventory.PickupSound "misc/quad_pkup"
	Inventory.PickupAnnouncerEntry "doomsphere"
	Inventory.RespawnTics 2100
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	States
	{
	Spawn:
	  DOOM A 10 Bright
	  DOOM B 15 Bright
	  DOOM C 8 Bright
	  DOOM D 6 Bright
	  Loop
	Pickup:
	  //TNT1 A 0 ACS_NamedTerminate("DoomSphereCounter",0)
	  TNT1 A 0 A_GiveInventory("SFortDoomSphere2",1)
	  TNT1 A 0 ACS_NamedExecute("DoomSphereCounter",0)
	  Stop
	}
}

ACTOR SFortDoomSphere2 : DoomSphere {}


ACTOR SFortGuardSphere : CustomInventory replaces GuardSphere
{
	Inventory.PickupMessage "Guardsphere! 75% damage resistance!"
	Inventory.PickupSound "misc/guard_pkup"
	Inventory.PickupAnnouncerEntry "guardsphere"
	Inventory.RespawnTics 2100
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	States
	{
	Spawn:
	  GARD ABCD 6 Bright
	  Loop
	Pickup:
	  //TNT1 A 0 ACS_NamedTerminate("GuardSphereCounter",0)
	  TNT1 A 0 A_GiveInventory("SFortGuardSphere2",1)
	  TNT1 A 0 ACS_NamedExecute("GuardSphereCounter",0)
	  Stop
	}
}

ACTOR SFortGuardSphere2 : GuardSphere {}

ACTOR SFortBlurSphere : CustomInventory replaces BlurSphere
{
	Inventory.PickupMessage "Partial Invisibility!"
	Inventory.PickupSound "misc/invis_pkup"
	Inventory.PickupAnnouncerEntry "partialinvisibility"
	Inventory.RespawnTics 2100
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	States
	{
	Spawn:
	  SINV ABCD 6 Bright
	  Loop
	Pickup:
	  //TNT1 A 0 ACS_NamedTerminate("InvisibilitySphereCounter",0)
	  TNT1 A 0 A_GiveInventory("SFortBlurSphere2",1)
	  TNT1 A 0 ACS_NamedExecute("InvisibilitySphereCounter",0)
	  Stop
	}
}

ACTOR SFortBlurSphere2 : BlurSphere {}

ACTOR SFortInvisibilitySphere : CustomInventory replaces InvisibilitySphere
{
	Inventory.PickupMessage "Invisibility!"
	Inventory.PickupSound "misc/invis_pkup"
	Inventory.PickupAnnouncerEntry "invisibility"
	Inventory.RespawnTics 2100
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	States
	{
	Spawn:
	  SINV ABCD 6 Bright
	  Loop
	Pickup:
	  //TNT1 A 0 ACS_NamedTerminate("InvisibilitySphereCounter",0)
	  TNT1 A 0 A_GiveInventory("SFortInvisibilitySphere2",1)
	  TNT1 A 0 ACS_NamedExecute("InvisibilitySphereCounter",0)
	  Stop
	}
}

ACTOR SFortInvisibilitySphere2 : InvisibilitySphere {}

ACTOR PowerArmorRegen : Powerup
{
	Powerup.Duration -30
}