

Actor GoreCarrier : Glaucoma
{
Painchance "Mine", 128
Species "Ghoul"
Damagefactor "Acid", 3.5
Painchance Goreling, 0
Damagefactor Goreling, 0
Damagetype Acid
Health 3900
Speed 5.25
FloatSpeed 5.25
Radius 85
Height 100
Scale 2.25
+Boss
PainChance 18
Tag "\c[j3]Gore Carrier"
Mass 1590
BloodColor "Red"
SeeSound "gcarr/sight"
PainSound "gcarr/pain"
ActiveSound "gcarr/sight"
DeathSound "gcarr/death"
Obituary "A Gore Carrier assimilated %o into the Gorehive."
DropItem "BossLifeEssence" 190 45
DropItem "HEMArmorBonusMax30" 160
MONSTER
+NOGRAVITY
+FLOAT
+MISSILEMORE
 States
  {
   Spawn:
	 TNT1 A 0 
	 TNT1 A 0 A_GiveInventory("GHOULS",1)
   Idle:
    GLCA A 1
	TNT1 A 0 A_GiveInventory("Tic",1)
	TNT1 A 0 A_JumpIfInventory("Tic",175,"Overseer")
    GLCA A 1 A_Look
	TNT1 A 0 A_GiveInventory("Tic",1)
	TNT1 A 0 A_JumpIfInventory("Tic",175,"Overseer")
	Loop
   See:
    GLCA A 1 A_Chase
	GLCA AAA 1 A_Chase("","")
	TNT1 A 0 HealThing(4)
	TNT1 A 0 A_JumpIfInventory("Overseers",8,2)
    TNT1 A 0 A_Jump(35,"Overseer2")
	Loop
   Missile:
    TNT1 A 0 A_Jump(22,"SummonGlaucoma")
	TNT1 A 0 A_JumpIfInventory("Overseers",8,2)
    TNT1 A 0 A_Jump(100,"Overseer2")
	TNT1 A 0 A_Jump(100,"ConsumeRejections","SummonCorpses")
    GLCA BBBBBBBCCCCCC 1 A_FaceTarget(60,27)
    TNT1 A 0 A_FaceTarget(60,27)
	GLCA D 3 Bright
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(4)
	GLCA DD 0 Bright A_CustomMissile("GlaucomaGas",42,0,angle+RANDOM(-3,3),CMF_ABSOLUTEPITCH|CMF_ABSOLUTEANGLE ,pitch)
    TNT1 A 0 A_ChangeFlag(NoPain,0)
    TNT1 A 0 A_FaceTarget(60,27)
	GLCA D 3 Bright
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(4)
	GLCA DDD 0 Bright A_CustomMissile("GlaucomaGas",42,0,angle+RANDOM(-3,3),CMF_ABSOLUTEPITCH|CMF_ABSOLUTEANGLE ,pitch)
    TNT1 A 0 A_ChangeFlag(NoPain,0)
    TNT1 A 0 A_FaceTarget(60,27)
	GLCA D 3 Bright
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(4)
	GLCA DDD 0 Bright A_CustomMissile("GlaucomaGas",42,0,angle+RANDOM(-3,3),CMF_ABSOLUTEPITCH|CMF_ABSOLUTEANGLE ,pitch)
    TNT1 A 0 A_ChangeFlag(NoPain,0)
	End:
    GLCA D 4 Bright
    GLCA CBA 3 A_FaceTarget(60,27)
    Goto See
	SummonCorpses:
    GLCA BBBBBBBCCCCCC 1 A_FaceTarget(60,27)
    TNT1 A 0 A_FaceTarget(60,27)
	GLCA D 3
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(60)
	TNT1 A 0 A_ChangeFlag(NoPain,0)
	TNT1 AAAA 0 A_CustomMissile("CorpseSummonerGC",55,0,random(-60,60))
    GLCA D 6
    GLCA CBA 3 A_FaceTarget(60,27)
    Goto See
	Nope:
	TNT1 A 0 A_TakeInventory("Tic",9999)
	GoTo Idle
    Overseer:
	TNT1 A 0 A_JumpIfInventory("Overseers",8,"Nope")
	GLCA BC 6
	GLCA D 4
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(20)
	TNT1 A 0 A_CustomMissile("GoreOverseer",0,0,0,2)
	TNT1 A 0 A_GiveInventory("Overseers",1)
	TNT1 A 0 A_TakeInventory("Tic",9999)
	TNT1 A 0 A_ChangeFlag(NoPain,0)
	GLCA D 6
	GLCA CBA 4
	GoTo Idle
    Overseer2:
	GLCA BC 6
	GLCA D 4
    TNT1 A 0 A_ChangeFlag(NoPain,1)
	TNT1 A 0 DamageThing(20)
	TNT1 A 0 A_CustomMissile("GoreOverseer",0,0,0,2)
	TNT1 A 0 A_GiveInventory("Overseers",1)
	TNT1 A 0 A_ChangeFlag(NoPain,0)
	GLCA D 6
	GLCA CBA 4
	GoTo See
	SummonGlaucoma:
    GLCA BBBBBBBCCCCCC 1 A_FaceTarget(60,27)
    TNT1 A 0 A_FaceTarget(60,27)
	GLCA D 3 Bright
	TNT1 A 0 A_PainAttack("Glaucoma")
	GoTo End
   ConsumeRejections:
	GLCA BC 8
	GLCA DDDDDD 1 Bright A_SpawnItemEx("CarrierHealFX",0,0,44)
	TNT1 A 0 A_RadiusGive("ConsumeRejections",1000,RGF_MONSTERS)
	GLCA DDDD 1 Bright A_SpawnItemEx("CarrierHealFX",0,0,44)
	GLCA CBA 4
	GoTo See
   Melee:
    GLCA BC 5 A_FaceTarget
    GLCA D 5 A_MeleeAttack
    GLCA CB 5 A_FaceTarget
    Goto See
   Pain:
    GLCA E 3
    GLCA E 6 A_Pain
    Goto See
   Death:
   XDeath:
    TNT1 A 0 A_NoGravity
	TNT1 A 0 ThrustThingZ(0,3,0,0)
    GLCA EEEEE 4 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA EEE 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 2 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,-90)
	TNT1 A 0 A_CustomMissile("GhoulWingFX",54,0,0,2,90)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	GLCA E 1 A_CustomMissile("GhoulWingFX",54,0,random(0,360),2,random(-60,60))
	
	 TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("KaguneShard2",random(10,86),random(-14,14),random(0,360),2,random(90,15))
	 TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("BloodGas",49,0,random(0,360),2,random(25,-25))
    
	TNT1 A 0 A_Gravity
	TNT1 A 0 ThrustThingZ(0,random(-50,50),0,0)
	TNT1 A 0 A_Recoil(random(-50,50))
	TNT1 A 0 A_Explode(128,600,0,0,350)
	GLCA G 2 A_NoBlocking
    GLCX GAAB 1 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX B 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX B 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX B 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX B 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX C 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX C 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX C 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX C 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX C 1 A_PlaySound("Gore/Splat")
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX D 1 A_PlaySound("Gore/Splat")
    TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX D 1 A_PlaySound("Gore/Splat")
    TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX D 1 A_PlaySound("Gore/Splat")
    TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX D 1 A_PlaySound("Gore/Splat")
    TNT1 A 0 A_SpawnItemEx("GibbedGenerator",random(-80,80),random(-80,80),random(-80,80),0,0,0,0,128,0)
    GLCX D 1 A_PlaySound("Gore/Splat")
    GLCX D 3 
    GLCX E 3
    GLCX F -1
    Stop	
   Raise:
   XRaise:
    TNT1 A 0
	Stop
  }
}

