
ACTOR RLMancubusBase : RLMonster
{
  Health 600
  GibHealth -100
  Radius 48
  Height 64
  Speed 8
  Mass 1000
  
  PainChance 80
  
  DamageFactor "Maser", 1.2 // Final Doomer Damagetype
  DamageFactor "Scrapper", 3.0 // LegenDoom Damagetype
  
  SeeSound "fatso/sight"
  PainSound "fatso/pain"
  DeathSound "fatso/death"
  ActiveSound "fatso/active"
  
  +FLOORCLIP
  +BOSSDEATH
  
  Obituary "%o was incinerated by a Mancubus."
  Species "RLMancubus"
  Tag "Mancubus"
  
	//Guncaster extras
	
   	//Resist & Weaknesses
	DamageFactor CloseCombat, 0.6
	DamageFactor Shoelaces, 0.6
	DamageFactor SuperCloseCombat, 0.6
	DamageFactor SuperShoelaces, 0.6
	DamageFactor SuperMidasCloseCombat, 0.6
	DamageFactor SuperMidasShoelaces, 0.6
	DamageFactor Meteorfist, 1.2
	DamageFactor Acid, 1.25
	DamageFactor Pound, 3.0
	DamageFactor Manuel, 1.25
	DamageFactor Crow, 1.2
	DamageFactor Crow2, 1.2
 
	//Chance Effects
	PainChance Lightning, 144
	PainChance LightningBlue, 16
	PainChance Manuel, 120
	PainChance Fire, 80
  States
  {	
  TeleportEscape: // Summoned DRPG monsters will teleport out if you kill them with the console
    TNT1 A 0 A_BossDeath
    TNT1 A 0 A_SpawnItemEx ("TeleportFog", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION)
    Stop
//==============================================================================
//					--	GunCaster Compatibility Stuff  --
//==============================================================================
// Override death states to drop the larger mana items in Guncaster
  Death:
    "####" "#" 0 A_StopSound(5)
    "####" "#" 0 A_StopSound(6)
    "####" "#" 0 A_StopSound(7)
    "####" "#" 0 A_StopSound(CHAN_ITEM)
    "####" "#" 0 A_StopSound(CHAN_WEAPON)
    "####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
	"####" "#" 0 A_DropItem("MajorManaPod",-1,224)
    "####" "#" 0 A_JumpIf(1, "DeathMain")
    Goto DeathMain
  XDeath:
    "####" "#" 0 A_StopSound(5)
    "####" "#" 0 A_StopSound(6)
    "####" "#" 0 A_StopSound(7)
    "####" "#" 0 A_StopSound(CHAN_ITEM)
    "####" "#" 0 A_StopSound(CHAN_WEAPON)
    "####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
	"####" "#" 0 A_DropItem("MajorManaPod",-1,224)
    "####" "#" 0 A_JumpIf(1, "XDeathMain")
    Goto XDeathMain
	
	GenericFreezeMana:
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,54)
		"####" "#" 0 A_BossDeath
		"####" "#" 0 A_JumpIf(1,"GenericFreezeDeathMain")
		Goto GenericFreezeDeathMain

//------------------------------------------------------------------------------

	Death.MidasCloseCombat:
	Death.MidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_JumpIfInTargetInventory("Mana",0,2)
		TNT1 A 0 A_DropItem("MajorManaPod",-1,54)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_BossDeath
		TNT1 A 0 A_JumpIf(1, "MidasFrame1")
		Goto MidasFrame1
		
	//Scourgebreath
	Death.Breath:
		"####" "#" 0 A_StopSound(5)
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,54)
		"####" "#" 0 A_BossDeath
		"####" "#" 0 A_JumpIf(1,"DeathBreathContinue")
		Goto DeathBreathContinue
		
			//Corpseblast
	CorpseBlastA:
		"####" "#" 0 A_SpawnItemEx("MancubusBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Stop
	CorpseBlastB:
		"####" "#" 0 A_SpawnItemEx("MancubusBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		"####" "#" 0 A_JumpIf(1,"DeathEnd")
		Goto DeathEnd
	CorpseBlastC:
		"####" "#" 0 A_SpawnItemEx("MancubusBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		"####" "#" 0 A_JumpIf(1,"XDeathEnd")
		Goto XDeathEnd
  }
}
