Actor BerserkerImp : Devil
{
Monster
Health 450
Radius 18
Speed 10
Damage (24)
MaxStepHeight 64
MeleeRange 78
MeleeDamage 35
Painchance "Mine", 128
Painchance "AdvancedImp", 0
Painchance "Shadow", 0
Painchance 15
+SlidesOnWalls
+DropOFF
+Float
+QuickToRetaliate
+FloorClip
+DONTHARMSPECIES
Species "Ghoul"
Damagetype "AdvancedImp"
Damagefactor "Acid", 3.5
//No Infighting
Damagefactor "Glaucoma", 0
Damagefactor "GlaucomaGas", 0
Damagefactor "AdvancedImp", 0.0
Damagefactor "Nightshade", 0.0
Damagefactor "HellionFire", 0.0
Damagefactor "Catharsi15k", 0.0
Damagefactor "Catharsi10K", 0.0
DropItem "LifeEssence", 200, 4
DropItem "HEMArmorBonusMax4", 200
DropItem "PartialKakuhou", 100, 1
SeeSound "BerserkImp/See"
ActiveSound "BerserkImp/Active"
PainSound "BerserkImp/Pain"
DeathSound "BerserkImp/Death"
Obituary "%o was penetrated by a Berserker Imp's spikes."
HitObituary "A Berserker Imp feasted on %o's flesh."
Tag "\c[f1]Berserker Imp\c-"
States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("GHOULS",1)
	Spawn.Real:
	Idle:
		FIMP A 10 A_Look
		Loop
	See:
		TNT1 A 0 A_Gravity
		FIMP AAABBB 1 A_Chase
		TNT1 A 0 A_Gravity
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		FIMP CCCDDD 1 A_Chase
		TNT1 A 0 A_Gravity
		TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
		Loop
	Melee:
		FIMP EEEFFFGG 1 A_FaceTarget
		TNT1 A 0 A_CustomMeleeAttack(random(25,35),"imp/melee","None","AdvancedImp")
		FIMP FE 4
		GoTo See
	Missile:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,"Spikes")
	Normal:
		FIMP EEEEFFF 1 A_FaceTarget
		FIMP GG 1 A_FaceTarget
		TNT1 A 0 A_Recoil(-10)
		TNT1 A 0 A_SkullAttack(20)
		FIMP G 25
		TNT1 A 0 A_Gravity
		FIMP FE 4 A_Stop
		TNT1 A 0 A_JumpIfCloser(70,"Melee")
		FIMP E 5
		GoTo See
	Spikes:
		FIMP EEEE 1 A_FaceTarget
		FIMP FF 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile("SpineProjectile",29,8)
		FIMP FF 1 A_FaceTarget
		FIMP GG 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile("SpineProjectile",32,0)
		FIMP GG 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile("SpineProjectile",32,0)
		FIMP GG 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile("SpineProjectile",32,0)
		FIMP FEE 5
		GoTo See
	Pain:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,"SpikePain")
		TNT1 A 0 A_Jump(37,"Missile")
		FIMP H 5 A_Pain
		GoTo See
	SpikePain:
		TNT1 A 0
		TNT1 AAAAAAAAAAAAA 0 A_CustomMissile("SpineProjectile",random(15,42),random(-4,4),random(0,360),2,random(0,360))
		FIMP HHHHH 3 A_Pain
		GoTo See
	Death:
		TNT1 A 0 A_TakeInventory("Ghouls",1)
		FIMP I 4
		TNT1 A 0 A_ScreamAndUnblock
		FIMP JKL 4
		GHUL N 0 A_SpawnItem("BodyCrash",0,0,0,0)
		FIMP M 63000 CanRaise
		Stop
	XDeath:
		TNT1 A 0 A_TakeInventory("Ghouls",1)
		FIMP N 3
		TNT1 A 0 A_GiveInventory("XDeathCheck",1)
		TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
		TNT1 A 0 A_XScream
		FIMP O 3
		TNT1 A 0 A_NoBlocking
		FIMP PQRST 3
		FIMP 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")
		FIMP LKJI 4
		TNT1 A 0 A_GiveInventory("Ghouls",1)
		Goto See
	XRaise:
		TNT1 A 0 A_TakeInventory("XDeathCheck",1)
		FIMP TSRQPN 3
		TNT1 A 0 A_GiveInventory("Ghouls",1)
		GoTo See
	}
}

Actor SpineProjectile : KaguneShard
{
Speed 22
BounceCount 3
BounceFactor 1.2
WallBounceFactor 1.1
Damage (5*random(1,3))
+Ripper
+HexenBounce
}