
ACTOR CyberdemonBoss: TheCyberdemon 2546
{
    Obituary "%o was destroyed by the Cyberdemon."
	Health 20000
    damagefactor "Crush", 20.0
	MaxStepHeight 64
	MaxDropOffHeight 64
    Scale 2.4
	Radius 64
	Height 220
	Speed 28
	FastSpeed 32
	//$category "BD Bosses"
	painchance "kick", 0
	mass 5000
	Tag "Cyberdemon Lord of Deimos"
	States
	{
	
	Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("TheCyberdemon")
        Stop
		
	Pain.Killme:
	TNT1 A 0
	Goto Chasing
	
    
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_GiveInventory("TargetIsACyberdemon")
		
	Idle:	
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		
        CYBR D 10 A_Look
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
        CYBR Z 10 A_Look
        Loop

	See:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		TNT1 A 0 ACS_ExecuteAlways(621, 0, 0, 0, 0)//Health Bar
	
	Chasing:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		TNT1 A 0 A_SpawnItem("HeavyFootSteps32")
		CYBR A 3 A_Hoof
		CYBR A 3 //A_Chase
		TNT1 A 0 A_JumpIfCloser(250, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR AA 2 A_Chase
		TNT1 A 0 A_JumpIfCloser(250, "Stomp")
        //TNT1 A 0 A_SpawnItemEx("CyberStep",12,-30)
		CYBR BB 2 A_Chase
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
        CYBR BBC 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeavyFootSteps32")
		TNT1 A 0 A_JumpIfCloser(250, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
        CYBR C 2 A_Chase
		CYBR C 2
		CYBR C 2 A_Metal
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
        //TNT1 A 0 A_SpawnItemEx("CyberStep",12,30)
		CYBR D 2 A_Chase
		CYBR D 2 A_Chase
		TNT1 A 0 A_JumpIfCloser(250, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR DD 2 A_Chase
		Loop


	Missile:
	    TNT1 A 0 A_JumpIfCloser(250, "Stomp")
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "SpecialAttack")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 6 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 6 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,-7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 6 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 6 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 6 A_FaceTarget
		Goto Chasing
		
		 
	Stomp:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR Z 5 A_FaceTarget
		TNT1 A 0 A_Recoil(-15)
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
	    CYMA A 7 A_FaceTarget
		CYBR Z 0 A_FaceTarget
		TNT1 A 0 A_Recoil(-15)
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		TNT1 A 0 A_CustomMissile("CyberStompBig",10,0,0,0)
	    CYMA B 7
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYMA B 7
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		Goto Chasing
	Death:
		CYBR H 10
		EXPL A 0 Radius_Quake (6, 100, 0, 22, 0)
        TNT1 AAAA 0 A_CustomMissile ("ExplosionSpawner", 190, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 190, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 190, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 190, 0, random (0, 360), 2, random (0, 180))
        TNT1 A 0 A_CustomMissile ("CyberXDeath", 100, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
		CYBR I 5 A_Scream
		TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 150, 0, random (0, 360), 2, 90)
		CYBR JKL 5
		CYBR M 5 A_NoBlocking
		CYBR NOP 5
		CYBR P 200
		Goto CheckIfBoss
		
	CheckIfBoss:
		CYBR P 1 A_BossDeath
		TNT1 A 0 A_BrainDie
		CYBR P -1 
		Stop
		
	Pain.Taunt:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "SpecialAttack")
		SPOS B 0 A_Pain
		TNT1 A 0 A_ChangeFlag("FASTER", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEMORE", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", 1)
		TNT1 A 0 A_PlaySound("demon/pain")
		CYBT A 1 A_FaceTarget
		CYBT ABCCBADE 4
		TNT1 A 0 A_PlaySound("CYBTAT", 1)
		CYBT FGHGFGHGFGHGFGHG 3
		CYBT EDA 4
		TNT1 A 0 A_GiveInventory("Enraged", 1)
		Goto Missile
	
	SpecialAttack:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,-7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 200,0)
		CYBR F 4 BRIGHT A_CustomMissile("FastCyberBalls",120,-50,0,0)
		Goto Chasing
	
	}
}


Actor GreatCyberdemon: CyberdemonBoss 15858
{
	Health 10000
	States
		{
		
		CheckIfBoss:
		CYBR P 1
		CYBR P -1
		Stop
		}
}






ACTOR SuperMastermind: TheSpiderMastermind 2547
{
    Obituary "%o was destroyed by a Mastermind."
	Health 10000
	Radius 120
    Scale 2.5
	Height 120
	Mass 500000
	Speed 40
	+NOTARGET
	MaxStepHeight 64
	MaxDropOffHeight 64
	//$category "BD Bosses"
	Tag "Great Mastermind Invasion Leader"
	States
	{
	Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("TheSpiderMastermind")
        Stop
	
    Spawn:
		TNT1 A 0
		
	Idle:	
		SPID A 10 A_Look
		TNT1 A 0 A_GiveInventory("TargetIsAMastermind")
		Loop
	See:
		TNT1 A 0
		TNT1 A 0 ACS_ExecuteAlways(621, 0, 0, 0, 0)//Health Bar
		
	Chasing:
		TNT1 A 0
		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 Chasing
	
		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 Chasing






	Death:

		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 ("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 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_BrainDie
		Stop
		
    Crush:
        TNT1 A 0 A_PlaySound("misc/xdeath4")
        CRS3 A 5
        CRS3 A -1
        Stop
		
		
Death.Cut:
Death.Saw:
Death.decaptate:
		TNT1 AAAAAAAAAAAAAAAAA 0 A_CustomMissile ("XDeath1", 120, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_CustomMissile ("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 ("MastermindLeg", 30, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("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		
	}
}