
// LORD OF THE ABYSS
/*
*/
ACTOR RLArmageddonBaronOfHell : RLBaronOfHellBase 16561
{
  Health 1750 
  GibHealth -175
  Mass 5500
  BloodType "RLNashGore_Blood", "RLMNullActor", "RLNashGore_SlashBlood"
  Bloodcolor "DarkGreen"
  
  MinMissileChance 20
  PainChance 40
  
  DamageFactor "Fire", 0.8
  DamageFactor "Plasma", 0.8
  
  SeeSound "lordoftheabyss/sight"
  PainSound "lordoftheabyss/pain"
  DeathSound "lordoftheabyss/death"
  ActiveSound "lordoftheabyss/active"
  
  -COUNTKILL
  
  Obituary "%o fell before the mighty Lord of the Abyss."
  HitObituary "%o was turned into a leather coat by a Lord of the Abyss."
  Tag "Lord of the Abyss"
    //$category "MP Armageddon"
  States
  {
  Spawn:
    ABAR C Random(9,10) A_Look
    Goto Spawn
	
  See:
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 8+frandom(-1,1),12+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR AABB 3 A_Chase
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 8+frandom(-1,1),-12+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR CCDD 3 A_Chase
    Loop
	
  MissileHatredOnUniqueEffect: // [incoherent tantrum sounds]
    "####" "#" 0 A_PlaySound ("lordoftheabyss/sight", CHAN_VOICE)
    "####" "#" 0 A_Jump (256, "MissileHatredOnUniqueDone")
	Goto MissileHatredOnUniqueDone
  MeleeHatredOnUniqueEffect: // [incoherent tantrum sounds]
    "####" "#" 0 A_PlaySound ("lordoftheabyss/sight", CHAN_VOICE)
    "####" "#" 0 A_Jump (256, "MeleeHatredOnUniqueDone")
	Goto MeleeHatredOnUniqueDone
	
  MissileProper:
    TNT1 A 0 A_JumpIfCloser(380, 1)
    Goto Melee
    TNT1 A 0 A_JumpIfInventory ("RLLordoftheAbyssFlamethrowerCooldown", 1, "Melee")
    TNT1 A 0 A_Jump (80, "Lunge")
  Flamethrower:
    TNT1 A 0 A_GiveInventory ("RLLordoftheAbyssFlamethrowerCooldown", 1)
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),15+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-10+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR II 4 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    ABAR I 1 A_FaceTarget
    ABAR J 1 Bright A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_CustomMissile("RLLordOfTheAbyssFlamethrowerFlame",38,15,frandom(-6,6))
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),17+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-14+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR I 1 A_FaceTarget
    ABAR I 10 A_FaceTarget
    Goto See
	
  Lunge:
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),17+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-14+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR E 5 A_FaceTarget
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_Recoil(-40)
    TNT1 A 0 A_PlaySound("skeleton/swing", 7)
    ABAR F 5
    ABAR F 5 A_ScaleVelocity (0.8)
    TNT1 A 0 A_Stop
    ABAR G 5 A_CustomMissile("RLLordOfTheAbyssLunge", 32, 0, 0, CMF_AIMDIRECTION)
    ABAR H 10
    TNT1 A 0 A_Jump (80, 1)
    Goto See
    ABAR I 4 A_FaceTarget
    TNT1 A 0 A_PlaySound("lordoftheabyss/attackgrowl", CHAN_VOICE, 1, 0, 0.8)
    ABAR KKK 6 A_FaceTarget
    ABAR I 4 A_FaceTarget
    Goto Flamethrower+2
	
  MeleeProper:
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),17+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-14+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR EF 6 A_FaceTarget
    ABAR G 6 A_CustomComboAttack("RLLordoftheAbyssPlasmaBall", 32, 20 * random(2, 5), "baron/melee")
    ABAR H 4 A_FaceTarget
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),17+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-14+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR EF 6 A_FaceTarget
    ABAR G 6 A_CustomComboAttack("RLLordoftheAbyssPlasmaBall", 32, 20 * random(2, 5), "baron/melee")
    ABAR H 4 A_FaceTarget
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 12+frandom(-1,1),17+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLLordoftheAbyssFootFire", 2+frandom(-1,1),-14+frandom(-1,1),0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    ABAR EF 6 A_FaceTarget
    ABAR G 6 A_CustomComboAttack("RLLordoftheAbyssPlasmaBall", 32, 20 * random(2, 5), "baron/melee")
    ABAR H 4 A_FaceTarget
    Goto See
	
  PainMain:
    ABAR M 2
    ABAR M 2 A_Pain
    Goto See
	
  XDeathMain:
  DeathMain:
    TNT1 A 0 A_BossDeath
    TNT1 A 0 A_GiveInventory ("RLArmageddonBaronOfHellKillIncrementer", 1, AAPTR_PLAYER1) // Used for tallying total kills and bestiary info
    TNT1 A 0 A_PlaySound("lordoftheabyss/death", CHAN_BODY, 1, 0, 0.9)
    ABAR K 35 A_FaceTarget
    ABA2 A 4 Bright A_NoBlocking
    ABA2 B 4 Bright
	TNT1 A 0 A_JumpIf(CallACS("DRLA_MonsterQuake") == 0, 3)
    TNT1 A 0 A_Quake (1, 18, 0, 1024, "")
    TNT1 A 0 A_Quake (4, 12, 0, 256, "")
    TNT1 A 0 A_SpawnItemEx ("RLReducedGibber", 0,0,0, VelX,VelY,VelZ, 0, SXF_ABSOLUTEMOMENTUM | SXF_USEBLOODCOLOR | SXF_NOCHECKPOSITION)
    TNT1 A 0 A_PlaySound("lordoftheabyss/deathexplosion", CHAN_BODY, 1, 0, 0.7)
    ABA2 CDEFGHI 4 Bright
    TNT1 A 0 A_SpawnItemEx ("RLSkullOfTheAbyss", 0,0,24, 0,0,0, 0, SXF_NOCHECKPOSITION | SXF_TRANSFERPOINTERS, 0, tid)
    ABA2 J 4
	TNT1 A 0
    "####" "#" 0 A_Jump(256, "DestroyedEnd")
    Goto DestroyedEnd
  SimpleXDeathMain:
    TNT1 A 0 A_BossDeath
    TNT1 A 0 A_GiveInventory ("RLArmageddonBaronOfHellKillIncrementer", 1, AAPTR_PLAYER1) // Used for tallying total kills and bestiary info
    ABA2 A 4 Bright A_NoBlocking
    ABA2 BCDEFGHIJ 4 Bright
	TNT1 A 0
    "####" "#" 0 A_Jump(256, "DestroyedEnd")
    Goto DestroyedEnd
  DeathFrame:
    TNT1 A 0 A_BossDeath
    "####" "#" 0 A_Jump(256, "DestroyedEnd")
    Goto DestroyedEnd
	
	//Ice
  GenericFreezeDeath:
	"####" "#" 0 A_GiveInventory ("RLArmageddonBaronOfHellKillIncrementer", 1, AAPTR_PLAYER1) // Used for tallying total kills and bestiary info
    "####" "#" 0 A_Jump(256, "GenericFreezeMana")
    Goto GenericFreezeMana
	
  Raise:
    Stop
	
  CrushDRLA:
    TNT1 A 0 A_StopSound(6)
    TNT1 A 30 A_SpawnItemEx("RLCrushedMediumGreen",0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    "####" "#" 0 A_BossDeath
    "####" "#" 0 A_Jump(256, "CrushEnd")
    Goto CrushEnd
//==============================================================================
//					--	DOOMRL ARSENAL STUFF  --
//==============================================================================
  Pain.RigelBlast:
    TNT1 A 0 A_PlaySound("weapons/dn2gunhit", CHAN_BODY)
    D2F2 V 2 Bright
    Goto See
  Pain.NeuralStun:
    D2F2 B 2 Bright
    Goto See
  Pain.CyberDisruptor:
    TNT1 A 0
    Goto Pain.LightningBlue
	
  Death.NeuralStun:
    TNT1 A 0
    Goto Death
  Death.RigelBlast:
    TNT1 A 0 A_BossDeath
    TNT1 A 0 A_GiveInventory ("RLDuke2Score", 4000, AAPTR_TARGET)
    TNT1 A 0 A_GiveInventory ("RLArmageddonBaronOfHellKillIncrementer", 1, AAPTR_PLAYER1) // Used for tallying total kills and bestiary info
    TNT1 A 0 A_PlaySound("weapons/dn2gunexplosion", CHAN_BODY)
    TNT1 A 0 A_NoBlocking
    TNT1 A 0 A_SpawnItemEx ("RLDuke2BasicEnemyExplosions", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 35
    Stop
  XDeath.RigelBlast:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_Gibs"), 1)
	Goto Death.RigelBlast
    TNT1 A 0 A_BossDeath
    TNT1 A 0 A_GiveInventory ("RLDuke2Score", 4000, AAPTR_TARGET)
    TNT1 A 0 A_GiveInventory ("RLArmageddonBaronOfHellKillIncrementer", 1, AAPTR_PLAYER1) // Used for tallying total kills and bestiary info
    TNT1 A 0 A_PlaySound("weapons/dn2gungib", CHAN_BODY)
    TNT1 A 0 A_NoBlocking
    TNT1 A 0 A_SpawnItemEx ("RLDuke2BasicEnemyExplosions", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx ("RLDuke2Gibber", 0,0,0, VelX,VelY,VelZ, 0, SXF_ABSOLUTEMOMENTUM | SXF_NOCHECKPOSITION)
    TNT1 A 35
    Stop
	
//==============================================================================
//					--	Special Monster Attacks  --
//==============================================================================
  ShadowAuraMissileAttack:
    ABAR EF 6 A_FaceTarget
    TNT1 AAAA 0 A_CustomMissile ("RLLordoftheAbyssPlasmaBall", 32, 0, frandom(-5,5), CMF_OFFSETPITCH, frandom(-5,5))
    ABAR G 6 A_CustomComboAttack("RLLordoftheAbyssPlasmaBall", 32, 20 * random(2, 5), "baron/melee")
    ABAR H 4 A_FaceTarget
    Goto See
	
//==============================================================================
//					--	Final Doomer Compatibility Stuff  --
//==============================================================================
  DeathXSparkFrame:
    "####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
    "####" "#" 0 A_DropItem("MajorManaPod",-1,54)
    ABAR M 0 A_BossDeath
    "####" "#" 0 A_Jump(256, "DeathXSpark")
	Goto DeathXSpark
	
//==============================================================================
//					--	Guncaster Compatibility Stuff  --
//==============================================================================
	MidasFrame1:
		ABAR M 0 A_SpawnItemEx("Midas_Statue_BaronOfHell", 0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS|SXF_TRANSFERSPRITEFRAME)
		TNT1 A 0 A_JumpIf(1, "DestroyedEnd")
		Goto DestroyedEnd
	MidasFrame2:
		ABAR M 0 A_SpawnItemEx("Midas_Statue_BaronOfHell", 0,0,0, frandom(-10.0,-12.0),0,frandom(1.0,3.0), 0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSPRITEFRAME)
		TNT1 A 10 A_KillChildren
		TNT1 A 0 A_JumpIf(1, "DestroyedEnd")
		Goto DestroyedEnd
	MidasFrame3:
		ABAR M 0 A_SpawnItemEx("Midas_Statue_BaronOfHell", 0,0,0, frandom(-15.0,-20.0),0,frandom(10.0,15.0), 0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSPRITEFRAME)
		TNT1 A 10 A_KillChildren
		TNT1 A 0 A_JumpIf(1, "DestroyedEnd")
		Goto DestroyedEnd
		
	//Gumpop
	Death.Acid:
		ABAR M 1 A_ChangeFlag("SOLID",0)
		"####" "#" 1 A_Playsound("Gumpop/Expand",5)
		"####" "###################################" 1 A_SetScale(ScaleX+frandom(0.01,0.025))
		"####" "#" 1 A_Playsound("Gumpop/Pop",5)
		"####" "#" 0 A_Jump(256,"XDeathMain")
		Goto XDeathMain
		
	//Thunderstruck
	Pain.Lightning:
		"####" "#" 0 A_Jump(164,1)
		Goto Pain
		ABAR M 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
		"####" "#" 0 A_Jump(256,"LightningLock")
		Goto LightningLock
		
	//Cauterizer
	Pain.LightningBlue:
		"####" "#" 0 A_Jump(48,1)
		Goto Pain
		ABAR M 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
		"####" "#" 0 A_Jump(256,"BlueLightningLock")
		Goto BlueLightningLock
		
		// Overwrite these for monsters that do not leave corpses behind
	//Dreadful
	Death.Tiberium:
		"####" "#" 0 A_Jump(256, "Death")
		Goto Death
	Death.BlueTiberium:
		"####" "#" 0 A_Jump(256, "Death")
		Goto Death
	//Fire and Lightning
	Death.Fire:
		"####" "#" 0 A_Jump(256,"Death")
		Goto Death
  }
}

ACTOR RLLordoftheAbyssFootFire
{
  Radius 2
  Height 2
  +NOGRAVITY
  +NOINTERACTION
  +NOCLIP
  +NOTIMEFREEZE
  +MOVEWITHSECTOR
  RenderStyle Add
  Alpha 0.98
  Scale 0.8
  States
  {
  Spawn:
    TNT1 A 0
    ABAF ABCDEFGABCDEFGABCDEFG 2 Bright
    ABAF HIJ 3 Bright
    Stop
  }
}

ACTOR RLLordOfTheAbyssPlasmaBall : RLBaronOfHellPlasmaBall
{
   Radius 9
   Height 16
   Speed 38
   FastSpeed 42
   RenderStyle Add
   Alpha 0.98
   +THRUGHOST
   +NOTIMEFREEZE
   +BLOODSPLATTER
   Decal "Scorch"
   Damage 10
   DamageType "Plasma"
   PainType "HellNobleFire"
   DeathType "HellNobleFire"
   SeeSound "lordoftheabyss/attack"
   DeathSound "lordoftheabyss/impact"
  States
  {
  Spawn:
    ABAX AB 4 Bright
    Goto Spawn
  Death:
    ABAX CDEFG 3 Bright
    Stop
  }
}

ACTOR RLLordOfTheAbyssPlasmaBall2 : RLLordOfTheAbyssPlasmaBall
{
   Speed 30
   FastSpeed 30
}

Actor RLLordOfTheAbyssFlamethrowerFlame
{
  Radius 2
  Height 4
  Speed 26
  Damage (5)
  Alpha 0.67
  Scale 0.67
  Projectile
  RenderStyle Add
  Damagetype "Plasma"
  PainType "HellNobleFire"
  DeathType "HellNobleFire"
  +THRUGHOST
  +DONTHARMSPECIES
  +BLOODSPLATTER
  Decal "RevenantScorch"
  SeeSound "rlmonsters/flamethrower"
  DeathSound "rlmonsters/flamethrowerhit"
  States
  {
  Spawn:
    TNT1 A 2
    PFRX ABCD 2 bright A_Explode(3, 8, 0)
    TNT1 A 0 A_LowGravity
    PFRX EFG 2 bright A_Explode(3, 16, 0)
    PFRX HIJ 2 bright A_Explode(3, 32, 0)
    PFRX KLM 2 bright A_Explode(3, 64, 0)
    PFRX NO 2 bright
    Stop
  Death:
    PFRX HIJ 2 bright A_Explode(3, 32, 1)
    PFRX KLM 2 bright A_Explode(3, 64, 1)
    PFRX NO 2 bright
    Stop
  }
}

ACTOR RLLordoftheAbyssFlamethrowerCooldown : Powerup
{
	Powerup.Duration -10
   +INVENTORY.UNTOSSABLE
}

ACTOR RLSkullOfTheAbyss : RLLostSoulBase
{
  Health 80
  
  MinMissileChance 25
  
  Damage (20 * random(1, 3))
  DamageType "Melee"
  PainType "BluntMelee"
  DeathType "BluntMelee"
  
  DamageFactor "Bullet", 0.5
  DamageFactor "Fire", 0.25
  DamageFactor "Plasma", 0.8
  
  SeeSound ""
  AttackSound ""
  PainSound "lordoftheabyss/pain"
  DeathSound ""
  ActiveSound "lordoftheabyss/active"
  
  +QUICKTORETALIATE
  +COUNTKILL
  +NOINFIGHTING
  +THRUSPECIES
  +BRIGHT
  
  Species "RLHellNoble"
  Obituary "%o almost defeated a Lord of the Abyss. Almost."
  Tag "Skull of the Abyss"
  
	// Guncaster compatibility
	DropItem "Emerald"
	DropItem "Emerald"
	DropItem "Emerald"
  States
  {
  Spawn:
    ASKL AB Random(5,6) Bright A_Look
    Loop
  See:
    ASKL A 3 Bright A_Chase ("", "Missile")
    ASKL B 3 Bright A_Chase ("", "Missile")
    Loop
  Missile:
//    TNT1 A 0 A_JumpIf(CallACS("DRPGCheck"), "DoorpegAuraFun")
  MissileAuraCheckDone:
    ASKL C 3 Bright A_FaceTarget
    ASKL D 3 Bright A_SkullAttack
    TNT1 A 0 A_PlaySound("lordoftheabyss/attackgrowl", CHAN_BODY)
	Goto MissileLoop
  MissileLoop:
    TNT1 A 0 A_FaceTarget
    ASKL C 3 Bright A_SkullAttack
    TNT1 A 0 A_FaceTarget
    ASKL D 3 Bright A_SkullAttack
    Goto MissileLoop
  PainMain:
    ASKL E 3 Bright
    ASKL E 3 Bright A_Pain
    Goto See
  DeathMain:
    TNT1 A 0 A_PlaySound("lordoftheabyss/death", CHAN_BODY, 1, 0, 0.9)
    ASKL F 6 Bright
    ASKL G 6 Bright
    ASKL H 6 Bright
	TNT1 A 0 A_JumpIf(CallACS("DRLA_MonsterQuake") == 0, 3)
    TNT1 A 0 A_Quake (1, 18, 0, 1024, "")
    TNT1 A 0 A_Quake (4, 12, 0, 256, "")
    TNT1 A 0 A_PlaySound("lordoftheabyss/deathexplosion", CHAN_BODY, 1, 0, 0.7)
    ASKL I 6 Bright A_NoBlocking
    ASKL J 6
    ASKL K 6
    ASKL L 6
	TNT1 A 0
    Stop // cease the existering
//==============================================================================
//					--	DOOMRL ARSENAL STUFF  --
//==============================================================================
  Death.Massacre:
    TNT1 A 0 A_NoBlocking
    Stop
  Pain.RigelBlast:
    TNT1 A 0 A_PlaySound("weapons/dn2gunhit", CHAN_BODY)
    D2F1 J 2 Bright
    Goto See
  Pain.NeuralStun:
    D2F1 J 2 Bright
    Goto See
  Death.RigelBlast:
    TNT1 A 0 A_PlaySound("weapons/dn2gunexplosion", CHAN_BODY)
    TNT1 A 0 A_NoBlocking
    TNT1 A 0 A_SpawnItemEx ("RLDuke2MediumExplosion", 0,0,16, 0,0,0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 35
    Stop
//==============================================================================
//					--	DRPG Compatibility Stuff  --
//==============================================================================
  DoorpegAuraFun:
    TNT1 A 0 ACS_NamedExecuteAlways("GetAuraTokens", 0)
	Goto MissileAuraCheckDone
//==============================================================================
// Check for Shadow Aura
  DoorpegShadowAuraAttack:
    ASKL CD 4 Bright A_SkullAttack
    TNT1 A 0 A_JumpIf(Abs(VelX) <= 0.01 || Abs(VelY) <= 0.01 || Abs(VelZ) <= 0.01, "See")
    Goto DoorpegShadowAuraAttack
//==============================================================================
//					--	Guncaster Compatibility Stuff  --
//==============================================================================
	MidasFrame1:
		ASKL E 0 A_SpawnItemEx("Midas_Statue_LostSoul", 0,0,0, 0,0,0, 0,SXF_TRANSFERPOINTERS|SXF_TRANSFERSPRITEFRAME)
		Stop
	MidasFrame2:
		ASKL E 0 A_SpawnItemEx("Midas_Statue_LostSoul", 0,0,0, frandom(-10.0,-12.0),0,frandom(1.0,3.0), 0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSPRITEFRAME)
		TNT1 A 10 A_KillChildren
		stop
	MidasFrame3:
		ASKL E 0 A_SpawnItemEx("Midas_Statue_LostSoul", 0,0,0, frandom(-15.0,-20.0),0,frandom(10.0,15.0), 0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSPRITEFRAME)
		TNT1 A 10 A_KillChildren
		Stop
		
	//Gumpop
	Death.Acid:
		ASKL E 1 A_ChangeFlag("SOLID",0)
		"####" "#" 1 A_Playsound("Gumpop/Expand",5)
		"####" "###################################" 1 A_SetScale(ScaleX+frandom(0.01,0.025))
		"####" "#" 1 A_Playsound("Gumpop/Pop",5)
		"####" "#" 0 A_Jump(256,"XDeathMain")
		Goto XDeathMain
		
	//Thunderstruck
	Pain.Lightning:
		"####" "#" 0 A_Jump(164,1)
		Goto Pain
		ASKL E 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
		"####" "#" 0 A_Jump(256,"LightningLock")
		Goto LightningLock
		
	//Cauterizer
	Pain.LightningBlue:
		"####" "#" 0 A_Jump(48,1)
		Goto Pain
		ASKL E 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
		"####" "#" 0 A_Jump(256,"BlueLightningLock")
		Goto BlueLightningLock
		
		// Overwrite these for monsters that do not leave corpses behind
	//Dreadful
	Death.Tiberium:
		"####" "#" 0 A_Jump(256, "Death")
		Goto Death
	Death.BlueTiberium:
		"####" "#" 0 A_Jump(256, "Death")
		Goto Death
	//Fire and Lightning
	Death.Fire:
		"####" "#" 0 A_Jump(256,"Death")
		Goto Death
  }
}

ACTOR RLCCArmageddonBaronOfHell : RLArmageddonBaronOfHell
{
  DeathSound "lordoftheabyss/deathexplosion"
  +TOUCHY
  States
  {
  Spawn:
    ABAR C 10 A_Look
    Loop
  See:
    ABAR AABBCCDD 4
    Loop
  Missile:
    ABAR EFG 6
    ABAR H 4
    Goto See
  Melee:
    ABAR I 20
    ABAR J 3 Bright
    ABAR I 1
    ABAR J 3 Bright
    ABAR I 1
    ABAR J 3 Bright
    ABAR I 1
    ABAR J 3 Bright
    ABAR I 1
    ABAR J 3 Bright
    ABAR I 20
    Goto See
  Death:
    ABA2 A 4 Bright A_Scream
    ABA2 B 4 Bright A_NoBlocking
    ABA2 CDEFGHI 4 Bright
    ABA2 J 4
    Stop
  }
}

ACTOR RLCCSkullOfTheAbyss : RLSkullOfTheAbyss
{
  SeeSound "lordoftheabyss/active"
  DeathSound "lordoftheabyss/deathexplosion"
  +TOUCHY
  States
  {
  See:
    ASKL A 3 Bright A_Chase
    ASKL B 3 Bright A_Chase
    Loop
  Melee:
    Stop
  Missile:
    ASKL C 3 Bright
    ASKL D 3 Bright
    ASKL C 3 Bright
    ASKL D 3 Bright
    ASKL C 3 Bright
    ASKL D 3 Bright
    ASKL C 3 Bright
    ASKL D 3 Bright
	Goto See
  Death:
    ASKL F 6 Bright
    ASKL G 6 Bright
    ASKL H 6 Bright
    ASKL I 6 Bright A_NoBlocking
    ASKL J 6
    ASKL K 6
    ASKL L 6
    Stop
  }
}
