ACTOR PhaseElemental : SoulKeeper 21527
{
	Health 600
	PainChance 80
	SeeSound "Defier/Sight"
	DeathSound "Defiler/Death"
	BloodColor "cf 00 b0"
	Obituary "%o was pierced by a Phase Elemental."
	HitObituary "%o is too salty to the refined tastes of the Phase Elemental."
	DropItem "LifeEssence" 90
	DropItem "ArmorBonusMax" 90
	DropItem "DemonAmmoBox" 128 200
	States
	{
	Spawn:
		PELE A 10 A_Look
		Loop
	See:
		PELE AABBCCBB 3 A_Chase
		TNT1 A 0 A_Jump(46,"Phase")	
		Loop
	Phased:
        PELE AABBCCAAAABBCCAAAABBCCAAAABBCCAA 1 A_ExtChase(0,0)
        PELE AABBCCAAAABBCCAA 1 A_Chase
		TNT1 A 0 A_Jump(24,"UnPhase")
        Goto Phased+32
	Phase:
        TNT1 A 0 A_PlaySound("phaseimp/teleport")
        PELE E 2 A_FaceTarget
        PELE E 1 A_SetTranslucent(0.75)
        PELE E 1 A_SetTranslucent(0.55)
        PELE E 1 A_SetTranslucent(0.35)
		PELE E 1 A_SetTranslucent(0.15)
        Goto Phased
	UnPhase:
        TNT1 A 0 A_PlaySound("phaseimp/teleport")
		PELE E 1 A_SetTranslucent(0.15)
        PELE E 1 A_SetTranslucent(0.35)
        PELE E 1 A_SetTranslucent(0.55)
        PELE E 1 A_SetTranslucent(0.75)
		TNT1 A 0 A_SetTranslucent(1)
        PELE E 2 A_FaceTarget		
        Goto See
	Missile:
	    TNT1 A 0 A_SetTranslucent(1)
		TNT1 A 0 Bright A_Jump(87,"Seeker")
	Normal:
        PELE DE 6 A_FaceTarget
        PELE F 5 Bright A_PainAttack("PhaseSoul")
		PELE ED 4
		Goto See
	Seeker:
	    TNT1 A 0 A_SetTranslucent(1)
		PELE D 6 Bright A_FaceTarget 
		PELE E 4 Bright	A_FaceTarget
		TNT1 A 0 Bright A_PlaySound("imp/attack")
		PELE F 0 Bright A_CustomMissile("PhaseEleBall", 26, 0, -30)
		PELE F 3 Bright A_CustomMissile("PhaseEleBall", 26, 0, 30)
		PELE ED 4
		Goto See
	Melee:
	    TNT1 A 0 A_SetTranslucent(1)
        PELE DE 5 A_FaceTarget 
        PELE F 4 A_MeleeAttack
	    PELE ED 3 A_FaceTarget
        Goto See		
	Pain:
	    TNT1 A 0 A_SetTranslucent(1)
		TNT1 A 0 A_Jump(61,"PainMissile")
		PELE G 12 A_Pain
		Goto See
	PainMissile:
	    TNT1 A 0 A_SetTranslucent(1)
		PELE G 12 A_Pain
		Goto Missile	
	Death:
	    TNT1 A 0 A_SetTranslucent(1)
		PELE H 5 
		PELE I 5 Bright A_Scream
		PELE J 5 Bright A_NoBlocking
		TNT1 A 0 A_SetTranslucent(0.75,1)
		TNT1 A 0 A_SpawnItemEx("MutantGibbedGenerator",0,0,0,0,0,0,0,128,0)
	    TNT1 AAAA 0 A_SpawnItemEx("PurpleParticleSpawner", 0, 0, random(20,40), 0, 0, 0, 0, 128)
		TNT1 AAAA 0 A_CustomMissile("SmokeFX2", random(20,40), 0, random(0,360), 2, random(0,360))
		TNT1 AAAA 0 A_CustomMissile("Kaboom8", random(20,40), 0, random(0,360), 2, random(0,360))		
		PELE K 5 Bright A_PainDie("PhaseSoul")
		PELE LM 5 Bright
		Stop
      } 
}		
Actor PhaseEleBall : PhaseImpBall
{
DamageType "EleSouls"
}