//==================================
// BioCore
//==================================

ACTOR BioCore : CustomInventory 
{
Renderstyle Add
Inventory.Amount 1
Inventory.MaxAmount 1
Inventory.PickupSound "BioCore/Pickup"
Inventory.PickupMessage "Bio Core. Keep This Area Clear At All Times!"
Tag "Bio Core - Can hit everywhere / Automatically exploded by cracking self."
Inventory.Icon "BIOSB0"
+INVENTORY.BIGPOWERUP
+INVENTORY.UNDROPPABLE
+INVENTORY.INVBAR
+FLOATBOB
+COUNTITEM
+FLOORCLIP
+NOTIMEFREEZE
States
	{
Spawn:
	TNT1 A 0 A_PlaySound("BioCore/Idle",6,5.0,True)
	TNT1 A 0 A_CustomMissile ("GreenStar", 0, 0, random(0,-360), 2, random(0,360))
    BIOS AAAAAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
	TNT1 A 0 A_CustomMissile ("GHellionSmokeSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
	BIOS AAAAAAAAAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
    Loop
 Use:
	TNT1 A 1 A_SpawnItemEx("BioCoreActive",0,0,16,8,0,4,0)
	Stop
      }
}

Actor BioCoreActive
{
  Health 1000
  Radius 16
  Height 8
  Mass 0x7fffffff
  Renderstyle Add
  -SOLID
  +SHOOTABLE
  +NEVERRESPAWN
  +DONTGIB
  +CANBLAST
  +NOICEDEATH
  +NOBLOOD
  +PUSHABLE
  +MTHRUSPECIES
  DeathSound "UraniumCore/Death"
  PainSound "UraniumCore/Crack"
  Tag "\c[q6]Bio Core \cg(Time Bomb)\c-"
  States
  {
  Spawn:
	TNT1 A 0 A_PlaySound("BioCore/Idle3",CHAN_ITEM,1.0,True)
	TNT1 A 0 A_CustomMissile ("GreenStar", -20, 0, random(0,-360), 2, random(0,360)) 
    BIOS AAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
	TNT1 A 0 A_Jump(20,"CrackSound")
	TNT1 A 0 A_CustomMissile ("GreenStar", 0, 0, random(0,-360), 2, random(0,360))
	BIOS AAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
	TNT1 A 0 A_Jump(20,"CrackSound")
	TNT1 A 0 A_CustomMissile ("GreenStar", -20, 0, random(0,-360), 2, random(0,360)) 
	BIOS AAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
	TNT1 A 0 A_Jump(20,"CrackSound")
	TNT1 A 0 A_CustomMissile ("GreenStar", 0, 0, random(0,-360), 2, random(0,360))
	BIOS AAAAA 1 Bright A_SpawnItem("BioSphereFlare",0,38)
	TNT1 A 0 A_Jump(20,"CrackSound")
	TNT1 A 0 A_CustomMissile ("GreenStar", -20, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_Jump(20,"CrackSound")
    Loop
  CrackSound:
	TNT1 A 0 DamageThing(random(60,30))
	TNT1 A 0 A_PlaySound("UraniumCore/Crack",7)
	TNT1 A 1 A_Pain
	TNT1 AAAAA 0 A_CustomMissile ("GHellionSmokeSpawner", -20, 0, random(0,-360), 2, random(0,360))
	Goto Spawn
  Death: 
	TNT1 A 0
    TNT1 A 0 A_Scream
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
    TNT1 AAA 0 A_CustomMissile("BioCoreToxicBoom", 0, 0, random(0,360), 2, random(0,360))
    TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	TNT1 A 0 A_Explode
	TNT1 A 1 A_SpawnItemEx("GreenParticleSpawner",0,0,32)
    Stop
  }
}

Actor BioCoreToxicBoom
{
Projectile
Radius 1
Height 1
+NOCLIP
+NOBLOCKMAP
+NOGRAVITY
+FORCERADIUSDMG
+FORCEXYBILLBOARD
+NODAMAGETHRUST
+NOEXTREMEDEATH
+FORCEPAIN
DamageType "Marine"
Scale 20
Alpha 0.5
States
{
  Spawn:
   TRPS A 0
   TNT1 A 0 A_PlaySound("Daedabus/Chem",7)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS A 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS B 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS C 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS D 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS E 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS F 3 Bright A_FadeOut(0.007)
   TRPS A 0 A_Explode(random(34,146),random(384,712))
   TRPS G 3 Bright A_FadeOut(0.007)
   Loop
 }
}

ACTOR BioSphereFlare : BlueSphereFlare
{
States
{
Spawn:
	TNT1 A 0
	GENU A 1 Bright
	Stop
	}
}