ACTOR BrutalGuncastBruiserBaron : BaronOfHell2 Replaces BaronOfHell2
{
	//Loot
	DropItem Emerald
	
	//Resists & Weaknesses
	
	//Same ordeal as with Hellknight.
	
	DamageFactor Acid, 0.8
	
	//PAAAAAIN
	PainChance 50
	PainChance Crow, 2
	PainChance Crow2, 2

	//Guaranteed Effects
	PainChance SuperCloseCombat, 256
	PainChance SuperShoelaces, 256
	PainChance SuperMidasCloseCombat, 256
	PainChance SuperMidasShoelaces, 256
	PainChance Acid, 256
	PainChance Meteorfist, 256
	
	//Chance Effects
	PainChance Lightning, 96
	PainChance LightningBlue, 16
	PainChance Manuel, 50
	PainChance Fire, 50
	
	var int User_DeathByFire;
	var int User_DeathByTiberium;
	var int User_DeathByBlueTiberium;
	var int User_LightningLock;
	var int User_Smoke;
	var int User_SmokeLoop;
	
	States
	{
	//Melee
	Pain.SuperCloseCombat:
	Pain.SuperMidasCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-6.0,-9.0),0,frandom(1.0,3.0),CVF_RELATIVE)
		Goto Pain
	Pain.SuperShoelaces:
	Pain.SuperMidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-10.0,-14.0),0,frandom(7.0,10.0),CVF_RELATIVE)
		Goto Pain.Kick
	Death.SuperCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-6.0,-9.0),0,frandom(1.0,3.0),CVF_RELATIVE)
		TNT1 A 0 A_Jump(64,"Death.SSG")
		Goto XDeath
	Death.SuperShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-10.0,-14.0),0,frandom(7.0,10.0),CVF_RELATIVE)
		TNT1 A 0 A_Jump(64,"Death.SSG")
		Goto XDeath
	Death.MidasCloseCombat:
	Death.MidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_BaronOfHell",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS|SXF_TRANSFERSCALE) //SXF_TRANSFERSPRITEFRAME|SXF_SETMASTER)
		TNT1 A 5 A_BossDeath
		Stop
	Death.SuperMidasCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_BaronOfHell",0,0,0,frandom(-6.0,-9.0),0,frandom(1.0,3.0),0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSCALE)
		TNT1 A 0 A_BossDeath
		TNT1 A 10 A_KillChildren
		stop
	Death.SuperMidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_BaronOfHell",0,0,0,frandom(-10.0,-14.0),0,frandom(7.0,10.0),0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSCALE)
		TNT1 A 0 A_BossDeath
		TNT1 A 10 A_KillChildren
		Stop

	//Standard death stuff
	/*Crush:
		TNT1 A 0 A_BossDeath
		TNT1 AAAAAAAAAA 0 A_CustomMissile ("BloodTr255", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_PlaySound("misc/xdeath4")
		XMED EEEEE 1 A_CustomMissile ("CeilBloodLauncherLong", 0, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_CustomMissile ("GiantBloodSpot", 4, 0, random (0, 360), 2, random (0, 160))
		XMED E 0
		Goto Looplet*/
	Death.Shotgun:
		TNT1 A 0 A_JumpIfCloser(300, "Death.Cutless")	
		Goto Death	
	Death.Blast:
	Death.SSG:
		TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		TNT1 AAAAAA 0 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath2b", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath3b", 45, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Instestin2", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("XDeathBrain1", 60, 0, random (0, 360), 2, random (0, 160))
        BDSS PQRSTU 6
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SetUserVar("User_SmokeLoop", 70) //Yeah, I know this isn't doing a smoke loop, but I'm too lazy to come up with yet another user variable... XD
	BloodLoop:
		BDSS V 1 A_JumpIf(User_SmokeLoop <= 0, "Looplet")
		BDSS V 0 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random (0, 360), 2, random (30, 110))
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		"####" "#" 0 A_SetUserVar("User_SmokeLoop", User_SmokeLoop - 1)
		Loop
	Death:
		TNT1 A 0 A_StopSound(5)
		BOSS I 8
		BOSS J 8 A_Scream
		BOSS K 8
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		BOSS L 8 A_NoBlocking
		BOSS MN 8
		BOSS N 0 A_BossDeath
		BOSS O 0
	Looplet:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		"####" "#" 1 CanRaise A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		"####" "#" 0 A_JumpIf(User_DeathByTiberium == 1, "TiberiumMelt")
		"####" "#" 0 A_JumpIf(User_DeathByBlueTiberium == 1, "BlueTiberiumMelt")
		Loop
	XDeath:
	    TNT1 A 0 A_CustomMissile ("BaronXDeath", 0, 0, random (0, 360), 2, random (0, 160))
 	    TNT1 A 0 A_CustomMissile ("XDeathBaronHead5", 62, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Scream
		TNT1 A 0 A_BossDeath
		TNT1 A 0 A_NoBlocking
	    Stop
   Death.ExplosiveImpact:
		TNT1 A 0 A_StopSound(5)
		TNT1 A 0 ThrustThingZ(0,35,0,1)
		TNT1 A 0 A_CustomMissile ("XDeathHellKnightLeg", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAAA 0 A_CustomMissile ("XDeath1", 62, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAA 0 A_CustomMissile ("MuchBlood", 62, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Jump(256, "Death.ExplosiveImpact1", "Death.ExplosiveImpact2")
	Death.ExplosiveImpact1:	
		BOH3 A 8 A_Scream
		BOH3 B 8 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		BOH3 CCCCCC  8 A_CheckFloor("Land1")
		Goto Land1
	Land1:
		BOH3 D 0
		Goto Looplet
	Death.ExplosiveImpact2:	
		BOH3 E 8 A_Scream
		BOH3 F 8 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		BOH3 GGGGGG  8 A_CheckFloor("Land2")
		Goto Land2
	Land2:
		BOH3 H 0
		Goto Looplet
	Death.Cut:
	Death.Saw:
	Death.Crush:
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		TNT1 AAAAAA 0 A_CustomMissile ("Xdeath1", 40, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 15, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAA 0 A_CustomMissile ("Instestin2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathHalfBOH", 24, 0, random (0, 360), 2, random (0, 160))
        BBO2 AABCD 10
        TNT1 A 0 A_SpawnItem ("DeadBaronHalfDown", 1)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		Stop
	Death.head:
		TNT1 A 0 A_JumpIfInTargetInventory("HasPlasmaWeapon", 1, "Death.Plasma")
		TNT1 A 0 A_SpawnItem("BaronOfHellHeadExplode", 0, 62)
        BADH A 9
        BADH B 9
        BADH C 9 A_BossDeath
		BADH D 9 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
        TNT1 A 0 A_SpawnItem ("DeadBaronNoHead", 1)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
	    Stop
	
	Death.decaptate:
		TNT1 AAAAA 0 A_CustomMissile ("Xdeath1", 62, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_CustomMissile ("XDeathBaronHead5", 62, 0, random (0, 360), 2, random (50, 130))
        BADH A 9
        BADH B 9
        BADH C 9 A_BossDeath
		BADH D 9 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
        TNT1 A 0 A_SpawnItem ("DeadBaronNoHead", 1)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
	    Stop

    Death.Fatality:
	    TNT1 A 0
		TNT1 A 0 A_Pain
		TNT1 A 0 A_JumpIfIntargetInventory("FistsSelected", 1, 1)
		Goto XDeath
		
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
        TNT1 A 0 A_GiveToTarget("BaronFatality", 1)
        TNT1 A 1 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
        TNT1 A 0 A_BossDeath
		Stop
	Death.GreenFire:
        TNT1 A 0
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
        TNT1 AAAA 0 A_CustomMissile ("Brutal_Blood", 30, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))	
		EXPL AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("GreenFlameTrails", 50, 0, random (0, 360), 2, random (0, 360))
		XBRN AAAA 2 BRIGHT A_SpawnItem("GreenFlare",0,43)
        Stop
	Crush:
	Death.Stomp:
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		BOSS JKL 2
		TNT1 AA 0 A_SpawnItem("MeatDeathSmall")
		TNT1 AAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		TNT1 AAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
		TNT1 AA 0 bright A_CustomMissile ("XDeath2b", 55, 0, random (0, 360), 2, random (30, 180))
		TNT1 AA 0 bright A_CustomMissile ("XDeath3b", 55, 0, random (0, 360), 2, random (30, 180))
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem ("CrushedRemains")
		TNT1 A 1
		TNT1 A 1 A_XScream
		Stop
	
	//Corpseblast
	CorpseBlastA:
		TNT1 A 0 A_SpawnItemEx("BaronOfHellBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Stop
	CorpseBlastB:
		"####" "#" 0 A_SpawnItemEx("BaronOfHellBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		Goto Looplet
	CorpseBlastC:
		"####" "#" 0 A_SpawnItemEx("BaronOfHellBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		Goto Looplet2
		
	//Gumpop
	Pain.Acid:
		"####" "#" 0 A_JumpIfInventory("PowerGumpopDamage",1,2)
		"####" "#" 0 A_SpawnItemEx("GumpopIndicator",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR|SXF_TRANSFERSPRITEFRAME|SXF_TRANSFERSCALE)
		"####" "#" 0 A_SpawnItemEx("GumpopGlow",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		"####" "#" 0 A_Jump(50,"Pain")
		Goto See
	Death.Acid:
		TNT1 A 0 A_ChangeFlag("DONTGIB",1)
		BOSS H 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)
	    TNT1 A 0 A_CustomMissile ("BaronXDeath", 0, 0, random (0, 360), 2, random (0, 160))
 	    TNT1 A 0 A_CustomMissile ("XDeathBaronHead5", 62, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItemEx("BaronOfHellGibbed",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
		TNT1 A 0 A_Scream
		TNT1 A 0 A_BossDeath
		TNT1 A 0 A_NoBlocking
		XMED ABCDE 5
	Looplet2:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastC")
		"####" "#" 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		Loop		
	//Dreadful
	Death.Tiberium:
		TNT1 A 0 A_SetUserVar("User_DeathByTiberium", 1)
		TNT1 A 0 ACS_NamedExecuteAlways("Toxic Avenger")
		TNT1 A 0 A_SpawnItemEx("TiberiumDeath",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Death
	TiberiumMelt:
		"####" "#" 0 A_JumpIf(ScaleX > 1.485, "EndOfMelt")
		"####" "#" 0 ACS_NamedExecuteAlways("Toxic Avenger")
		"####" "#" 1 A_SetScale(ScaleX + frandom(0.002,0.003),ScaleY - frandom(0.003,0.004))
		Goto Looplet
	Death.BlueTiberium:
		TNT1 A 0 A_SetUserVar("User_DeathByBlueTiberium", 1)
		TNT1 A 0 ACS_NamedExecuteAlways("Blue Oyster Cult")
		TNT1 A 0 A_SpawnItemEx("BlueTiberiumDeath",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Death
	BlueTiberiumMelt:
		"####" "#" 0 A_JumpIf(ScaleX > 1.485, "EndOfMelt")
		"####" "#" 0 ACS_NamedExecuteAlways("Blue Oyster Cult")
		"####" "#" 1 A_SetScale(ScaleX + frandom(0.002,0.003),ScaleY - frandom(0.003,0.004))
		Goto Looplet
		
	//Threadcutter
	Pain.Manuel:
		"####" "#" 0 A_Jump(128,1)
		Goto Pain
		"####" "#" 0 A_GiveInventory("BleedItem")
		"####" "#" 0 A_SpawnItemEx("BrutalBleedIndicator",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Pain
		
	//Thunderstruck
	Pain.Lightning:
		"####" "#" 0 A_Jump(192,1)
		Goto Pain
		BOSS H 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	LightningLock:
		"####" "#" 0 A_SpawnItem("HeadshotTarget8b", 0, 66,0)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock - 1)
		"####" "#" 0 A_Pain
		"####" "#" 0 A_PlaySound("Thunderstruck/Shocked",5,0.6,1)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty")
		"####" "###" 2 A_SpawnItemEx("MonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty")
		"####" "###" 2 A_SpawnItemEx("MonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty")
		"####" "###" 2 A_SpawnItemEx("MonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_JumpIf(User_LightningLock >= 1, "LightningLock")
		"####" "#" 0 A_StopSound(5)
		"####" "#" 0 A_ChangeFlag("NOPAIN",0)
		Goto See
		
	//Cauterizer
	Pain.LightningBlue:
		"####" "#" 0 A_Jump(48,1)
		Goto Pain
		BOSS H 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	BlueLightningLock:
		"####" "#" 0 A_SpawnItem("HeadshotTarget8b", 0, 66,0)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock - 1)
		"####" "#" 0 A_Pain
		"####" "#" 0 A_PlaySound("Thunderstruck/Shocked",5,0.6,1)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty Blue")
		"####" "###" 2 A_SpawnItemEx("CauterMonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty Blue")
		"####" "###" 2 A_SpawnItemEx("CauterMonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "##" 0 ACS_NamedExecuteAlways("Shock me Plenty Blue")
		"####" "###" 2 A_SpawnItemEx("CauterMonsterShock",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_JumpIf(User_LightningLock >= 1, "BlueLightningLock")
		"####" "#" 0 A_StopSound(5)
		"####" "#" 0 A_ChangeFlag("NOPAIN",0)
		Goto See
		
	//Fire
	Pain.Meteorfist:
		TNT1 A 0 A_FaceTarget
		"####" "#" 0 A_ChangeVelocity(frandom(-13.0,-17.0),0,frandom(9.0,11.0),CVF_RELATIVE)
		"####" "#" 0 A_Jump(256,2) //Guaranteed "On Fire!" effect, heeeh.
	Pain.Fire:
		"####" "#" 0 A_Jump(16,1)
		Goto Pain
		"####" "#" 0 A_JumpIfInventory("PowerOnFire",1,"Pain")
		"####" "#" 0 A_GiveInventory("OnFireItem")
		"####" "#" 0 A_SpawnItemEx("OnFireIndicator",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Pain
	Death.Meteorfist:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-13.0,-17.0),0,frandom(9.0,11.0),CVF_RELATIVE)
		Goto Death.Fire
	EndOfMelt:
		"####" "#" 0 A_SetUserVar("User_DeathByBlueTiberium", 0)
		"####" "#" 0 A_SetUserVar("User_DeathByTiberium", 0)
		"####" "#" 0 A_SetUserVar("User_DeathByFire", 0)
		Goto Looplet
		
	Death.Fire:
		TNT1 A 0 A_StopSound(5)
		TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		BOSB AAAA 2 A_CustomMissile ("FlameTrails", 45, 0, random (0, 360), 2, random (50, 130))
		BOSB BBBB 2 A_CustomMissile ("FlameTrails", 30, 0, random (0, 360), 2, random (50, 130))
		BOSB CCCC 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
		BOSB DDDD 2 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
        TNT1 A 0 A_Playsound("props/redfire")
		TNT1 A 0 A_SetUserVar("User_SmokeLoop", 80) //Simulates total amount of time elapsed (in tics).
	FlameLoop:
		BOSB E 0 A_JumpIf(User_SmokeLoop <= 0, "Smoking")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		BOSB E 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		BOSB E 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		//We can duplicate the corpseblast jump twice, since the tic delay is just 2 tics.
		BOSB E 0 A_SetUserVar("User_SmokeLoop", User_SmokeLoop - 1)
		BOSB E 0 A_CustomMissile ("FlameTrails", 25, 0, random (0, 360), 2, random (50, 130))
		Loop
	Smoking:
		TNT1 A 0 A_SetUserVar("User_SmokeLoop", 1170) //Simulates total amount of time elapsed (in tics).
	FireSmokeInit:
		TNT1 A 0 A_SetUserVar("User_Smoke", 10) //Simulates tic delay of a single state.
	FireSmokeLoop:
		BOSB E 1 A_JumpIf(User_SmokeLoop <= 0, "Looplet")
        BOSB E 0 A_JumpIf(User_Smoke <= 0, "FireSmoke")        
		BOSB E 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		BOSB E 0 A_SetUserVar("User_Smoke", User_Smoke - 1)
		BOSB E 0 A_SetUserVar("User_SmokeLoop", User_SmokeLoop - 1)
		Loop
	FireSmoke:
		BOSB E 0 A_CustomMissile ("SmallSmoke", 25, 0, random (0, 360), 2, random (70, 110))
		Goto FireSmokeInit
	
	Death.SuperPlasma:
    Death.Plasma: 
	Death.Plasma2:
	Death.Lightning:
	Death.LightningBlue:
		TNT1 A 0 A_StopSound(5)
        TNT1 A 0 A_BossDeath
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		TNT1 AAAAA 0 A_CustomMissile ("PlasmaParticleX", 48, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAA 0 A_CustomMissile ("BigPlasmaParticleX", 42, 0, random (0, 360), 2, random (0, 360))
        BOSB ABC 7 A_CustomMissile ("PlasmaSmoke", 28, 0, random (0, 180), 2, random (0, 180))
		TNT1 AAAAA 0 A_CustomMissile ("PlasmaParticleX", 48, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAA 0 A_CustomMissile ("BigPlasmaParticleX", 42, 0, random (0, 360), 2, random (0, 360))
		BOSB D 7 A_CustomMissile ("PlasmaSmoke", 14, 0, random (0, 180), 2, random (0, 180))
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SetUserVar("User_SmokeLoop",1480) //Simulates total elapsed time (in tics).
	PlasmaSmokeInit:
		TNT1 A 0 A_SetUserVar("User_Smoke",8) //Simulates tic delay of a single state.
	PlasmaSmokeLoop:
		BOSB E 1 A_JumpIf(User_SmokeLoop <= 0, "Looplet")
        BOSB E 0 A_JumpIf(User_Smoke <= 0, "PlasmaSmoke")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		BOSB E 0 A_SetUserVar("User_Smoke", User_Smoke - 1)
		BOSB E 0 A_SetUserVar("User_SmokeLoop", User_SmokeLoop - 1)
		Loop
	PlasmaSmoke:
		BOSB E 0 A_CustomMissile ("PlasmaSmoke", 24, 0, random (0, 180), 2, random (0, 180))
		Goto PlasmaSmokeInit

	//Crows
	Death.Crow:
		"####" "#" 0 A_SpawnItemEx("FlockOfCrows",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
	Death.Crow2:
		Goto Death.Saw
		
	//Scourgebreath
	Death.Breath:
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		"####" "#" 0 ACS_NamedExecuteAlways("Extra Crispy")
		"####" "#" 0 A_Scream
		"####" "#" 0 A_BossDeath
		"####" "#" 0 A_NoBlocking
		"####" "#" 0 A_SpawnItemEx("BreathSoulburst",0,0,0,0,0,0,0,SXF_TRANSFERSPRITEFRAME|SXF_TRANSFERPOINTERS)
	DeathBreathLoop:
		"####" "#" 0 A_SpawnItemEx("BreathDisintegration",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
		"####" "#" 0 A_JumpIf(ScaleX <= 0, "Null")
		"####" "#" 0 A_FadeOut(0.05)
		"####" "#" 1 A_SetScale(ScaleX - 0.03, ScaleY - 0.005)
		Loop
		
	//Ice
	GenericFreezeDeath:
	Death.Ice:
	Death.Freeze:
	Death.Frost:
	Death.DukeIce:
		"####" "#" 0 A_BossDeath
		"####" "#" 0 A_JumpIfInTargetInventory("Mana",0,2)
		"####" "#" 0 A_DropItem("MajorManaPod",-1,128)
		TNT1 A 0 A_JumpIfInventory("ChillgraspTrigger",1,4)
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
		TNT1 A 0 A_SpawnItem("FrozenBaronOfHell")
		Stop	
		FZD7 A 5 A_FreezeDeath
		"----" A 0 A_SpawnItemEx("ChillgraspBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"----" A 1 A_FreezeDeathChunks
		Wait
	Raise:
		"####" "#" 0 A_ChangeFlag("DONTGIB",0)
		"####" "#" 0 ACS_NamedExecuteAlways("Normalization")
		"####" "#" 0 A_SetScale(1.1)
		Goto Super::Raise
	}
}

ACTOR BrutalGuncastStealthBaron : BrutalGuncastBruiserBaron replaces StealthBaron
{
	+STEALTH
	RenderStyle Translucent
	Alpha 0
	Obituary "$OB_STEALTHBARON"
	HitObituary "$OB_STEALTHBARON"
}

//Corpses N' Stuff...

Actor GC_DeadBaron: GC_CurbstompedMarine replaces DeadBaron
{
    Radius 12
    Height 12
    Scale 1.1
    +SHOOTABLE
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
	-SOLID
	+THRUACTORS
	damagefactor "Crusher", 50.0
    Mass 1000
    Health 200
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
	var int User_Smoke;
	var int User_SmokeLoop;
	States
    {
    Spawn:
		BADD F 0
	TrueSpawn:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		"####" "#" 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		Loop
	CorpseBlastA:
		TNT1 A 0 A_SpawnItemEx("BaronOfHellBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Goto Death
	CorpseBlastB:
		"####" "#" 0 A_SetInvulnerable
		"####" "#" 0 A_SpawnItemEx("BaronOfHellBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_UnSetInvulnerable
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		Goto TrueSpawn
    Death:
		 TNT1 AAA 0 A_CustomMissile ("GC_XDeath1", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("GC_XDeath2", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("GC_XDeath3", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("GC_XDeath4", 5, 0, random (0, 360), 2, random (0, 160))
         Stop
    Death.Plasma: 
	Death.Plasma2:
    Death.Flames:
    Death.Burn:
        TNT1 A 0
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		EXPL AAAAA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        BOSB ABCDE 9 A_CustomMissile ("PlasmaSmoke", 24, 0, random (0, 180), 2, random (0, 180))
		TNT1 A 0 A_SetUserVar("User_SmokeLoop",1480) //Simulates total elapsed time (in tics).
	PlasmaSmokeInit:
		TNT1 A 0 A_SetUserVar("User_Smoke",8) //Simulates tic delay of a single state.
	PlasmaSmokeLoop:
		BOSB E 1 A_JumpIf(User_SmokeLoop <= 0, "Looptime")
        BOSB E 0 A_JumpIf(User_Smoke <= 0, "PlasmaSmoke")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		BOSB E 0 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		BOSB E 0 A_SetUserVar("User_Smoke", User_Smoke - 1)
		BOSB E 0 A_SetUserVar("User_SmokeLoop", User_SmokeLoop - 1)
		Loop
	PlasmaSmoke:
		BOSB E 0 A_CustomMissile ("PlasmaSmoke", 24, 0, random (0, 180), 2, random (0, 180))
		Goto PlasmaSmokeInit
	Looptime:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		"####" "#" 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		Loop
	}
}

Actor GC_DeadBaronHalfDown: GC_DeadBaron replaces DeadBaron
{
	States
	{
	Spawn:
		BBO2 D 0
		Goto TrueSpawn
	}
}

Actor GC_DeadBaronHalfUp: GC_DeadBaron replaces DeadBaronHalfUp
{
	States
	{
	Spawn:
		BTO2 D 0
		Goto TrueSpawn
	}
}

Actor GC_DeadBaronNoHead: GC_DeadBaron replaces DeadBaronNoHead
{
	States
	{
	Spawn:        
		BADH D 0
		Goto TrueSpawn
	}
}

Actor GC_DeadBaronClassic: GC_DeadBaron replaces DeadBaronClassic
{
	States
	{
	Spawn:
		KSA8 G 0
		Goto TrueSpawn
	}
}