ACTOR FacelessSpectre : BullFiend
{
    Renderstyle Translucent
    Alpha 0.1
	Radius 25
	Health 450
	Scale 1.1
	MeleeDamage 10
	DropItem "HasteSphere"
	DropItem "ArmorPlate"
	SeeSound    ""
    SeeSound "LegFiend/Sight"
    PainSound "LegFiend/Pain"
    DeathSound "LegFiend/Death"
    ActiveSound "LegFiend/Active"
    AttackSound "LegFiend/Melee"
	HitObituary "%o's energy was drained by the Faceless Spectre"
	PainChance 30
	Speed 12
	States
	{
	Spawn: 
		PSPE A 10 A_Look
        Loop
	Idle: 
	    PSPE E 0 A_SetTranslucent(0.1)
	    PSPE A 10 A_Look
		Loop
	See: 
	    TNT1 A 0 A_JumpIfInventory("ineverbeentospacebefore", 1, "Boost")
	    PSPE E 0 A_SetTranslucent(0.1)
        PSPE AABB 2 A_Chase
        PSPE CCDD 2 A_Chase
        Loop 
	Boost:
	    PSPE E 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: 
		PSPE E 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:
	    PSPE E 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,1)
	    Goto See
		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 -1 
        Stop
	Raise: 
	    TNT1 A 0
	    TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        PSPE NMLKJI 5 
        Goto See 
	}
}

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

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