ACTOR DarkCyberImp
{
Monster
Health 350
Height 56
Radius 18
Mass 600
Speed 4
Reactiontime 18
BloodColor Green
Painchance "Mine", 128
Painchance "AdvancedImp", 0
Painchance "Shadow", 0
PainChance 50
Damage (6*random(1,4))
+FLOORCLIP
+DontHurtSpecies
+DontHarmSpecies
+DONTHARMCLASS
+QuickToRetaliate
Species "AdvancedImp"
DamageType "AdvancedImp"
Damagefactor "Acid", 4.6
Damagefactor "Fire", 0.7
//No Infighting
Damagefactor "AdvancedImp", 0.0
Damagefactor "Shadow", 0.0
Damagefactor "Nightshade", 0.0
Damagefactor "HellionFire", 0.0
Damagefactor "Catharsi15k", 0.0
Damagefactor "Catharsi10K", 0.0
DropItem "LifeEssence", 196, 6
DropItem "HEMArmorBonusMax20", 196
SeeSound "CIMPSIT"
PainSound "CIMPPAIN"
DeathSound "CIMPDTH"
ActiveSound "CIMPACT"
HitObituary "%o's spine was taken by a Dark Cyber Imp."
Obituary "%o was blasted down by a Dark Cyber Imp."
Tag "Dark Cyber Imp"

States
	{
	Spawn:
		DCIP A 10 A_Look
		Loop
	See:
		DCIP AAAAAABBBBBB 1 A_Chase
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		DCIP CCCCCCDDDDDD 1 A_Chase
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		TNT1 A 0 A_Jump(38,"Rush")
		Loop
	Rush:
		DCIP A 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostA",0,0,0,0,0,0,0,128)
		DCIP A 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostA",0,0,0,0,0,0,0,128)
		DCIP B 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostB",0,0,0,0,0,0,0,128)
		DCIP B 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostB",0,0,0,0,0,0,0,128)
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		DCIP C 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostC",0,0,0,0,0,0,0,128)
		DCIP C 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostC",0,0,0,0,0,0,0,128)
		DCIP D 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostD",0,0,0,0,0,0,0,128)
		DCIP D 1 A_Chase
		TNT1 A 0 A_Chase
		TNT1 A 0 A_SpawnItemEx("DCimpGhostD",0,0,0,0,0,0,0,128)
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		TNT1 A 0 A_Jump(50,"See")
		Loop
	Melee:
		DCIP EF 3 A_FaceTarget
		TNT1 A 0 A_CustomMeleeAttack(random(30,40),"imp/melee","None","AdvancedImp")
		DCIP E 3 A_FaceTarget
		Goto See
	Missile:
		TNT1 A 0
		TNT1 A 0 A_Jump(120,"Leap")
		TNT1 A 0 A_Jump(40,"BFG15K")
		DCIP EF 8 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		DCIP FFG 2 A_FaceTarget
		DCIP G 1 Bright A_Custommissile("ImpPlasmaBall",36,4,random(-3,3))
		Goto See
	BFG15K:
		TNT1 A 0
		TNT1 A 0 Bright A_PlaySound("weapons/charge15k")
		DCIP FFFF 5 A_FaceTarget
		DCIP G 3 Bright A_CustomMissile("Catharsi15K",36,4,0)
		DCIP FFF 1 Bright A_FaceTarget
		DCIP G 3 Bright A_CustomMissile("Catharsi15K",36,4,0)
		DCIP FFF 1 Bright A_FaceTarget
		DCIP G 3 Bright A_CustomMissile("Catharsi15K",36,4,0)
		DCIP FFF 1 Bright A_FaceTarget
		DCIP G 3 Bright A_CustomMissile("Catharsi15K",36,4,0)
		DCIP FFF 1 Bright A_FaceTarget
		DCIP G 3 Bright A_CustomMissile("Catharsi15K",36,4,0)
		TNT1 A 0 A_PlaySound("weapons/bfg15kcooldown")
		DCIP F 25 Bright
		GoTo See
	Leap:
		DCIP EEEFFF 1 A_FaceTarget
		DCIP GG 1 A_SkullAttack
		DCIP G 20
		DCIP G 2 A_Gravity
		GoTo See
	Pain:
		TNT1 A 0
		DCIP H 2
		DCIP H 2 A_Pain
		Goto See
	Death:
		TNT1 A 0
		DCIP I 8
		DCIP J 8 A_Scream
		DCIP K 6
		DCIP L 6 A_NoBlocking
		DCIP M 63000 CanRaise
		Stop
	XDeath:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("GreenGibbedGenerator",0,0,0,0,0,0,0,128,0)
		DCIP N 5 A_CustomMissile("DarkCyberImpArm",32,-10,270)
		TNT1 A 0 A_GiveInventory("XDeathCheck",1)
		DCIP O 5 A_XScream
		DCIP P 5
		DCIP Q 5 A_NoBlocking
		DCIP RST 5
		DCIP U 63000 CanRaise
		Stop
	Raise:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 A_JumpIfInventory("XDeathCheck",1,"XRaise")
		DCIP MLKJI 8
		Goto See
	XRaise:
		TNT1 A 0 A_TakeInventory("XDeathCheck",1)
		DCIP TSRQPON 4
		GoTo See
	}
}

ACTOR ImpPlasmaBall : FusionShot
{
Speed 24
FastSpeed 28
Damage (random(20,30))
+ThruSpecies
Species ""
Species "AdvancedImp"
DamageType ""
Damagetype "AdvancedImp"
States
	{
	Spawn:
		FS04 AB 1 Bright A_SpawnItemEx("ImpPlasmaBallTrail",0,0,0,0,0,0,0,128,0)
		Loop
	Death:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner",0,0,0,0,0,0,0,128)
		TNT1 AAA 0 A_CustomMissile("Kaboom7",0,0,random(0,360),2,random(0,360))
		TNT1 AAA 0 A_CustomMissile("SmokeFX4",0,0,random(0,360),2,random(0,360))	
		FS04 HIGJ 3 Bright
		Stop
	}
}

ACTOR ImpPlasmaBallTrail : BFG9500Trail
{
Scale 0.6
States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	SpawnLoop:
		FS04 AB 1 A_FadeOut(0.35,1)
		Loop
	}
}

ACTOR DarkCyberImpArm
{
Height 8
Radius 8
Speed 4
FastSpeed 4
+CLIENTSIDEONLY
+Missile
+NOBLOCKMAP
+DOOMBOUNCE
+DROPOFF
States
	{
	Spawn:
		DCIR ABCDE 3
		Loop
	Death:
		DCIR F 525
		DCIR FFFFFFFFFFF 5 A_FadeOut(0.1,1)
		Stop
	}
}

ACTOR DCImpGhostA
{
Height 56
Radius 2
Alpha 0.7
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOINTERACTION
+NONETID
States
	{
	Spawn:
		TNT1 A 1 Bright
		TNT1 A 0 Bright A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
		DCIP A 2 A_FadeOut(0.1,1)
		Wait
	Toaster:
		TNT1 A 1 Bright
		Stop
	}
}

Actor DCImpGhostB : DCImpGhostA
{
States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
		DCIP B 2 A_FadeOut(0.1,1)
		Wait
	}
}

Actor DCImpGhostC : DCImpGhostA
{
States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
		DCIP C 2 A_FadeOut(0.1,1)
		Wait
	}
}

Actor DCImpGhostD : DCImpGhostA
{
States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
		DCIP D 2 A_FadeOut(0.1,1)
		Wait
	}
}