Actor Overseers : Inventory { Inventory.MaxAmount 8 }

Actor OverseerShoot
{
  Radius 1
  Height 1
  Speed 0
  Damage 0
  +DontBlast
  +ThruActors
  +NoClip
  PROJECTILE
  RENDERSTYLE Normal
  ALPHA 1.0
 
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(OverseerAttacker,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor GorelingSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(Goreling,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor GorelingSummoner2 : OverseerShoot
{
 Speed 12
 -NoGravity
  States
  {
  Spawn:
  GLIN A 1 A_Jump(40,"Death")
  TNT1 A 0 A_Recoil(random(-1,-4))
  GLIN A 1 A_Jump(40,"Death")
  TNT1 A 0 A_Recoil(random(-1,-4))
  GLIN A 1 A_Jump(40,"Death")
  TNT1 A 0 A_Recoil(random(-1,-4))
  Death:
  GLIN A 1
   GLIN A 0 A_SpawnItemEx(Goreling,0,0,0,momx,momy,momz,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor CorpseSummonerGC : OverseerShoot
{
 Speed 40
 -Noclip
 +Thruactors
 -NoGravity
  States
  {
  Spawn:
  RJET M 1
  Loop
  Death:
  RJET M 1
   GLIN A 0 A_SpawnItemEx(DeadRejected,0,0,0,momx,momy,momz,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor OverseerAttacker
{
 Monster
 +NoGravity
 +NoClip
 +ThruActors
 +LookAllAround
   States
    {
	 Spawn:
	  TNT1 A 1
	  TNT1 AA 1 A_Look
	  Stop
	 See:
	  TNT1 A 1
	  TNT1 A 0 A_Jump(210,"Shot")
	  TNT1 A 0 A_CustomMissile("GorelingSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	 Shot:
	  TNT1 A 0
	  TNT1 A 0 A_CustomMissile("GlaucomaGas",0,0,0,2|CMF_TRACKOWNER,random(-12,12))
	  TNT1 A 0 A_CustomMissile("GlaucomaGas",0,0,0,CMF_TRACKOWNER)
	  Stop
  }
}

Actor Goreling
{
  obituary "%o fell before a Goreling."
  health 125
  radius 28
  height 24
  Scale 1.1
  mass 100
  speed 2.85
  PainChance 85
  seesound "blob/sight"
  painsound "blob/pain"
  activesound "blob/active"
  Damagetype Goreling
  Species "Ghoul"
  Damagefactor "Acid", 2.35
Damagefactor "Goreling", 0
  Damagefactor Glaucoma, 0
  Damagefactor GlaucomaGas, 0
  DamageFactor "SoulToxic", 0.0
  DamageFactor "Cacolich", 0.0
  MONSTER
  +FLOORCLIP
  +ThruSpecies
  +LOOKALLAROUND
   States
    {
	 Spawn:
      TNT1 A 0 A_GiveInventory("GHOULS",1)
	  GLIN A 8
	  GoTo Idle
	 Idle:
	  TNT1 A 0
	  GLIN GG 1 A_Look
	  GLIN G 1 A_Wander
	  GLIN BB 1 A_Look
	  GLIN B 1 A_Wander
	  GLIN CC 1 A_Look
	  GLIN C 1 A_Wander
	  GLIN BB 1 A_Look
	  GLIN B 1 A_Wander
	  TNT1 A 0 A_PlaySound("Blob/Walk")
	  TNT1 A 0 A_Chase("","",CHF_DONTMOVE|CHF_RESURRECT)
	  Loop
	 See:
	  GLIN GG 1 A_Chase("","",CHF_RESURRECT)
	  TNT1 A 0 A_Chase
	  GLIN BB 1 A_Chase("","",CHF_RESURRECT)
	  TNT1 A 0 A_Chase
	  GLIN CC 1 A_Chase("","",CHF_RESURRECT)
	  TNT1 A 0 A_Chase
	  GLIN BB 1 A_Chase("","",CHF_RESURRECT)
	  TNT1 A 0 A_PlaySound("Blob/Walk")
	  TNT1 A 0 A_Chase
	  Loop
	 Heal:
	  TNT1 A 0 A_Changeflag(NoDamage,1)
	  TNT1 A 0 A_Changeflag(NoPain,1)
	  TNT1 A 0 A_RadiusGive("ConsumeCorpse",30,RGF_MONSTERS,1)
	  TNT1 A 0 A_SpawnItemEx("GoreBuild",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	  TNT1 A 15
	  TNT1 A 0 A_Explode(2,41,0,0,41)
	  TNT1 A 0 A_SpawnItemEx("GoreBuild2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	  TNT1 A 35
	  TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,12,0,0,0,0,128,0)
      TNT1 A 0 A_PlaySound("Gore/Splat")
	  TNT1 A 0 A_Jump(128,"Ghoul")
	  TNT1 A 0 A_Jump(71,"Spore","Barricade")
	  TNT1 A 0 A_Jump(61,"Gorhul","FleshImp")
	  TNT1 A 0 A_CustomMissile("RejectedSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	  Ghoul:
	  TNT1 A 0 A_CustomMissile("Ghoul2Summoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	  Gorhul:
	  TNT1 A 0 A_CustomMissile("GhorulSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	  FleshImp:
	  TNT1 A 0 A_CustomMissile("FleshimpSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	  Spore:
	  TNT1 A 0 A_CustomMissile("SporeSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	  Barricade:
	  TNT1 A 0 A_CustomMissile("BarricadeSummoner",0,0,0,CMF_TRACKOWNER)
	  Stop
	 Melee:
	  TNT1 A 0 A_Die
	  GoTo Death
	 Death:
	  TNT1 AAAAA 0 A_CustomMissile("GlaucomaGas",24,0,random(0,360),2,-80)
	  TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,12,0,0,0,0,128,0)
      TNT1 A 0 A_PlaySound("Gore/Splat")
	  TNT1 A 2 A_Scream
	  Stop
   }
}


Actor RejectedSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(Rejected,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor Ghoul2Summoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(Ghoul2,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}
Actor FleshimpSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(BerserkerImp,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor GhorulSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(Ghorul,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor SporeSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(GrossSpore,0,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor BarricadeSummoner : OverseerShoot
{
  States
  {
  Spawn:
  TNT1 A 1
  Death:
  TNT1 A 1
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,0,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,45,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,90,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,135,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,180,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,225,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,270,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   TNT1 A 0 A_SpawnItemEx(FleshSpike,12,0,0,0,0,0,315,SXF_SETMASTER|SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION,0)
   Stop
  }
}

Actor FleshSpike : Stalagtite
{
 Scale 1.2
 Mass 1200
 +Shootable
  Species "Ghoul"
  Painchance "Mine", 256
  Damagefactor "Acid", 2.35
  Damagefactor Goreling, 0
  Damagefactor Glaucoma, 0
  Damagefactor GlaucomaGas, 0
  DamageFactor "SoulToxic", 0.0
  Obituary "%o was prickled by a Flesh Spike."
 Health 300
 BloodColor Red
 Radius 20
 Height 58
  States
   {
    Spawn:
	 FTR3 A 1
	 FTR3 A 1
	 Loop
	Death:
	 TNT1 A 0
	 TNT1 A 0 A_CustomMissile("GhoulWingFX",25,0,0,2,90)
	 TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("KaguneShard2",random(10,47),random(-14,14),random(0,360),2,random(90,15))
	 TNT1 A 1
	 Stop
   }
}
 

Actor GrossSpore : FleshSpike
{
 Scale 1.2
 Health 300
 Radius 20
 Height 58
 obituary "%o was infected by a Gross Spore."
  States
   {
    Spawn:
	 BGSB A 1
	 BGSB A 1 A_Jump(2,1)
	 Loop
	 BGSB ABBBBC 5
	 TNT1 A 0 A_PlaySound ("SporeGasRelease",0,1.0,0)
	 TNT1 AAAAAAAAAAAAAAAA 0 A_CustomMissile("BloodGas",49,0,random(0,360),2,random(25,-25))
	 BGSB D 5
	 Loop
	Death:
	 TNT1 A 0
	 TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,12,0,0,0,0,128,0)
	 TNT1 A 0 A_PlaySound("Gore/Splat")
	 TNT1 A 0 A_PlaySound ("SporeGasRelease",0,1.0,0)
	 TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("BloodGas",49,0,random(0,360),2,random(25,-25))
	 TNT1 A 1
	 Stop
   }
}


ACTOR BloodGas : PoisonEleBreath
{ 
	Scale 1
	Speed 10
	Alpha 1
	Renderstyle Add
	Species "Ghoul"
	DamageType "Glaucoma"
	Reactiontime 3
    States 
    { 
    Spawn: 
        NBM1 BCDE 3 A_Explode(2,68)
		Flight:
		NBM1 FFGHHIGGFGHI 3 A_Explode(2,68)
		TNT1 A 0 A_CountDown
		Loop
    Death: 
		NBM1 FEEEEDDDDCCCBBB 1 A_FadeOut(0.15)
        Stop 
		}
}
Actor ConsumeCorpse : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 
	"####" "#" 0 A_FadeOut(0.6)
	//"####" "#" 0 ACS_NAMEDEXECUTEALWAYS("RemoveThis")
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}
Actor Remover2 : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 A_FadeOut(0.6)
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}

Actor Rejections : Inventory {}

ACTOR Rejected
{
  Health 125
  Radius 18
  Height 56
  +DontHurtSpecies
  +DontHarmSpecies
  Species "Ghoul"
  Painchance "Mine", 256
  Damagefactor "Acid", 2.35
  Damagefactor Glaucoma, 0
  Damagefactor GlaucomaGas, 0
  DamageFactor "SoulToxic", 0.0
  DropItem "LifeEssence" 185 8
  DropItem "HEMArmorBonusMax3" 135
  Mass 200
  Damage (8)
  DamageType "Ghoul"
  Speed 3.35
  PainChance 128
  Monster
  Reactiontime 25
  +FLOORCLIP
  SeeSound "Rejected/Sight"
  PainSound "Rejected/Pain"
  DeathSound "Rejected/Death"
  ActiveSound "Rejected/Active"
  Obituary "%o was devoured by a Rejected."
  States
  {
  Spawn:
   TNT1 A 0 A_GiveInventory("GHOULS",1)
   TNT1 A 0 A_GiveInventory("Rejections",1)
   Idle:
    RJET A 1
    RJET A 1 A_Look
    Loop
  See:
    TNT1 A 0 A_ChangeFlag(NODROPOFF,1)
    RJET A 1 A_Chase
	RJET AAAA 1 A_Chase("","")
	RJET B 1 A_Chase
	RJET BBBB 1 A_Chase("","")
    TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
    RJET C 1 A_Chase
	RJET CCCC 1 A_Chase("","")
	RJET D 1 A_Chase
	RJET DDDD 1 A_Chase("","")
    TNT1 A 0 A_SpawnItemEx("HumanishStep2",0,0,2,0,0,-20)
    Loop
  Melee:
    RJET EF 3 A_FaceTarget
    RJET F 0 A_CustomMeleeAttack(8, "imp/melee") 
	RJET G 4 A_FaceTarget
    Goto See
  Missile:
    TNT1 A 0 A_ChangeFlag(NoTarget,1)
    TNT1 A 0 A_CustomMissile("BribeCaco",1,0,0,2,-90)
	RJET E 0 A_Jump(70,"Leap")
	RJET EEEEFFFF 1 A_FaceTarget(62,26)
	RJET G 1 Bright
	RJET G 1 Bright A_CustomMissile("GhoulGas",18,0,angle+RANDOM(-3,3),CMF_ABSOLUTEPITCH|CMF_ABSOLUTEANGLE ,pitch)
    RJET G 2 Bright
	RJET G 3
    Goto See
  Leap:
    TNT1 A 0 A_JumpIfCloser(200,1)
	GoTo See
	TNT1 A 0 A_ChangeFlag(NODROPOFF,0)
    RJET EEEFFF 1 A_FaceTarget
	TNT1 A 0 A_ChangeFlag(NoTarget,0)
	RJET GG 1 A_SkullAttack
	RJET G 20
	RJET G 2 A_Gravity
	TNT1 A 0 A_ChangeFlag(NODROPOFF,1)
	GoTo See
  Pain:
    TNT1 A 0 A_ChangeFlag(NoTarget,1)
    TNT1 A 0 A_ChangeFlag(NODROPOFF,1)
	TNT1 A 0 A_CustomMissile("BribeCaco",1,0,0,2,-90)
    RJET H 2
    RJET H 2 A_Pain
	TNT1 A 0 A_ChangeFlag(NoTarget,0)
    Goto See
  Death:
    TNT1 A 0 A_TakeInventory("Ghouls",1)
    RJET I 8
    RJET J 8 A_Scream
    RJET K 6
    RJET L 6 A_NoBlocking
    RJET M -1
    Stop
  Raise:
    TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    RJET MLKJIAA 8
    Goto See
	Death.Goreling:
	TNT1 A 0 A_JumpIfInventory("Ghouls",1,"See")
    TNT1 A 0 A_SpawnItemEx("BloodConsumeFX",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0
	TNT1 A 1
	Stop
  Death.Rejections:
	TNT1 A 0 A_PlaySound("weapons/dsgorsuc",0,1.0,0)
	TNT1 A 0 A_RadiusGive("ConsumedHeal",600,RGF_MONSTERS)
    TNT1 A 0 A_SpawnItemEx("BloodDriftFX",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("BloodConsumeFX",0,0,32,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0
	Stop
    
  }
}


Actor Ghoul2 : Ghoul
{
 Health 195
  States
   {
	Missile:
	 TNT1 A 0 A_Jump(16,"KakuHou")
	 TNT1 A 0 A_Jump(27,"Acid")
	 GHUL A 1 A_Jump(100,"RightCharge","LeftCharge")
	 TNT1 A 0 A_Jump(78,"Acid")
	 GoTo Charge
	Acid:
	 GHUL EEEEEFFF 1 A_FaceTarget(62,26)
	 GHUL G 1 Bright
	 GHUL GG 1 Bright A_CustomMissile("GhoulGas",18,0,angle,CMF_ABSOLUTEPITCH|CMF_ABSOLUTEANGLE ,pitch)
     GHUL G 2 Bright
	 GHUL G 2
	 GoTo See
   }
}



Actor GoreBuild
{
 Height 1
 Radius 1
 Scale 0.25
 +ClientSideOnly
 +NoBlockMap
 +NoInteraction
  States
   {
    Spawn:
	 WTFA A 1
	 WTFA A 1 A_SetScale(0.3,0.3)
	 WTFA A 1 A_SetScale(0.4,0.4)
	 WTFA A 1 A_SetScale(0.4,0.6)
	 WTFA A 1 A_SetScale(0.5,0.6)
	 WTFA A 1 A_SetScale(0.6,0.7)
	 WTFA A 1 A_SetScale(0.7,0.7)
	 WTFA A 1 A_SetScale(0.8,0.8)
	 WTFA A 4
	 WTFA A 1 A_SetScale(0.7,0.7)
	 WTFA A 1 A_SetScale(0.6,0.7)
	 WTFA A 1 A_SetScale(0.5,0.6)
	 WTFA A 1 A_SetScale(0.4,0.4)
	 WTFA A 1 A_SetScale(0.3,0.3)
	 WTFA A 1 A_SetScale(0.2,0.2)
	 WTFA A 1 A_SetScale(0.1,0.1)
	 WTFA A 1 A_FadeOut(0.2)
	 Wait
   }
}

Actor GoreBuild2
{
 Height 1
 Radius 1
 Scale 2.6
 Alpha 0
 +NoBlockMap
 +NoClip
 +ThruActors
  States
   {
    Spawn:
	 GEGG DDDEEFFFEE 1 A_FadeIn
	 GEGG D 3
	 GEGG E 2
	 GEGG F 3
	 GEGG D 3
	 GEGG E 2
	 GEGG F 3
	 GEGG D 3
	 GEGG E 2
	 GEGG F 3 
	 Stop
   }
}
Actor BloodConsumeFX : GoreBuild
{
 Height 1
 Radius 1
 Scale 2.7
 Renderstyle Add
 +NoGravity
  States
   {
    Spawn:
	 FGOR ABCDEFABCDEF 1 Bright
	 FGOR ABCDEFABCDEF 1 Bright A_FadeOut
	 Stop
   }
}
Actor BloodDriftFX : BloodConsumeFX
{
 Scale 1.25
  States
   {
    Spawn:
	 GDBX ABBCDE 2 Bright
	 GDBX FFGHI 2 Bright A_FadeOut
	 Stop
   }
}
Actor BloodSummonFX : BloodConsumeFX
{
  States
   {
    Spawn:
	 FGOR FEDCBAFEDCBA 1 Bright
	 FGOR FEDCBAFEDCBA 1 Bright A_FadeOut
	 Stop
   }
}
Actor GoreOverseer : OnibiCharge
{
 Renderstyle Normal
 Scale 1.25
 Health 750
 Height 22
 Radius 22
 BloodColor Red
 Damage (35)
 -NoBlood
  Damagefactor "Acid", 2.35
Damagefactor "Goreling", 0
  Damagefactor Glaucoma, 0
  Damagefactor GlaucomaGas, 0
  DamageFactor "SoulToxic", 0.0
  DamageFactor "Cacolich", 0.0
  +NoTargetSwitch
  +NoDamage
  +ThruActors
  +Shootable  
 Species "Ghoul"
 States
  {
   Spawn:
	CEY0 ABCDEF 1 Bright A_Warp(AAPTR_TARGET,112,0,44,15,WARPF_USECALLERANGLE|WARPF_NOCHECKPOSITION  )
	TNT1 A 0 A_ChangeFlag(NoDamage, 0)
	TNT1 A 0 A_JumpIfInventory("Tic",6,2)
	TNT1 A 0 A_GiveInventory("Tic",1)
	Loop
	TNT1 A 0 A_Jump(100,1)
	Loop
	TNT1 A 0 A_Jump(12,"Heals")
	TNT1 A 0 A_TakeInventory("Tic",999)
	TNT1 A 0 DamageThing(5)
	TNT1 A 0 A_CustomMissile("OverseerShoot",12,0,0,2|CMF_TRACKOWNER)
	Loop
	 Heals:
	  TNT1 A 0 A_RadiusGive("OverseerRemove",120,RGF_MONSTERS)
	  TNT1 A 0 A_RadiusGive("OverseerHeal",120,RGF_MONSTERS)
	  TNT1 A 0 A_SpawnItemEx("GlaucomaHealFX",0,0,12)
      TNT1 A 0 A_SpawnItemEx("BloodConsumeFX",0,0,12,0,0,0,0,SXF_NOCHECKPOSITION)
      TNT1 A 0 A_SpawnItemEx("BloodDriftFX",0,0,12,0,0,0,0,SXF_NOCHECKPOSITION)
	  Stop
   Death:
	  TNT1 A 0 A_RadiusGive("OverseerRemove",120,RGF_MONSTERS)
    TNT1 AAAA 0 A_CustomMissile("GorelingSummoner2",0,0,random(0,360),2|CMF_TRACKOWNER,random(90,-90))
    TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,12,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("Gore/Splat")
	TNT1 A 1
	Stop
  }
}

Actor ConsumeRejections : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 
	"####" "#" 0 A_JumpIfInventory("Rejections",1,"PickUp.Yes")
	Stop
	PickUp.Yes:
	"####" "#" 0 A_Die("Rejections")
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}

Actor OverseerRemove : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 
	"####" "#" 0 A_TakeInventory("Overseers",1)
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}

Actor ConsumedHeal : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 
	"####" "#" 0 HealThing(75)
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}

Actor OverseerHeal : CustomInventory
{
 +INVENTORY.ALWAYSPICKUP
 States
  {
   PickUp:
	"####" "#" 0 
	"####" "#" 0 HealThing(250)
	Stop
   PickUp.No:
    "####" "#" 0
	Stop
  }
}

ACTOR DeadRejected : Rejected
{
  States
  {
  Spawn:
   TNT1 A 0
   TNT1 A 1 A_Die("Corpsed")
   Loop
   Death.Corpsed:
   RJET M -1
   Stop
  Raise:
    Goto Super::RAISE
  }
}