Actor ChasmLieut Replaces Cacodemon
{
    Health 410
    Radius 22
    Height 52
    Speed 8
    PainChance 12
	PainChance "Laser", 94
	Mass 500
    Monster
	+DONTHARMSPECIES
	+FLOAT
	+NOGRAVITY
	+DROPOFF
	+SPAWNFLOAT
	Dropitem "CPlasmaCell", 100
	Dropitem "SupplyPackDecider"
    SeeSound "MongL/See"
    PainSound "MongL/Pain"
    DeathSound "MongL/Death"
	ActiveSound "Mongs/Active"
    Obituary "%o was killed by a Mong Lieutenant."
	BloodColor "Red"
	BloodType "RedBlood", "RedBlood"
	Species "Mong"
	Tag "Mong Lieutenant"
    States
    {
    Spawn:
	    TNT1 A 0 NoDelay
	    TNT1 A 0 A_Jump(10, "Loopty")
        MSI1 ABCDEFGHIJKLMNOP 2 A_Look
        Loop
	Loopty:
	    TNT1 A 0 A_PlaySound("Mongs/Idle",3)
	    MSI2 ABCDEFGHIJKLMNOPQRSTUV 2 A_Look
		Goto Spawn
    See:
        MSI1 ABCDEFGHIJKLMNOP 2 A_Chase
        Loop
	Missile:
		MSA1 ABCD 2 A_FaceTarget
		TNT1 A 0 A_PlaySound("MongL/Fire", 1)
		MSA1 D 0 A_CustomMissile("ChasmLieutBall",44,-10,1)
		MSA1 D 0 A_CustomMissile("ChasmLieutBall",44,10,-1)
		MSA1 E 0 A_SpawnItemEx("GreenMuzzleFlash", 18, 10, 22)
		MSA1 E 0 A_SpawnItemEx("GreenMuzzleFlash", 18, -10, 22)
		MSA1 E 4 BRIGHT
		MSA1 FGHIJKLMN 2
		Goto See
	Melee:
	    TNT1 A 0 A_Jump(20, "Kick")
	    MSA2 ABCDEF 2 A_FaceTarget
		MSA2 G 0 A_CustomBulletAttack(1, 1, 1, 7, "GruntMeleePuff", 50, CBAF_AIMFACING)
		MSA2 G 2
		MSA2 HIJKLM 2 A_FaceTarget
		MSA2 M 0 A_CustomBulletAttack(1, 1, 1, 7, "GruntMeleePuff", 50, CBAF_AIMFACING)
		MSA2 M 2
		MSA2 NOP 2
		Goto See
	Kick:
	    MSA3 ABCDEFG 2 A_FaceTarget
		MSA3 G 0 A_CustomBulletAttack(1, 1, 1, 14, "GruntMeleePuff", 50, CBAF_AIMFACING)
		MSA3 G 2
		MSA3 HIJKLM 2
		Goto See
  Pain:
    TNT1 A 0 A_Jump(30, "Pain2")
    MSP1 A 2 A_Pain
    MSP1 BCDEFGHI 2
    Goto See
  Pain2:
    MSP2 A 2 A_Pain
    MSP2 BCDEFGHIJKLMNOPQRSTUV 2
    Goto See
  Death:
    MSD1 A 4
    MSD1 B 4 A_Scream
    MSD1 C 4 A_NoBlocking
    MSD1 DEFGH 3
	MSD1 IJKL 2
	TNT1 A 0 A_PlaySound("MongA/Fall", 4)
	MSD1 MN 1
    MSD1 N -1
    Stop
  Death.Explosive:
    TNT1 A 0
	Goto XDeath
  XDeath:
    TNT1 A 0
	TNT1 A 0 A_NoBlocking
    TNT1 A 0 A_PlaySound("Flesh/Gib", 4)
    TNT1 A 0 A_CustomMissile("GoreBloodSpawner", random(10,25), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 A 0 A_CustomMissile("GoreBloodSpawner", random(10,25), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("GoreSpawner", random(10,25), random(0,-20), random (0, 360), 2, random (0, 160))
	TNT1 AAAAA 0 A_CustomMissile("GoreSpawner", random(10,25), random(0,20), random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile("BloodGiblet", random(10,20), random(0, -20), random (0, 360), 2, random (0, 160))
	TNT1 AAA 0 A_CustomMissile("BloodGiblet", random(10,20), random(0, 20), random (0, 360), 2, random (0, 160))
    Stop
  Raise:
    TNT1 A 0 A_CustomMissile("PhantomRezFX", 1, 5, random (0, 180), 2, random (0, 90))
	MSI1 A 1 A_SetTranslucent(0.10, 0)
	MSI1 ABCDEFGHJIKL 2 A_FadeIn(0.1)
  Goto See
    }
}

ACTOR ChasmLieutBall
{
  Radius 12
  Height 8
  Speed 10
  Damage 5
  Projectile
  +RANDOMIZE
  Scale 0.80
  Alpha 0.67
  RenderStyle Add
  DeathSound "ChasmCrossbow/Exp"
  States
  {
  Spawn:
  	TNT1 A 0 NoDelay
    PLZM FFF 1 Bright A_SpawnItemEx("ChasmLieutTrail",0,0,0,0,0,0,0,2)
	TNT1 A 0 A_SpawnItemEx("PhantomBallFX",0,0,0,random(-1,1),random(-1,1),random(-1,1),0,128,0)
	PLZM GGG 1 Bright A_SpawnItemEx("ChasmLieutTrail",0,0,0,0,0,0,0,2)
    Loop
  Death:
	TNT1 A 0 A_Scream
	TNT1 AAAAA 0 A_SpawnParticle ("Green", SPF_FULLBRIGHT | SPF_RELATIVE, random(35,45), random(1,4), frandom(0,360), 0,0,0, frandom(0.2,12.0),frandom(-0.2,0.2),frandom(-6.0,6.0), 0,0,-0.1, 0.98, -1)
    TNT1 AAAAA 0 A_SpawnParticle ("White", SPF_FULLBRIGHT | SPF_RELATIVE, random(35,45), random(1,4), frandom(0,360), 0,0,0, frandom(0.2,12.0),frandom(-0.2,0.2),frandom(-6.0,6.0), 0,0,-0.1, 0.98, -1)
    TNT1 AA 0 A_CustomMissile("ExplosionSmokeSpawner", random(1,8), random(15,-15), random (0, 360), 2, random (0, 160))
	PLZM HIJKL 2 BRIGHT
    Stop
  }
}

ACTOR ChasmLieutTrail
{ 
	RenderStyle Add
	Scale 0.15
	Alpha 0.67
	+NOGRAVITY
	+BRIGHT
	States
	{
	Spawn:
		OGLO C 1 A_FadeOut
		OGLO C 1 A_SetScale(0.12)
		OGLO C 1 A_FadeOut
		OGLO C 1 A_SetScale(0.10)
		OGLO C 1 A_FadeOut
		OGLO C 1 A_SetScale(0.07)
		OGLO C 1 A_FadeOut
		OGLO C 1 A_SetScale(0.04)
		Stop
	}
}

Actor ChasmLieutFX
{   
  Radius 2
  Height 2
  +NoBlockMap
  +NoGravity
  +DontSplash
  +ForceXYBillboard
  RenderStyle Add
  Alpha 0.67
  Scale 0.10
  States
  {
  Spawn:
    TNT1 A 3 Bright
    PLZM MMMMM 1 BRIGHT
	PLZM MMMMM 1 A_FadeOut
    Stop 
  }
}