ACTOR MDemon : Demon 
{
  Health 150
  PainChance 180
  Speed 10
  Radius 30
  Height 56
  Mass 400
  GibHealth -50
  
  PainChance "Control", 255
  DamageFactor "Control", 1
  
  DamageFactor "MarineDamage", 1
  DamageFactor "ImpBallDamage", 0.5
  DamageFactor "ZombiesDamage", 0.5
  DamageFactor "CacoDamage", 0.5
  DamageFactor "SkelDamage", 0.5
  DamageFactor "FatsoDamage", 0.5
  DamageFactor "KnightDamage", 0.5
  DamageFactor "ArachDamage", 0.5
  DamageFactor "viledamage", 0.5
  States
  {
  Spawn:
    SARG A 10 A_Look
	SARG B 10 
	SARG A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  See:
    SARG AABBCCDD 2 A_Chase
    SARG A 0 A_JumpIf (special != 226,1) 
	loop	
	SARG A 0 Thing_SetSpecial (0,226,409,0,health)
	goto see	
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,5)
	TNT1 A 10
	stop
   Death:
    SARG I 8 A_GiveToTarget ("MarineExp",2)
    SARG J 8 A_Scream
    SARG K 4
    SARG L 4 A_NoBlocking
    SARG M 4
    SARG N -1
    Stop 
   XDeath:
    SARG O 8 A_GiveToTarget ("MarineExp",2) 
    SARG P 8 A_XScream
    SARG Q 4 
    SARG R 4 A_NoBlocking
    SARG STU 4 
    SARG V -1
    stop	
  }
}

ACTOR MSpectre : MDemon replaces Spectre
{
  RenderStyle OptFuzzy
  Alpha 0.5
  SeeSound "spectre/sight"
  AttackSound "spectre/melee"
  PainSound "spectre/pain"
  DeathSound "spectre/death"
  ActiveSound "spectre/active"
  HitObituary "$OB_SPECTREHIT"
  +SHADOW
  States
  {
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,6)
	TNT1 A 10
	stop
  }	
}

ACTOR MBloodDemon replaces BloodDemon
{ 
    Health 300 
    Speed 15 
    Height 56
    Radius 30
    Mass 400
    PainChance 180
    Meleedamage 5 
    REACTIONTIME 4 
    MONSTER
    +FLOORCLIP
    SeeSound "blooddemon/sight"
    PainSound "blooddemon/pain"
    DeathSound "blooddemon/death"
    ActiveSound "blooddemon/active"
    //MeleeSound "blooddemon/melee"
    HitObituary "%o Was chewed up and spat out by a Mech-demon."
	
	PainChance "Control", 255
    DamageFactor "Control", 1
  
    DamageFactor "MarineDamage", 1
    DamageFactor "ImpBallDamage", 0.5
    DamageFactor "ZombiesDamage", 0.5
    DamageFactor "CacoDamage", 0.5
    DamageFactor "SkelDamage", 0.5
    DamageFactor "FatsoDamage", 0.5
    DamageFactor "KnightDamage", 0.5
    DamageFactor "ArachDamage", 0.5
    DamageFactor "viledamage", 0.5
	
    States 
    { 
    Spawn: 
       SRG2 A 10 A_Look
	   SRG2 B 10
	   SRG2 A 0 Thing_SetSpecial (0,226,409,0,health)
       Loop 
    See: 
       SRG2 A 0 A_PlaySound("blooddemon/walk")
       SRG2 AABB 2 A_Chase
       SRG2 C 0 A_PlaySound("blooddemon/walk")
       SRG2 CCDD 2 A_Chase
       SRG2 A 0 A_JumpIf (special != 226,1) 
	   loop	
	   SRG2 A 0 Thing_SetSpecial (0,226,409,0,health)
	   goto see 
    Melee: 
	   SRG2 E 0 A_PlaySound("blooddemon/melee")
       SRG2 E 4 A_FaceTarget
       SRG2 GF 4 A_MeleeAttack
       Goto See 
    Pain: 
       SRG2 H 2
       SRG2 H 2 A_Pain
       Goto See
    Death: 
       SRG2 I 8 A_GiveToTarget ("MarineExp",4)
       SRG2 I 0 A_FaceTarget
       SRG2 J 0 A_SpawnItemEx("BloodDemonArm", 10, 0, 32, 0, 8, 0, 0, 128)
       SRG2 J 8 A_Scream
       SRG2 K 4 
       SRG2 L 4 A_NoBlocking
       SRG2 M 4 
       SRG2 N -1 
       Stop 
    Raise: 
       SRG2 NMLKJI 5 
       Goto See 
	Death.Control:
       TNT1 A 0 ACS_Execute(410,0,23)
	   TNT1 A 10
	   stop  
    } 
}

ACTOR BloodDemonArm
{
	Radius 8
	Height 8
	Speed 8
	+DOOMBOUNCE
	+DROPOFF
	+Missile
      States
	{
	Spawn:
         SG2A ABCDEFGH 2
	Death:	 
	RemoveLoop:	 
         SG2A I 1 A_CheckSight("Remove")
         loop
	Remove:	 
		 TNT1 A 0 Thing_Remove (0)
	     stop
	}
}
