// Rage

ACTOR RageSphereSpawnActor : CustomInventory 10073
{
	Tag "Rage Sphere"
	//$Category Powerups
	//$Sprite BLDSA0
	+NOBLOCKMAP
	+NOGRAVITY
	States
	{
	Spawn:
	  TNT1 A 0
	  TNT1 A 1 A_JumpIf(CallACS("BladeModeSpawn") == 666,"Nothing")
	  TNT1 A 1 A_SpawnItemEx("RageSphereSpawner")
	Nothing:
	  TNT1 A 1
	  TNT1 A -1
	  Stop
	}
}

ACTOR RageSphereSpawner : RandomSpawner
{
	DropItem "RageSphere"
}

ACTOR RageSphere : CustomInventory
{
  +FLOAT
  +FLOATBOB
  +COUNTITEM
  +NOGRAVITY
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  -INVENTORY.INVBAR
  Inventory.PickupSound "misc/impkup"
  Inventory.PickupMessage "RAGE!"
  Inventory.PickupAnnouncerEntry "rage"
  Inventory.RespawnTics 3150
  Tag "Rage Sphere"
  States
  {
  Spawn:
    BLDS ABCD 6 Bright
    Loop
  Pickup:
	TNT1 A 0 A_TakeInventory("PowerPickupProtection")
	TNT1 A 0 A_GiveInventory("RageSphereInvulnerable")
	TNT1 A 0 A_GiveInventory("RageSphereIcon")
	TNT1 A 0 A_Print("\n\nRAGE!!")
	TNT1 A 0 A_Jump(8,"Major")
	TNT1 A 0 A_Jump(64,"Medium1","Medium2","Medium3","Medium4","Medium5","Medium6","Medium7","Medium8","Medium9","Medium10","Medium11","Medium12","Medium13","Medium14","Medium15","Medium16","Medium17","Medium18","Medium19","Medium20","Medium21","Medium22","Medium23","Medium24","Medium25","Medium26","Medium27","Medium28")
	TNT1 A 0 A_Jump(256, "Minor1", "Minor2", "Minor3", "Minor4", "Minor5")
	Stop
  Minor1:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	Stop
  Minor2:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	Stop
  Minor3:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	Stop
  Minor4:
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	Stop
  Minor5:
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	Stop
  Minor6:
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Minor7:
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Minor8:
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium1:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	Stop
  Medium2:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	Stop
  Medium3:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	Stop
  Medium4:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	Stop
  Medium5:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	Stop
  Medium6:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	Stop
  Medium7:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	Stop
  Medium8:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	Stop
  Medium9:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	Stop
  Medium10:
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	Stop
  Medium11:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Medium12:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium13:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium14:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Medium15:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium16:
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium17:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Medium18:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium19:
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium20:
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Medium21:
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium22:
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium23:
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	Stop
  Medium24:
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium25:
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium26:
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	Stop
  Medium27:
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Medium28:
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  Major:
	TNT1 A 0 A_GiveInventory("RageSphereDoubleFire")
	TNT1 A 0 A_GiveInventory("RageSphereSpeed")
	TNT1 A 0 A_GiveInventory("RageSphereRegeneration")
	TNT1 A 0 A_GiveInventory("RageSphereStrength")
	TNT1 A 0 A_GiveInventory("RageSphereQuadDamage")
	TNT1 A 0 A_GiveInventory("DoomSphereShortIcon")
	TNT1 A 0 A_GiveInventory("RageSphereInfiniteAmmo")
	TNT1 A 0 A_GiveInventory("RageSphereSpread")
	TNT1 A 0 A_GiveInventory("RageSphereDrain")
	TNT1 A 0 A_GiveInventory("RageSphereTurbo")
	Stop
  }
}

ACTOR RageSphereIcon : Powerup
{
	Inventory.Icon "RAGESP1"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereReflection : PowerupGiver
{
	Powerup.Type "Reflection"
	Inventory.MaxAmount 0
	Powerup.Duration -10
	Inventory.PickupMessage ""
	Inventory.PickupSound ""
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereQuadDamage : PowerupGiver
{
	Powerup.Type "QuadDamage"
	Inventory.MaxAmount 0
	Powerup.Duration -10
	Inventory.PickupMessage ""
	Inventory.PickupSound ""
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR PowerRageInvulnerable : PowerInvulnerable
{
	Inventory.Icon "INVULN1"
}

ACTOR RageSphereInvulnerable : PowerupGiver
{
	Powerup.Type "RageInvulnerable"
	Powerup.Duration -10
	Powerup.ColorMap 1.5,0.75,0.0
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	+INVENTORY.ADDITIVETIME
}

ACTOR RageSphereDoubleFire : PowerupGiver
{
	Powerup.Type "PowerDoubleFiringSpeed"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereSpeed : PowerupGiver
{
	Powerup.Type "IDMSpeed"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereHighJump : PowerupGiver
{
	Powerup.Type "PowerHighJump"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereRegeneration : PowerupGiver
{
	Powerup.Type "IDMRegeneration"
	Powerup.Strength 25
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereStrength : PowerupGiver
{
	Powerup.Type "IDMWeaponLevel2"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereInfiniteAmmo : PowerupGiver
{
	Powerup.Duration -10
	Powerup.Type "IDMInfiniteAmmo"
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereSpread : PowerupGiver
{
	Powerup.Duration -10
	Powerup.Type "IDMSpread"
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereDrain : PowerupGiver
{
	Powerup.Duration -10
	Powerup.Type "IDMDrain"
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}

ACTOR RageSphereTurbo : PowerupGiver
{
	Powerup.Duration -10
	Powerup.Type "IDMTurbo"
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
}