Actor TerminatorItemIt : TerminatorItem replaces TerminatorItem
{
Mass 1
Gravity 1.0
+COUNTITEM
-FLOAT
+DONTGIB
+FLOATBOB
-NOGRAVITY
+NOTIMEFREEZE
+FORCEXYBILLBOARD
+INVENTORY.BIGPOWERUP
+INVENTORY.AUTOACTIVATE
Inventory.MaxAmount 0
Inventory.PickupSound "misc/p_pkup"
Inventory.PickupMessage "Terminator!"
Tag "Terminator Artifact"
States
  {
  Spawn:
    TNT1 A 0 A_CustomMissile ("OrangeSparkleSpawner", 0, 0, random(0,-360), 2, random(0,360)) 
    ARNO AABB 1 Bright A_SpawnItem("RedSphereFlare",0,38)
    TNT1 A 0 A_CustomMissile ("OrangeSparkleSpawner", 0, 0, random(0,-360), 2, random(0,360))
    ARNO CCDD 1 Bright A_SpawnItem("RedSphereFlare",0,38)
	Loop
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TerminatorDamage2",1,"NoUpgrade")
	TNT1 A 0 A_JumpIfInventory("TerminatorDamage",1,"Upgrade")
	TNT1 A 0 Healthing(999,1333)
	TNT1 A 0 A_Print("Pick up another Terminator Sphere to upgrade it!")
	TNT1 A 0 A_GiveInventory("TerminatorCheck",1)
	TNT1 A 1 A_GiveInventory("TerminatorDamage",1)
	TNT1 A 0 A_JumpIfInventory("TerminatorHealthToken",1,"PickupNoHealth")
	TNT1 A 1 A_GiveInventory("HellfireUltraSphereQuiet",1)
	TNT1 A 0 A_GiveInventory("TerminatorHealthToken",1)
	Stop
  PickupNoHealth:
    TNT1 A 1
	Stop
  Upgrade:
	TNT1 A 0
	TNT1 A 0 Healthing(1333,1666)
	TNT1 A 0 A_Print("The Terminator Sphere has been upgraded! So Much Power will attract Unimaginably Powerful Creatures!")
	TNT1 A 0 A_TakeInventory("TerminatorCheck",1)
	TNT1 A 0 A_GiveInventory("TerminatorCheck2",1)
	TNT1 A 0 A_TakeInventory("TerminatorDamage",1)
	TNT1 A 1 A_GiveInventory("TerminatorDamage2",1)
	Stop
  NoUpgrade:
	TNT1 A 1
	Fail
  }
}