ACTOR EmpoweredBFGCacodemon : BFGCacodemon 27903
{
  Health 1300
  Speed 16
  PainChance 32
  Obituary "%o was swiftly and efficiently dealt with by an Empowered BFG Cacodemon."
  DropItem "BFG9500" 90 1
  DropItem "BossLifeEssence" 150
  DropItem "BossArmorBonusMax" 150
  DropItem "NewCellPack" 256
  DropItem "SphereOfPower" 128
  Tag "\c[x9]Empowered BFG Cacodemon\c-"
  States
  {
  Spawn:
	EBFC A 10 A_Look
	Loop
  See:
	TNT1 A 0 A_Jump(20,"FastChase")
	EBFC A 3 A_Chase
	TNT1 A 0 A_Jump(62,"Rush")
	Loop
  Rush:
	TNT1 A 0 A_SpawnItemEx("EBFGCacodemonGhostA")  
	EBFC A 1 A_Chase 
	TNT1 A 0 A_Jump(14,"See")
	Loop
  FastChase:
	EBFC AAAA 3 A_FastChase
	Goto See
  Missile:
	TNT1 A 0 A_Jump(128,"Missile2")
	TNT1 A 0 A_Jump(64,"Missile3")
	Goto See
  Missile2:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	EBFC B 15 A_FaceTarget
	EBFC C 10 Bright A_FaceTarget
	EBFC D 10 Bright A_CustomMissile("EmpoweredCacoBFG9500Ball", 15)
	EBFC CB 15 A_FaceTarget
	Goto See
  Missile3:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	EBFC B 18 A_FaceTarget
	EBFC C 10 Bright A_FaceTarget
	EBFC D 6 Bright A_CustomMissile("EmpoweredCacoBFG15KBall", 15)
	EBFC C 6 Bright A_FaceTarget
	EBFC D 6 Bright A_CustomMissile("EmpoweredCacoBFG15KBall", 15)
	EBFC C 6 Bright A_FaceTarget
	EBFC D 6 Bright A_CustomMissile("EmpoweredCacoBFG15KBall", 15)
	EBFC CB 20 A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	Goto See
  Melee:
	EBFC BC 5 A_FaceTarget
	EBFC D 5 A_MeleeAttack
	EBFC CB 5 A_FaceTarget
	Goto See
  Pain:
	EBFC E 3
	EBFC E 3 A_Pain
	EBFC F 6
	Goto See
  Death:
	EBFC G 8
	TNT1 A 0 A_SpawnItemEx("MutantGibbedGenerator",0,0,0,0,0,0,0,128,0)
	EBFC H 8 A_Scream
	EBFC I 8
	EBFC J 8
	EBFC K 8 A_NoBlocking
	EBFC L -1 A_SetFloorClip
	Stop
  }
}

ACTOR EBFGCacodemonGhostA : BFGCacodemonGhostA
{
States
{
Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(CallAcs("LCAEffectCheck"),"Toaster")
Fade:
	TNT1 A 1
	EBFC A 2 A_FadeOut(0.15)
	Goto Fade+1
	}
}

ACTOR EmpoweredCacoBFG9500Ball : PoweredBFG9500Ball
{
-THRUSPECIES
DamageType "CacoComet"
States
{
Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("PoweredBFGShockwave",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AAAAAA 0 A_CustomMissile("KaboomBlue",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	PFE3 AB 4 Bright A_SpawnItemEx("LegendaryBlueParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	PFE3 CC 2 Bright A_BFGSpray("EmpoweredCacoSpray")
	PFE3 DEF 4 Bright
	Stop	
    }
}

ACTOR EmpoweredCacoSpray : PoweredCustomSpray
{
Species "CacoDemon"
+MTHRUSPECIES
+DONTHARMSPECIES
}

ACTOR EmpoweredCacoBFG15KBall : BFG15KBall
{
Speed 50
+SEEKERMISSILE
-THRUSPECIES
DamageType "CacoComet"
States
{
Spawn:
    EPS1 AB 2 Bright A_SpawnItemEx("PoweredBFGTrailparticle",Random(-8,8),Random(-8,8),Random(-8,8),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	TNT1 A 0 A_SeekerMissile(3,3)
    Loop
Death:
	TNT1 A 0
    TNT1 A 0 A_SpawnItemEx("PoweredBFGShockwave", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AA 0 A_CustomMissile("KaboomBlue", 0, 0, random(0,360), 2, random(0,360))      
    EPE1 A 4 Bright A_Explode	
    EPE1 BCDEF 4 Bright
    Stop
    }
}