ACTOR BrutalGuncastSpiderMastermind: TheSpiderMastermind Replaces TheSpiderMastermind
{
	//Loot
	DropItem Diamond
	DropItem "StratSpawner" 32
	
	//Mastermind is a joke anyway, huge and so easy to cheese.
	//Can run around it in circles and not get harmed at all,
	//just smash it to pieces.
	
	//Resists & weaknesses
	DamageFactor CloseCombat, 1.2
	DamageFactor Shoelaces, 1.2
	DamageFactor SuperCloseCombat, 1.2
	DamageFactor SuperShoelaces, 1.2
	DamageFactor SuperMidasCloseCombat, 1.2
	DamageFactor SuperMidasShoelaces, 1.2
	
	DamageFactor Pound, 3.0
	
	DamageFactor Lightning, 1.25
	DamageFactor LightningBlue, 1.1
	
	DamageFactor Tiberium, 0.6
	DamageFactor BlueTiberium, 0.6
	DamageFactor Ice, 0.7
	DamageFactor Crow, 0.3
	DamageFactor Crow2, 0.3
	
	//PAAAAAIN
	PainChance 40
	PainChance Crow, 1
	PainChance Crow2, 1
	
	//Guaranteed Effects
	PainChance SuperCloseCombat, 256
	PainChance SuperShoelaces, 256
	PainChance SuperMidasCloseCombat, 256
	PainChance SuperMidasShoelaces, 256
	PainChance Acid, 256
	PainChance Meteorfist, 256
	
	//Chance Effects
	PainChance Lightning, 72
	PainChance LightningBlue, 4
	PainChance Manuel, 20
	PainChance Fire, 20
	
	var int User_DeathByFire;
	var int User_DeathByTiberium;
	var int User_DeathByBlueTiberium;
	var int User_LightningLock;
	
	States
	{
	Pain.SuperCloseCombat:
	Pain.SuperMidasCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-2.0,-4.0),0,frandom(0.5,1.0),CVF_RELATIVE)
		Goto Pain
	Pain.SuperShoelaces:
	Pain.SuperMidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
		Goto Pain
	Death.SuperCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-2.0,-4.0),0,frandom(0.5,1.0),CVF_RELATIVE)
		Goto Death
	Death.SuperShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
		Goto Death
	Death.MidasCloseCombat:
	Death.MidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",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_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",0,0,0,frandom(-2.0,-4.0),0,frandom(0.5,1.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_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",0,0,0,frandom(-3.0,-7.0),0,frandom(3.0,6.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")
		XBIG 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))
		XBIG E 0
		Goto Looplet	
	CorpseBlastA:
		TNT1 A 0 A_SpawnItemEx("MastermindBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Stop
	CorpseBlastB:
		"####" "#" 0 A_SpawnItemEx("MastermindBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"####" "#" 0 A_TakeInventory("CorpseTrigger2",1)
		Goto Looplet
	CorpseBlastC:
		"####" "#" 0 A_SpawnItemEx("MastermindBlast",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(40,"Pain")
		Goto See
	Death.Acid:
		SPID I 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_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_QuakeEx(9,9,9,60,0,512,none,QF_SCALEDOWN)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		Goto MonstroExplodo
		
	//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)
		TNT1 A 0 A_GiveInventory("TibDeathCounter")
		Goto Death
	TiberiumMelt:
		"####" "#" 0 A_JumpIf(ScaleX > 2.025, "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)
		TNT1 A 0 A_GiveInventory("BlueTibDeathCounter")
		Goto Death
	BlueTiberiumMelt:
		"####" "#" 0 A_JumpIf(ScaleX > 2.025, "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("BleedIndicator",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
		SPID I 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	LightningLock:
		"####" "#" 0 A_SpawnItem("MasterMindHitBox", 0, 72, 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(24,1)
		Goto Pain
		SPID I 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	BlueLightningLock:
		"####" "#" 0 A_SpawnItem("MasterMindHitBox", 0, 72, 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
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.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(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
	Death.Lightning:
	Death.LightningBlue:
	Death.Fire:
		//"####" "#" 0 A_SetUserVar("User_DeathByFire", 1)
		//"####" "#" 0 ACS_NamedExecuteAlways("Extra Crispy")
		"####" "#" 0 A_SpawnItemEx("FlamingDeath",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Death
	FireMelt:
		"####" "#" 0 A_JumpIf(ScaleX > 2.025, "EndOfMelt")
		"####" "#" 0 ACS_NamedExecuteAlways("Extra Crispy")
		"####" "#" 1 A_SetScale(ScaleX + frandom(0.002,0.003),ScaleY - frandom(0.003,0.004))
		Goto Looplet
	EndOfMelt:
		"####" "#" 0 A_SetUserVar("User_DeathByTiberium", 0)
		"####" "#" 0 A_SetUserVar("User_DeathByFire", 0)
		Goto Looplet
		
	//Crows
	Death.Crow:
		TNT1 AAAAAA 0 A_SpawnItemEx("FlockOfCrows",random(45,-45),random(45,-45),random(25,0),0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Goto Death
		
	//Scourgebreath
	Death.Breath:
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		"####" "#" 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:
		"####" "#" 0 A_BossDeath
		"####" "#" 5 A_GenericFreezeDeath
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		"----" A 0 A_JumpIfInventory("ChillgraspTrigger",1,2)
		"----" A 0 A_Jump(256,2)
		"----" A 0 A_SpawnItemEx("ChillgraspBlast",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
		"----" A 1 A_FreezeDeathChunks
		Wait
	Death:
		TNT1 A 0 A_StopSound(5)
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		SPID J 20 A_Scream
		TNT1 A 0 A_FaceTarget
		EXPL A 0 Radius_Quake (8, 100, 0, 22, 0)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID K 10 A_NoBlocking
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID L 5
        TNT1 AAAA 0 A_CustomMissile ("GC_MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("GC_PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		TNT1 AAA 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, 0, 2, 65)
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
        //SPID S 300
		SPID S 0 A_BossDeath
	Looplet:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastB")
		"####" "#" 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		"####" "#" 0 A_JumpIf(User_DeathByFire == 1, "FireMelt")
		"####" "#" 0 A_JumpIf(User_DeathByTiberium == 1, "TiberiumMelt")
		"####" "#" 0 A_JumpIf(User_DeathByBlueTiberium == 1, "BlueTiberiumMelt")
		Loop
		
	Death.Telefrag:
		TNT1 A 0 A_StopSound(5)
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		SPID J 20 A_Scream
		TNT1 A 0 A_FaceTarget
		EXPL A 0 Radius_Quake (8, 100, 0, 22, 0)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID K 10 //A_NoBlocking
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID L 5
	MonstroExplodo: 
        TNT1 AAAA 0 A_CustomMissile ("GC_MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("GC_PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		TNT1 AAA 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, 0, 2, 65)
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_BossDeath
		TNT1 A 0 A_SpawnItemEx("MastermindGibbed",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
		XBIG ABCDE 5
	Looplet2:
		"####" "#" 0 A_JumpIfInventory("CorpseTrigger2",1,"CorpseBlastC")
		"####" "#" 1 A_JumpIfInventory("CorpseTrigger",1,"CorpseBlastA")
		Loop
		
	Death.Cut:
	Death.Saw:
	Death.decaptate:
		TNT1 A 0 A_StopSound(5)
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 AAAAAAAAAAAAAAAAA 0 A_CustomMissile ("GC_XDeath1", 120, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_CustomMissile ("GC_XSpiderMastermindCuttedBrain", 120, 0, random (0, 360), 2, random (50, 130))
		SPIY AAAAAAAAAAA 8 A_SpawnItem("MuchBlood", 0, 120)
		
		EXPL A 0 Radius_Quake (8, 100, 0, 22, 0)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID K 10 A_NoBlocking
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID L 5
        TNT1 AAAA 0 A_CustomMissile ("GC_MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		TNT1 AAA 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, 0, 2, 65)
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
        TNT1 A 300
		TNT1 A 0 A_BossDeath
		Stop		
	}
}

ACTOR BrutalGuncastSuperMasterMind: SuperMasterMind replaces SuperMasterMind
{
	//Loot
	DropItem Diamond
	DropItem Diamond
	DropItem Diamond
	DropItem Diamond
	DropItem "StratSpawner"
	
	//WAT.
	
	//Resists & 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 Pound, 3.0
	
	DamageFactor Lightning, 0.675
	DamageFactor LightningBlue, 0.55
	
	DamageFactor Tiberium, 0.3
	DamageFactor BlueTiberium, 0.3
	DamageFactor Ice, 0.35
	DamageFactor Crow, 0.15
	DamageFactor Crow2, 0.15
	
	//PAAAAAIN
	PainChance 20
	PainChance Crow, 1
	PainChance Crow2, 1
	
	//Guaranteed Effects
	PainChance SuperCloseCombat, 256
	PainChance SuperShoelaces, 256
	PainChance SuperMidasCloseCombat, 256
	PainChance SuperMidasShoelaces, 256
	PainChance Acid, 256
	PainChance Meteorfist, 256
	
	//Chance Effects
	PainChance Lightning, 36
	PainChance LightningBlue, 2
	PainChance Manuel, 10
	PainChance Fire, 10
	
	var int User_DeathByFire;
	var int User_DeathByTiberium;
	var int User_DeathByBlueTiberium;
	var int User_LightningLock;
	var int User_BreathLoop;

    //damagefactor "BFG", 0.0
    damagefactor "HKFT", 0.05
    //damagefactor "Head", 1.5
	damagefactor "Explosive", 1.5
	damagefactor "Avoid", 0.0
	damagefactor "Decaptate", 5.0
	damagefactor "Stomp", 0.0
	damagefactor "GibRemoving", 0.0
	damagefactor "Trample", 0.0
	damagefactor "TeleportRemover", 0.0
	DamageFactor "CauseObjectsToSplash", 0.0
	Obituary "%o was destroyed by a Mastermind."
	+NOICEDEATH
	Game Doom
	Health 20000
	Radius 210
    damagefactor "Crush", 30.0
    Scale 2.5
	Height 144
	Mass 500000
	Speed 40
	+NOTARGET
	PainChance 30
	PainChance "Explosive", 80
	Monster
	//MinMissileChance 200
	+BOSS
	+FLOORCLIP
    +DONTRIP
	+DONTMORPH
	+BOSSDEATH
    +NORADIUSDMG
    +NOBLOOD
	+MISSILEMORE
	-SOLID
	+MISSILEEVENMORE
	+SHOOTABLE
	DropItem "DemonStrengthRune" 25
	SeeSound "spider/sight"
	AttackSound "spider/attack"
	PainSound "spider/pain"
	DeathSound "spider/death"
	ActiveSound "spider/active"
	obituary "$OB_SPIDER"
    damagefactor "Blood", 0.0
	MaxStepHeight 24
	MaxDropOffHeight 32
	States
	{
	Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("SuperMastermind")
        Stop
	ReplaceVanilla:
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_SpawnItemEx ("VanillaSpiderMastermind",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG ,0)
		Stop
    Spawn:
		SPID A 0
		TNT1 A 0 ACS_ExecuteAlways(796, 0, 0, 0, 0)//Check if Vanilla Mode is activated
		SPID A 10 A_Look
		TNT1 A 0 A_GiveInventory("TargetIsAMastermind")
		Loop
	See:
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 2 A_Metal
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 2 A_Recoil(-3)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID B 2 A_Chase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID B 2 A_Recoil(-3)


		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID C 2 A_Chase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID C 2 A_Recoil(-3)
		
		TNT1 A 0 A_SpawnItemEx("MasterMindStep", 180, 180)
		TNT1 A 0 A_SpawnItemEx("MasterMindStep", -180, 180)
		
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID D 2 A_Recoil(-3)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID D 2 A_Metal

		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID E 2 A_Recoil(-3)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID E 2 A_Recoil(-3)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID F 2 A_Chase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		
		TNT1 A 0 A_SpawnItemEx("MasterMindStep", 180, -180)
		TNT1 A 0 A_SpawnItemEx("MasterMindStep", -180, -180)
		Loop

	Missile:
	    TNT1 A 0 A_TakeInventory ("BrutalCounter2", 500)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 4 A_FaceTarget 
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 4 A_FaceTarget 
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 4 A_FaceTarget 
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
        SPID H 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		TNT1 AAAAAAAAAAAAAAAAA 0
		
		
		TNT1 A 0 A_JumpIfCloser(200, "StopFiring")
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID G 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID H 2 BRIGHT A_CustomMissile("SuperMastermindTracer", 124, 0, random(-7, 7), 1, random(-4, 2))
		TNT1 A 0 A_SpawnItem ("MasterMindCaseSpawn", 0, 60,0)
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		TNT1 A 0 A_GiveInventory ("BrutalCounter2", 1)
		TNT1 A 0 A_JumpIfInventory ("BrutalCounter2", 40, "StopFiring")
		
		SPID G 0 A_SpidRefire
		Goto Missile+20
	
	StopFiring:
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID A 6 A_FaceTarget 
		Goto See
	
	Avoid:
         NULL A 0 A_FaceTarget
         SPID A 6 A_FastChase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
         NULL A 0 A_FaceTarget
         SPID B 6 A_FastChase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		 NULL A 0 A_FaceTarget
         SPID C 6 A_FastChase
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
         NULL A 0 A_FaceTarget
         SPID D 6 A_FastChase 
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		 Goto Missile
		
	Pain:
		TNT1 A 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144,0)
		SPID I 4 A_Pain
        Goto See
	Pain.SuperCloseCombat:
	Pain.SuperMidasCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-2.0,-4.0),0,frandom(0.5,1.0),CVF_RELATIVE)
		Goto Pain
	Pain.SuperShoelaces:
	Pain.SuperMidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
		Goto Pain
	Death.SuperCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-2.0,-4.0),0,frandom(0.5,1.0),CVF_RELATIVE)
		Goto Death
	Death.SuperShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
		Goto Death
	Death.MidasCloseCombat:
	Death.MidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS|SXF_TRANSFERSCALE) //SXF_TRANSFERSPRITEFRAME|SXF_SETMASTER)
		TNT1 A 5 A_BossDeath
		TNT1 A 300
		TNT1 A 0 A_BrainDie
		Stop
	Death.SuperMidasCloseCombat:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",0,0,0,frandom(-2.0,-4.0),0,frandom(0.5,1.0),0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSCALE)
		TNT1 A 0 A_BossDeath
		TNT1 A 10 A_KillChildren
		TNT1 A 300
		TNT1 A 0 A_BrainDie
		stop
	Death.SuperMidasShoelaces:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_NoBlocking
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 A 0 A_Pain
		TNT1 A 0 A_PlaySound("Midas/Touched")
		TNT1 A 0 A_SpawnItemEx("Midas_Statue_Mastermind",0,0,0,frandom(-3.0,-7.0),0,frandom(3.0,6.0),0,SXF_TRANSFERPOINTERS|SXF_SETMASTER|SXF_TRANSFERSCALE)
		TNT1 A 0 A_BossDeath
		TNT1 A 10 A_KillChildren
		TNT1 A 0 A_BrainDie
		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")
		XBIG 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))
		XBIG E -1
		Stop	
	/*Death:
		TNT1 A 0 A_StopSound(5)
		SPID J 20 A_Scream
		SPID K 10 A_NoBlocking
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		SPID LM 10
		SPID NO 10
		SPID O 0 A_QuakeEx(9,9,9,60,0,512,none,QF_SCALEDOWN)
		SPID O 0 A_SpawnItemEx("MastermindGibbed",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
		SPID PQR 10
		SPID S 30
		SPID S 0 A_BossDeath*/ 
		
	//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(40,"Pain")
		Goto See
	Death.Acid:
		SPID I 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_DropItem("MajorManaPod",-1,224)
		//TNT1 A 0 A_NoBlocking
		//TNT1 A 0 A_BossDeath
		TNT1 A 0 A_QuakeEx(9,9,9,60,0,512,none,QF_SCALEDOWN)
		Goto MonstroExplodo
		
	//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)
		TNT1 A 0 A_GiveInventory("TibDeathCounter")
		Goto Death
	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)
		TNT1 A 0 A_GiveInventory("BlueTibDeathCounter")
		Goto Death
		
	//Threadcutter
	Pain.Manuel:
		"####" "#" 0 A_Jump(128,1)
		Goto Pain
		"####" "#" 0 A_GiveInventory("BleedItem")
		"####" "#" 0 A_SpawnItemEx("BleedIndicator",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
		SPID I 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	LightningLock:
		"####" "#" 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144, 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(24,1)
		Goto Pain
		SPID I 0 A_ChangeFlag("NOPAIN",1)
		"####" "#" 0 A_SetUserVar("User_LightningLock", User_LightningLock + 10)
	BlueLightningLock:
		"####" "#" 0 A_SpawnItem("SuperMasterMindHitBox", 0, 144, 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
		TNT1 A 0 A_ChangeVelocity(frandom(-3.0,-7.0),0,frandom(3.0,6.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(-3.0,-7.0),0,frandom(3.0,6.0),CVF_RELATIVE)
	Death.Lightning:
	Death.LightningBlue:
	Death.Fire:
		//"####" "#" 0 A_SetUserVar("User_DeathByFire", 1)
		//"####" "#" 0 ACS_NamedExecuteAlways("Extra Crispy")
		"####" "#" 0 A_SpawnItemEx("FlamingDeath",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_SETTARGET|SXF_ORIGINATOR)
		Goto Death
		
	//Crows
	Death.Crow:
		TNT1 AAAAAA 0 A_SpawnItemEx("FlockOfCrows",random(45,-45),random(45,-45),random(25,0),0,0,0,0,0,SXF_TRANSFERPOINTERS)
		Goto Death
		
	//Scourgebreath
	Death.Breath:
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		"####" "#" 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, "DeathBreathEnd")
		"####" "#" 0 A_FadeOut(0.05)
		"####" "#" 1 A_SetScale(ScaleX - 0.03, ScaleY - 0.005)
		Loop
	DeathBreathEnd:
		TNT1 A 300
		TNT1 A 0 A_BrainDie
		Stop

	Death:
		TNT1 A 0 A_StopSound(5)
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		SPID J 20 A_Scream
		TNT1 A 0 A_FaceTarget
		EXPL A 0 Radius_Quake (8, 100, 0, 22, 0)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID K 10 A_NoBlocking
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID L 5
        TNT1 AAAA 0 A_CustomMissile ("GC_MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("GC_PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
        SPID S 300
		TNT1 A 0 
		{
			A_BossDeath;
			A_BrainDie;
		}			
		Stop
	MonstroExplodo: 
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
        TNT1 AAAA 0 A_CustomMissile ("GC_MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("GC_PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		TNT1 AAA 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, 0, 2, 65)
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_BossDeath
		TNT1 A 0 A_SpawnItemEx("MastermindGibbed",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
		XBIG ABCD 5
		XBIG E 300
		XBIG E 0 A_BossDeath
		XBIG E -1 A_BrainDie
		Stop
		
    Crush:
		TNT1 A 0 A_StopSound(5)
        TNT1 A 0 A_PlaySound("misc/xdeath4")
        CRS3 A 300
		CRS3 A 0 A_BossDeath
        CRS3 A -1 A_BrainDie
        Stop
		
		
	Death.Cut:
	Death.Saw:
	Death.decaptate:
		TNT1 A 0 A_StopSound(5)
		"####" "######" 0 A_DropItem("MajorManaPod",-1,224)
		TNT1 AAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XDeath1", 120, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_CustomMissile ("GC_XSpiderMastermindCuttedBrain", 120, 0, random (0, 360), 2, random (50, 130))
		SPIY AAAAAAAAAAA 8 A_SpawnItem("MuchBlood", 0, 120)
		
		EXPL A 0 Radius_Quake (8, 100, 0, 22, 0)
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 50, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("SuperGoreSPawner", 110, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID K 10 A_NoBlocking
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 10, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 80, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 90, 0, random (0, 360), 2, random (70, 90))
		SPID L 5
        TNT1 AAAA 0 A_CustomMissile ("MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 30, 0, random (0, 360), 2, 90)
		TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 30, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 30, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 30, 0, random (0, 360), 2, random (70, 90))
		 TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 100, 0, random (0, 360), 2, random (20, 90))
        //SPID MNOPQR 5
		TNT1 AAA 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("GC_MastermindLeg", 30, 0, 0, 2, 65)
		//TNT1 AAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("GiantBloodSpot")
        TNT1 A 300
		TNT1 A 0 
		{
			A_BossDeath;
			A_BrainDie;
		}			
		Stop		
	}
}

ACTOR GC_XSpiderMastermindCuttedBrain: XSpiderMastermindCuttedBrain replaces XSpiderMastermindCuttedBrain
{
	var int User_DeathByFire;
	var int User_DeathByTiberium;
	var int User_DeathByBlueTiberium;
	var int User_LightningLock;
    States
    {
    Spawn:
		SPIP A 0 NoDelay A_SetInvulnerable
	TrueSpawn:
		"####" "#" 0 A_JumpIfInTargetInventory("TibDeathCounter",1,"TibSpawn")
		"####" "#" 0 A_JumpIfInTargetInventory("BlueTibDeathCounter",1,"BlueTibSpawn") 
		"####" "#" 0
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	TibSpawn:
		"####" "#" 0 ACS_NamedExecuteAlways("Toxic Avenger")
		"####" "#" 0 A_SetUserVar("User_DeathByTiberium",1)
		"####" "#" 0 A_UnSetInvulnerable
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	BlueTibSpawn:
		"####" "#" 0 ACS_NamedExecuteAlways("Blue Oyster Cult")
		"####" "#" 0 A_SetUserVar("User_DeathByBlueTiberium",1)
		"####" "#" 0 A_UnSetInvulnerable
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	Continue:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Splash")
        SPIP ABCDEFGH 3 A_CustomMissile ("Brutal_FlyingBloodTrail", 0, 0, random (0, 360), 2, random (0, 360))
        Loop
    Death:
        TNT1 A 0 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
        SPIP I 1
		SPIP I -1
        Stop
     Splash:
        TNT1 A 0
        Stop
    }
}

ACTOR GC_MastermindLeg: MastermindLeg replaces MastermindLeg
{
	var int User_DeathByFire;
	var int User_DeathByTiberium;
	var int User_DeathByBlueTiberium;
	var int User_LightningLock;
    States
    {
    Spawn:
		SPP4 A 0 NoDelay A_SetInvulnerable
	TrueSpawn:
		"####" "#" 0 A_JumpIfInTargetInventory("TibDeathCounter",1,"TibSpawn")
		"####" "#" 0 A_JumpIfInTargetInventory("BlueTibDeathCounter",1,"BlueTibSpawn") 
		"####" "#" 0
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	TibSpawn:
		"####" "#" 0 ACS_NamedExecuteAlways("Toxic Avenger")
		"####" "#" 0 A_SetUserVar("User_DeathByTiberium",1)
		"####" "#" 0 A_UnSetInvulnerable
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	BlueTibSpawn:
		"####" "#" 0 ACS_NamedExecuteAlways("Blue Oyster Cult")
		"####" "#" 0 A_SetUserVar("User_DeathByBlueTiberium",1)
		"####" "#" 0 A_UnSetInvulnerable
		"####" "#" 0 A_Jump(256,"Continue")
		Goto Continue
	Continue:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Underwater")
        SPP4 ABCDEFGH 5
        Loop
    Death:
	    TNT1 A 0 ThrustThingZ(0,50,0,1)
		TNT1 A 0 A_Explode(300, 100)
		EXPL AAAAAAA 0 A_CustomMissile ("ExplosionSMoke", 0, 0, random (0, 360), 2, random (0, 360))
		Goto KeepRotating
	KeepRotating:	
        SPP4 AB 2
		SPP4 CDEFGH 2 A_CheckFloor("Rest")
		Loop
	Rest:	
	    SPP4 A 1
		TNT1 A 0 A_Explode(50, 100)
		EXPL AAAAAAA 0 A_CustomMissile ("ExplosionSMoke", 0, 0, random (0, 360), 2, random (0, 360))
		SPP4 A -1
        Stop
		
     Underwater:
	 Splash:
	    SPP4 A 4
        Loop
    }
}