ACTOR EtherealImp 21026
{
Health 460
Radius 20
Height 56
Speed 18
MeleeDamage 8
PainChance 80
DamageFactor 0.85
SeeSound "imp/sight"
PainSound "imps/pain"
DeathSound "imp/death"
ActiveSound "imp/active"
MeleeSound "imps/melee"
Obituary "%o was drawn to the whispers of an Ethereal Imp."
HitObituary "%o was mentally molested by an Etheral Imp."
DropItem "LifeEssence" 50
DropItem "ArmorBonusMax" 50
Species "Imps"
Alpha 0.3
MONSTER
+FLOORCLIP
+MISSILEMORE
States
{
Spawn:
	DSHD A 10 A_Look
	DSHD A 10 A_Look
	Loop
See:
	DSHD AABBCCDDEE 3 A_Chase
	TNT1 A 0 A_SpawnItem("HumanishStep",0,0,0,0)
	DSHD AABBCCDDEE 3 A_Chase
	TNT1 A 0 A_SpawnItem("HumanishStep",0,0,0,0)
    Loop
Melee: 
    DSHD FF 5 A_FaceTarget
    DSHD G 4 A_MeleeAttack
	DSHD GG 5 A_FaceTarget
    Goto See 
Missile:
	DSHD FF 8 A_FaceTarget
	DSHD G 4 Bright A_CustomMissile("EtherealImpBall", 34, 0, 0)
	TNT1 A 0 Bright A_CustomMissile("EtherealImpBall", 34, 0, 10)
	TNT1 A 0 Bright A_CustomMissile("EtherealImpBall", 34, 0, -10)
	DSHD FF 6 A_FaceTarget
	DSHD G 4 Bright A_CustomMissile("EtherealImpBall", 34, 0, 0)
	TNT1 A 0 Bright A_CustomMissile("EtherealImpBall", 34, 0, 10)
	TNT1 A 0 Bright A_CustomMissile("EtherealImpBall", 34, 0, -10)
	DSHD FF 4 A_FaceTarget	
	Goto See
Pain:
	DSHD H 4 A_Pain
	Goto See
Death:
    DSHD I 5
	DSHD J 5 A_Scream
	DSHD KL 5
	DSHD M 0 A_SpawnItem("BodyCrash",0,0,0,0)
	DSHD M 5 A_Fall
	DSHD M -1
	Stop
XDeath:
	DSHD N 3
	DSHD O 3 A_XScream
	DSHD P 3 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	DSHD Q 3 A_Fall
	DSHD RST 3
	DSHD T -1
    Stop
Raise:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	DSHD LKJI 5
	Goto See
    }
}

ACTOR EtherealImpBall : DoomImpBall
{
  FastSpeed 22
  Speed 14
  Decal DoomImpScorch
  Damage 8
  States
  {
	Spawn:	
        BAL1 AB 1 Bright A_SpawnItemEx("ImpBallTrail",0,0,0,0,0,0,0,128,0)	
        Loop
    Death:
	    TNT1 A 0
	    TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
		TNT1 AAA 0 A_CustomMissile("Kaboom9", 0, 0, random(0,360), 2, random(0,360))
		TNT1 AAA 0 A_CustomMissile("SmokeFX4", 0, 0, random(0,360), 2, random(0,360))
        BAL1 CDE 3 Bright
        Stop
    }   
}

ACTOR ImpBallTrail : BFG9500Trail
{
Scale 1
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 A 1
    DIBT GHIJKL 1 A_FadeOut(0.1)
	Stop
    }
}
