ACTOR SpiritImp 31179
{ 
  Health 200
  Radius 20
  Height 56
  Mass 120
  Speed 18
  BloodType None
  DropItem "LifeEssence" 255 1
  DropItem "ArmorEssence" 255 1
  MONSTER
  RENDERSTYLE add
  Alpha 0.7
  +FloorClip
  +NoBloodDecals
  SEESOUND "SpiritImp/Sight"
  DEATHSOUND "SpiritImp/Death"
  ACTIVESOUND "SpiritImp/Active"
  HITOBITUARY "%o was exiled by a hellish force."
  OBITUARY "%o was overburdened with grief."
  states
  {
  Spawn:
    SPIP AB 10 A_Look
    Loop
  See:
    SPIP A 0 A_CustomMissile("OrbitSpirit", 32, 0, 90)
    SPIP A 0 A_CustomMissile("OrbitSpirit2", 32, 0, -90)
    SPIP AABBCCDD 3 A_Chase
    Goto See+2
  Melee:
  Missile:
    SPIP EFG 4 A_FaceTarget
    SPIP HIJK 5 A_FaceTarget
    SPIP L 6 A_CustomComboAttack ("SpiritImpBall", 32, 5, "Imp/Melee")
    SPIP M 10
    Goto See +2
  Pain:
    SPIP N 3
    SPIP N 3 A_Pain
    Goto See +2
  Death:
    SPIP O 7 A_Scream
    SPIP PQR 7
    SPIP S 6 A_SpawnItemEx("SpiritImpGhost1", 0, 0, 32, 0, 0, 0, 0, 128)
    SPIP T 5 A_Fall
    SPIP U 5 A_SpawnItem("SpiritImpGhost")
    SPIP V 5 A_NoBlocking
    SPIP W 3 A_FadeOut(0.015)
    Goto Death+8
    }
 }


actor SpiritImpBall
{
    Radius 8
    Height 6
    Scale 0.4
    Speed 12
    Damage 10
    +SEEKERMISSILE
    PROJECTILE
    Renderstyle ADD
    SeeSound "harvester/scream"
    DeathSound "imp/shotx"
    Decal DoomImpScorch
    States
    {
    Spawn:
    	SIBA A  0 A_SpawnItemEx("SpiritImpBallTrail", 0, 0, 0, 0, 0, 0, 0, 180)
        SIBA AB 2 A_SeekerMissile (10,20)
        Loop
    Death:
        SIBA CDEFGHIJKL 4
        Stop
    }
}


actor SpiritImpBallTrail
{
    Radius 1
    Height 1
    Speed 0
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.5
    +NOCLIP
    States
    {
    Spawn:
    Death:
    	SITR H 6
        SITR ABCDEFG 4
        Stop
    }
}



actor OrbitSpirit : SpiritImpBall
{
     SeeSound ""
     +NOCLIP
     Scale 0.4
     Alpha 0.1
     Speed 3
     MissileHeight 0
     States
     {
     Spawn:
         SIBA AABB 1
         SIBA A 3 A_CustomMissile("OrbitSpirit", 0, 0, 75)
         Stop
     Death:
    	 SIBA A 2 A_FadeOut(0.015)
         loop
     }
}

actor OrbitSpirit2 : OrbitSpirit
{
     Speed 10
     MissileHeight 0
     States
     {
     Spawn:
         SIBA AABB 1
         SIBA A 0 A_CustomMissile("OrbitSpirit", 0, 0, -75)
         stop
     Death:
    	 SIBA A 2 A_FadeOut(0.015)
         loop
     }
}


actor SpiritImpGhost1
{
    Radius 1
    Height 1
    Speed 0
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.7
    +NOCLIP
    SeeSound "harvester/ghost"
    States
    {
    Spawn:
    Death:
        SIGH A 0
        SIGH A 0 A_PlaySound("harvester/ghost")
        SIGH ABCDEFG 4
        Stop
    }
}

Actor SpiritImpGhost
{
  Radius 20
  Height 56
  Mass 120
  Speed 8
  renderstyle add
  alpha 0.2
  +NOTELEPORT
  +FLOORCLIP
  -SOLID
  -SHOOTABLE
  +NONSHOOTABLE
  +LOOKALLAROUND
  States
  {
  Spawn:
    SPIP AABB 6 A_Look
    SPIP A 0 A_FadeOut(0.005)
    Loop
  See:
    SPIP AABBCCDD 3 A_VileChase
    SPIP A 0 A_FadeOut(0.005)
    Loop
  Death:
    TNT1 A 1
    Stop
  Heal:
    TNT1 A 1
    Goto Death
  }
}

