Actor NightmareFiend
{
//Creator: Titanium
//Origin: Complex-MM / Nexus Infinity
//Sprite: SARN
//Title: "Nightmare Fiend" 
  Health 300
  Radius 30
  Height 56
  Speed 18
  Mass 200
  PainChance 80
  GibHealth 30
  Monster
  +FloorClip
  +LongMeleeRange
  +DONTHURTSPECIES
  SeeSound "NightmareDemon/sight"
  AttackSound "NightmareDemon/melee"
  PainSound "NightmareDemon/pain"
  DeathSound "NightmareDemon/death"
  ActiveSound "NightmareDemon/active"
  Obituary "%o was spooked by a Nightmare Fiend."
  HitObituary "%o was eaten by a Nightmare Fiend."
  PainChance "SoulToxic", 50
  PainChance "FatFlamer", 50
  PainChance "FiendFire", 50
  Species "Fiends"
  DamageFactor "FiendFire", 0.0
  DamageFactor "DTFiendEx", 0.0
  Tag "\c[v9]Nightmare Fiend\c-"
  DropItem "LifeEssence" 100
  DropItem "ArmorBonusMax" 100
  States
  {
  Spawn:
    SARN A 10 A_look
    Loop
  See:
    SARN AABB 2 A_Chase
	TNT1 A 0 A_SpawnItem("HeavyFleshStep",0,0,0,0)
	SARN CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItem("HeavyFleshStep",0,0,0,0)
    Loop
  Melee:
    SARN E 6 A_FaceTarget
    SARN F 6 A_FaceTarget
	TNT1 A 0 A_Recoil(-20)
    SARN G 6 A_SargAttack
    Goto See
  Missile:
    SARN O 6 A_FaceTarget
    SARN P 8 A_CustomMissile("NMFiendBall", 24, 0, 0)
    Goto See
  Pain:
    SARN H 3
    SARN H 3 A_Pain
    Goto See
  Death:
    SARN I 5
    SARN J 5 A_Scream
    SARN K 5
    SARN L 5 A_Fall
    SARN M 5 A_SpawnItem("BodyCrash",0,0,0,0)
    SARN N -1
    Stop
  XDeath:
	SANX O 5 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	SANX P 5 A_XScream
	SANX Q 5 A_Fall
	SANX RS 5
	TNT1 A 0 A_SpawnItem("BodyCrash",0,0,0,0)
	SANX T -1
	Stop
  Raise:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    SARN MLKJI 5
    Goto See
  }
}

Actor NMFiendBall : KnightFastBall
{
Damagetype "FiendFire"
}

Actor Predator : NightmareFiend
{
+STEALTH
HitObituary "%o didn't see predator and died."
Speed 22
Tag "Predator"
States
{
  Missile:
    Goto See
}
}