/*
CREDITS:
Pickup - Captain Toenail
Sounds - ID (Quake 1)
*/

actor RadsuitSpawner : RandomSpawner replaces RadSuit
{
    DropItem "EnvirospherePickup" 255 2
    DropItem "BattlespherePickup" 255 1
}

actor EnvirospherePickup : CustomInventory
{
  Tag "Envirosphere"
  Inventory.PickupMessage "Envirosphere! (Ironfeet plus immunity to common demon projectiles.)"
  Inventory.Amount 1
  Renderstyle Add
  Inventory.PickupSound "items/enviro"
  +INVENTORY.FANCYPICKUPSOUND
  +INVBAR
  +FLOATBOB
  +INFLOAT
  states
  {
  Pickup:
   TNT1 A 0 A_JumpIfInventory("Envirosphere",1,"Auto")
   Goto Gimme
  Gimme:
   TNT1 A 0 A_GiveInventory("Envirosphere")
   Stop
  Auto:
   TNT1 A 0 A_GiveInventory("EnvirospherePower")
   Stop
  Spawn:
    BIOS A 1 Bright
    loop
  }
}


actor Envirosphere : CustomInventory
{
  Inventory.PickupMessage "Envirosphere! (Ironfeet plus immunity to common demon projectiles.)"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Inventory.UseSound "used/enviro"
  Inventory.Icon ARTIENVI
  Renderstyle Add
  +INVENTORY.FANCYPICKUPSOUND
  +INVBAR
  +FLOATBOB
  +INFLOAT
  states
  {
  Use:
   TNT1 A 0 A_GiveInventory("EnvirospherePower")
   stop
  Spawn:
    BIOS A 1 Bright
    loop
  }
}

actor EnvirospherePower : CustomInventory
{
  Inventory.PickupMessage "Envirosphere! (Ironfeet plus immunity to common demon projectiles.)"
  Inventory.Amount 1
  Inventory.PickupSound ""
  Renderstyle Add
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.FANCYPICKUPSOUND
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.HUBPOWER
  +FLOATBOB
  +INFLOAT
  +FLOAT
  states
  {
  Use:
   TNT1 A 0 A_GiveInventory("EnviroProtect")
   TNT1 A 0 A_GiveInventory("EnviroIronFeet")
   stop
  Spawn:
    BIOS A 1 Bright
    loop
  }
}

actor PowerEnviroDamage : PowerProtection
{ 
   DamageFactor "DemonProjectile", 0.00
   inventory.icon "TNT1A0" 
} 

actor EnviroProtect : PowerupGiver
{ 
powerup.color None 0.00
powerup.type EnviroDamage
powerup.duration -90
+INVENTORY.AUTOACTIVATE
+INVENTORY.FANCYPICKUPSOUND
+INVENTORY.ALWAYSPICKUP
states 
 { 
 Spawn: 
   TNT1 A 1 bright 
   loop 
 } 
}

ACTOR EnviroIronFeet : PowerupGiver
{
powerup.duration -90
Powerup.Color Green 0.1
Powerup.Type "IronFeet"
+INVENTORY.AUTOACTIVATE
+INVENTORY.FANCYPICKUPSOUND
+INVENTORY.ALWAYSPICKUP
}

actor SludgeBall : BaronBall Replaces BaronBall
{
 DamageType "DemonProjectile"
}

actor TomatoBall : CacodemonBall replaces CacodemonBall
{
 DamageType "DemonProjectile"
}

actor GreaseShot : FatShot replaces FatShot
{
 DamageType "DemonProjectile"
}

actor RevenantFuckingProjectileHowIHateThisShitOmfg : RevenantTracer replaces RevenantTracer
{
 DamageType "DemonProjectile"
}

actor PimpBall : DoomImpBall replaces DoomImpBall
{
 DamageType "DemonProjectile"
}




actor BattlespherePickup : CustomInventory
{
  Tag "Battlesphere"
  Inventory.PickupMessage "Battlesphere! (Superweapon damage immunity.)"
  Inventory.Amount 1
  Renderstyle Add
  Inventory.PickupSound "items/battle"
  +INVENTORY.FANCYPICKUPSOUND
  +INVBAR
  +FLOATBOB
  +INFLOAT
  states
  {
  Pickup:
   TNT1 A 0 A_JumpIfInventory("Battlesphere",1,"Auto")
   Goto Gimme
  Gimme:
   TNT1 A 0 A_GiveInventory("Battlesphere")
   Stop
  Auto:
   TNT1 A 0 A_GiveInventory("BattlespherePower")
   Stop
  Spawn:
    NUKS A 1 Bright
    loop
  }
}

actor Battlesphere : CustomInventory
{
  Inventory.PickupMessage "Battlesphere! (Superweapon damage immunity.)"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Inventory.UseSound "used/battle"
  Inventory.Icon ARTIBATL
  Renderstyle Add
  +INVENTORY.FANCYPICKUPSOUND
  +INVBAR
  +FLOATBOB
  +INFLOAT
  states
  {
  Use:
   TNT1 A 0 A_GiveInventory("BattlespherePower")
   stop
  Spawn:
    NUKS A 1 Bright
    loop
  }
}

actor BattlespherePower : CustomInventory
{
  Inventory.PickupMessage "Battlesphere! (Superweapon damage immunity.)"
  Inventory.Amount 1
  Inventory.PickupSound ""
  Renderstyle Add
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.FANCYPICKUPSOUND
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.HUBPOWER
  +FLOATBOB
  +INFLOAT
  +FLOAT
  states
  {
  Use:
   TNT1 A 0 A_GiveInventory("BattleProtect")
   stop
  Spawn:
    NUKS A 1 Bright
    loop
  }
}

actor PowerBattleDamage : PowerProtection
{ 
   DamageFactor "Superweapon", 0.00
   inventory.icon "TNT1A0" 
} 

actor BattleProtect : PowerupGiver
{ 
powerup.color Yellow 0.1
powerup.type BattleDamage
powerup.duration -90
+INVENTORY.AUTOACTIVATE
+INVENTORY.FANCYPICKUPSOUND
+INVENTORY.ALWAYSPICKUP
states 
 { 
 Spawn: 
   TNT1 A 1 bright
   loop 
 } 
}
