// Resistance

ACTOR ResistSphere : CustomInventory replaces Radsuit
{
  +FLOAT
  +FLOATBOB
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.FANCYPICKUPSOUND
  -INVENTORY.INVBAR
  Inventory.PickupSound "misc/impkup"
  Inventory.MaxAmount 0
  Inventory.PickupMessage "Resistance!"
  Inventory.PickupAnnouncerEntry "resistance"
  Inventory.RespawnTics 3150
  States
  {
  Spawn:
    BIOS A 28 Bright
	BIOS B 14 Bright
    Loop
  Pickup:
	TNT1 A 0 A_GiveInventory("PickupProtection")
	TNT1 A 0 A_Print("\n\n\n\n\nProjectile Resistance!\n\n\n\n90% resistance against projectiles!",4)
	TNT1 A 0 A_GiveInventory("ResistSphereIronFeet")
	TNT1 A 0 A_GiveInventory("ResistSphereProtection")
	Stop
  }
}

ACTOR ResistSphereIronFeet : PowerupGiver
{
  Inventory.MaxAmount 0
  Powerup.Type "IronFeet"
  Powerup.Duration -30
  Inventory.PickupMessage ""
  Inventory.PickupSound ""
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  -INVENTORY.INVBAR
}

ACTOR PowerResistance : PowerProtection
{
  DamageFactor "Nail", 0.1
  DamageFactor "Mace", 0.1
  DamageFactor "Plasma", 0.1
  DamageFactor "HitPlasma", 0.1
  DamageFactor "Pulse", 0.1
  DamageFactor "Blaster", 0.1
  DamageFactor "Rocket", 0.1
  DamageFactor "Grenade", 0.1
  DamageFactor "BFG", 0.1
  DamageFactor "BFGSpray", 0.01
  DamageFactor "BFG10k", 0.01
  DamageFactor "Hellstorm", 0.01
  DamageFactor "Reflection", 0.1
  Inventory.Icon "BIOSA1"
  +DONTRIP
}

ACTOR ResistSphereProtection : PowerupGiver
{
  Inventory.MaxAmount 1
  Powerup.Type "Resistance"
  Powerup.Colormap 0.0,1.0,0.0
  Powerup.Duration -30
  Inventory.PickupMessage ""
  Inventory.PickupSound ""
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  -INVENTORY.INVBAR
}


ACTOR ResistSphere2 : ResistSphere
{
  Inventory.RespawnTics 3150
  States
  {
  Spawn:
    BIO2 A 28 Bright
	BIO2 B 14 Bright
    Loop
  Pickup:
	TNT1 A 0 A_GiveInventory("PickupProtection")
	TNT1 A 0 A_Print("\n\n\n\n\nHitscan Resistance!\n\n\n\n90% resistance against hitscan!",4)
	TNT1 A 0 A_GiveInventory("ResistSphereIronFeet")
	TNT1 A 0 A_GiveInventory("ResistSphere2Protection")
	Stop
  }
}


ACTOR PowerResistance2 : PowerProtection
{
  DamageFactor "Bullet", 0.1
  DamageFactor "Punch", 0.1
  DamageFactor "Saw", 0.1
  DamageFactor "Railgun", 0.1
  DamageFactor "BFGSpray", 0.01
  DamageFactor "BFG10k", 0.01
  DamageFactor "Reflection", 0.1
  Inventory.Icon "BIO2A1"
}

ACTOR ResistSphere2Protection : PowerupGiver
{
  Inventory.MaxAmount 1
  Powerup.Type "Resistance2"
  Powerup.Colormap 0.0,1.0,1.3
  Powerup.Duration -30
  Inventory.PickupMessage ""
  Inventory.PickupSound ""
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  -INVENTORY.INVBAR
}