//Inventory Items

//Keycards And Skullkeys

Actor BRSRedKeycard: CustomInventory Replaces RedCard
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/keycard_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up Red Security Keycard."
  Scale 0.9
  States
  {
  Spawn:
	RKEY ABCD 6 BRIGHT
    Loop
   PickUp:
     TNT1 A 0 A_GiveInventory("RedCard", 1)
    Stop
  }
}

Actor BRSBlueKeycard: CustomInventory Replaces BlueCard
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/keycard_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up Blue Security Keycard."
  Scale 0.9
  States
  {
  Spawn:
	BKEY ABCD 6 BRIGHT
    Loop
   PickUp:
     TNT1 A 0 A_GiveInventory("BlueCard", 1)
    Stop
  }
}

Actor BRSYellowKeycard: CustomInventory Replaces YellowCard
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/keycard_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up a Yellow Security Keycard."
  Scale 0.9
  States
  {
  Spawn:
	YKEY ABCD 6 BRIGHT
    Loop
  PickUp:
     TNT1 A 0 A_GiveInventory("YellowCard", 1)
    Stop
  }
}

ACTOR BRSRedSkullKey: CustomInventory Replaces RedSkull
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/skullkey_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up a Red Skull Artifact."
  Scale 0.9
  States
  {
  Spawn:
	RSKU ABCD 6 BRIGHT
    Loop
  PickUp:
     TNT1 A 0 A_GiveInventory("RedSkull", 1)
    Stop
  }
}

ACTOR BRSBlueSkullKey: CustomInventory Replaces BlueSkull
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/skullkey_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up a Blue Skull Artifact."
  Scale 0.9
  States
  {
  Spawn:
	BSKU ABCD 6 BRIGHT
    Loop
 PickUp:
	TNT1 A 0 A_GiveInventory("BlueSkull", 1)
    Stop
  }
}

ACTOR BRSYellowSkullKey: CustomInventory Replaces YellowSkull
{
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupSound "items/skullkey_pickup"
  Inventory.Icon ""
  Inventory.PickupMessage "Picked up a Yellow Skull Artifact."
  Scale 0.9
  States
  {
  Spawn:
	YSKU ABCD 6 BRIGHT
    Loop
  PickUp:
	TNT1 A 0 A_GiveInventory("YellowSkull", 1)
    Stop
  }
}

//All Map ---------------------------------------------------
ACTOR All_Map: AllMap Replaces AllMap
{
	Inventory.PickUpSound "items/allmap_pick"
	Inventory.PickupMessage "UAC-Computer Area Map!"
	Scale 0.9
	+FLOORCLIP
	+DONTGIB
	+COUNTITEM
	States
	{
	spawn:
	AMAP ABCDEFGH 3 bright
	loop
	}
}

//Invisibility Sphere ---------------------------------------------------

ACTOR Invisibility_Sphere: BlurSphere replaces BlurSphere
{
-COUNTITEM
+FLOATBOB
Inventory.PickupMessage "Invisibility Sphere!"
Inventory.pickupsound "items/blursphere_pick"
	States
	{
	Spawn:
		IVIS ABCD 3 bright
		Loop
	Pickup:
		TNT1 AAAAAAAAAAAAA 0
		Stop
	}
}

//Regen Sphere

Actor RegenerationSphere : PowerupGiver 
{
	Game Doom
	Inventory.PickupMessage "Regeneration Sphere!"
	Inventory.PickupSound "items/regensphere_pick"
	Inventory.Maxamount 0
	Powerup.Duration -60
	Powerup.Color "FF FF FF", 0.1
	Powerup.Type Regeneration
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	States
	{
	Spawn:
		REGN ABCD 4 Bright
		Loop
	}
}

//BlurSpawner

Actor BlurSphereRandom: RandomSpawner Replaces BlurSphere
{
	Dropitem "RegenerationSphere"
	Dropitem "Invisibility_Sphere"
}

//Invulnerability Sphere ----------------------------------

actor Invulnerability_Sphere: CustomInventory replaces InvulnerabilitySphere
{
Inventory.PickupMessage "Invulnerability Sphere!"
Inventory.PickupSound "items/invulnerability_pick"
+FLOATBOB
-FLOAT
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
+DONTGIB
states
	{
spawn:
	IVUL ABCD 3 bright
	loop
Pickup:
	TNT1 A 0 A_GiveInventory("Invulnerable", 1)
	Stop
	}
}

ACTOR Invulnerable: PowerupGiver	
{
	Game Doom
	SpawnID 133
	+COUNTITEM
	+FLOATBOB
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	+INVENTORY.BIGPOWERUP
	Inventory.MaxAmount 0
	Powerup.Type Invulnerable
	Powerup.Color White
}

//Night Vision--------------------------------------------------------


ACTOR Infrared_Vision: Infrared Replaces Infrared
{
	+FLOORCLIP
	+COUNTITEM
	+DONTGIB
	+Inventory.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
	Inventory.PickUpSound "items/lightvisor_pick"
	Powerup.Type LightAmp
	Inventory.PickUpMessage "UAC-Light Visor!"
	States
	{
	Spawn:
		NVIS ABCD 3 bright
		NVIS EEEE 3 bright
		Loop
	}
}

Actor HasInfrared : Inventory
{
inventory.maxamount 1
}

//======================================================================
//
// UAC-Hazard Environmental Suit
//
//======================================================================

ACTOR UACRadSuit: Radsuit replaces Radsuit
{
	Inventory.PickupMessage "UAC-Hazard Environmental Suit!"
	Inventory.PickupSound "Items/RadSuit"
	States
	{
	Spawn:
		SUIT A -1
		Loop
	}
}

//For Heretic

ACTOR PowerQuadDamage : PowerDamage
{
	Damagefactor "normal", 4
	Powerup.Duration -30
	Powerup.Color Purple 0.20
}