ACTOR FacelessSpectre : BullFiend
{
Monster
Health 450
Radius 25
Speed 12
Scale 1.1
Renderstyle Translucent
Alpha 0.1
PainChance 30
MeleeDamage 10
DropItem "HasteSphere"
DropItem "ArmorPlate"
SeeSound "LegFiend/Sight"
ActiveSound "LegFiend/Active"
AttackSound "LegFiend/Melee"
PainSound "LegFiend/Pain"
DeathSound "LegFiend/Death"
HitObituary "%o's energy was drained by the Faceless Spectre"
Tag "\c[v9]Faceless Spectre"
States
	{
	Spawn: 
		PSPE A 10 A_Look
		Loop
	Idle: 
		TNT1 A 0 A_SetTranslucent(0.1)
		PSPE A 10 A_Look
		Loop
	See: 
	    TNT1 A 0 A_JumpIfInventory("ineverbeentospacebefore", 1, "Boost")
	    TNT1 A 0 A_SetTranslucent(0.1)
        PSPE AABB 2 A_Chase
        PSPE CCDD 2 A_Chase
        Loop 
	Boost:
	    TNT1 A 0 A_SetTranslucent(0.1)
        PSPE AABB 1 A_Chase
        PSPE CCDD 1 A_Chase
		PSPE AABB 1 A_Chase
        PSPE CCDD 1 A_Chase
		PSPE AABB 1 A_Chase
        PSPE CCDD 1 A_Chase
		PSPE AABB 1 A_Chase
        PSPE CCDD 1 A_Chase
        Goto See
	Melee: 
		TNT1 A 0 A_SetTranslucent(0.3)
		TNT1 A 0 A_Recoil(-3.0) 
        PSPE EF 5 Fast A_FaceTarget
        PSPE G 4 A_MeleeAttack
		TNT1 A 0 A_GiveToTarget("FlessSpectreSlow",1)
		TNT1 A 0 A_GiveInventory("Health",10)
		TNT1 A 0 A_GiveInventory("ineverbeentospacebefore")
        PSPE E 5 A_FaceTarget
        Goto See
	Missile:
	    TNT1 A 0 A_SetTranslucent(0.1)
		TNT1 A 0 A_Jump(128,"Lunge")
		TNT1 A 0 A_Jump(90,"Shadows")
	Lunge:
	    TNT1 A 0 A_JumpIfCloser(450,"Lunge2")
	    Goto See
	Lunge2:
		PSPE E 0 A_SetTranslucent(0.3)
		TNT1 A 0 A_PlaySound("LegFiend/Melee")
	    PSPE EF 7 A_FaceTarget
		TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	    TNT1 A 0 ThrustThingZ(0,20,0,1)
	    PSPE F 2 A_Recoil(-28)
	    PSPE F 3 A_CustomMissile("PinkyLunge",18,0,0,CMF_AIMDIRECTION)
	    PSPE G 6
	    PSPE G 2 A_ScaleVelocity(0.2)
		TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,0)
	    PSPE G 1 A_ScaleVelocity(0)
	    Goto See
	Shadows:
	    PSPE A 2 A_SpawnItemEx("FacelessSpectreShadow",0,0,0)
		Goto See
	Pain: 
	    PSPE E 0 A_SetTranslucent(0.11)
		TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,0)
        PSPE H 4 A_Pain
        Goto See
    XDeath:
	Death: 
	    PSPE E 0 A_SetTranslucent(0.5)
	    TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,0)
        PSPE I 5 
        PSPE J 5 A_Scream
        PSPE K 4
        PSPE L 4 A_NoBlocking     
        PSPE M 4 A_SpawnItem("BodyCrash",0,0,0,0)
        PSPE N 63000 CanRaise
        Stop
	Raise: 
	    TNT1 A 0
	    TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        PSPE NMLKJI 5 
        Goto See 
	}
}

Actor FacelessSpectreShadow : FacelessSpectre
{
Health 20
+THRUSPECIES
DropItem ""
}

Actor FlessSpectreSlow : CustomInventory 
{
+AUTOACTIVATE
+ALWAYSPICKUP
inventory.maxamount 1
States 
	{
	Use:
		TNT1 A 0
		TNT1 A 0 A_SetBlend("128,0,0",0.9,70)
		TNT1 A 1 A_GiveInventory("DebuffMS")
		Stop
	}
}
	
ACTOR DebuffMS : PowerSpeed
{
+POWERSPEED.NOTRAIL
Speed 0.5
Powerup.Duration -5
}
 
Actor ineverbeentospacebefore : Inventory { inventory.maxamount 1 }