
ACTOR SuperJuggernaut : Fatso 9952
{
    Scale 2.0
	Game Doom
    GibHealth 25
	damagefactor "Avoid", 0.0
	PainChance "Kick", 255
	damagefactor "Head", 2.0
	damagefactor "Stomp", 0.0
	damagefactor "GibRemoving", 0.0
	damagefactor "MINORHead", 1.0
	damagefactor "TeleportRemover", 0.0
	DamageFactor "CauseObjectsToSplash", 0.0
    Health 8000
	+NOICEDEATH
	PainSound "juggernaut/pain"
	DeathSound "juggernaut/death"
	ActiveSound "juggernaut/roam"
	SeeSound "juggernaut/see"
	
    damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    BloodType "Brutal_Blood"
    damagefactor "Shrapnel", 0.4
	Obituary "%o was destroyed by the Juggernaut"
	MaxStepHeight 24
	MaxDropOffHeight 32
	Speed 1
	Height 100
	Radius 64
	Mass 99999
	Painchance 10
	Painchance "Explosive", 150
	damagefactor "Explosive", 1.5
	damagefactor "Plasma", 1.5
	damagefactor "TankShell", 1.5
	+MISSILEMORE
	+MISSILEEVENMORE
	+BOSS
	+FULLVOLACTIVE
	MinMissileChance 150
	States
	{
	/////////////////////
	Spawn:
		BS1W A 1
	    TNT1 A 0 A_SpawnItemEx ("KillTreads",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	Goto Standby
	Standby:
	    BS1W A 1
	    BS1W AC 10 A_Look
	    Loop
	//////////////////
	See:
	    BS1W A 1
		//TNT1 A 0 A_SpawnItem("KillTreads")
	Goto Rolling
	Rolling:
	    
		TNT1 A 0 A_PlaySound("juggernaut/engine")
		
		BS1W A 2 A_Chase("","")
		BS1W B 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W A 2 A_Recoil(-1)
		BS1W B 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W C 2 A_Recoil(-1)
		BS1W D 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W C 2 A_Recoil(-1)
		BS1W D 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W A 2 A_Chase("","")
		BS1W B 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W A 2 A_Recoil(-1)
		BS1W B 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W C 2 A_Recoil(-1)
		BS1W D 2 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W C 2 A_Recoil(-1)
		BS1W D 2 A_Recoil(-1)
		TNT1 A 0 A_Jump (128, "Rolling2")
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		Loop
		
	Rolling2:
	    
		TNT1 A 0 A_PlaySound("juggernaut/engine")
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CheckSight("See")
		Goto Missile
		
	///////////////////	
	
	Missile:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfCloser(150, "Rolling")
		TNT1 A 0 A_Jump (128, "FireRockets")
        Goto FireMachinegun
     FireMachinegun:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("juggernaut/engine")
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody2", 0)
		TNT1 A 0 A_PlaySound("TANKMG", 1)
		TNT1 A 0 A_CustomMissile("HeavyMachinegunProjectileEnemy", 72, 42, random(-12, 12), 0)
		TNT1 A 0 A_CustomMissile("HeavyMachinegunProjectileEnemy", 72, -42, random(-12, 12), 0)
		TNT1 A 0 A_CustomMissile("YellowFlareSmall", 72, 42, 0, 0)
		TNT1 A 0 A_CustomMissile("YellowFlareSmall", 72, -42, 0, 0)
		TNT1 A 0 A_CustomMissile("RifleCaseSpawn", 72, 42, 0, 0)
		TNT1 A 0 A_CustomMissile("RifleCaseSpawn", 72, -42, 180, 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B B 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody2", 0)
		TNT1 A 0 A_PlaySound("TANKMG", 1)
		TNT1 A 0 A_CustomMissile("HeavyMachinegunProjectileEnemy", 72, 42, random(-12, 12), 0)
		TNT1 A 0 A_CustomMissile("HeavyMachinegunProjectileEnemy", 72, -42, random(-12, 12), 0)
		TNT1 A 0 A_CustomMissile("YellowFlareSmall", 72, 42, 0, 0)
		TNT1 A 0 A_CustomMissile("YellowFlareSmall", 72, -42, 0, 0)
		TNT1 A 0 A_CustomMissile("RifleCaseSpawn", 72, 42, 0, 0)
		TNT1 A 0 A_CustomMissile("RifleCaseSpawn", 72, -42, 180, 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		TNT1 A 0 A_GiveInventory("JuggernautMachinegunAmmo", 1)
		TNT1 A 0 A_JumpIfInventory("JuggernautMachinegunAmmo", 20, "stopfiring")
		TNT1 A 0 A_CheckSight("StopFiring")
		Loop
		
	FireRockets:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("juggernaut/engine")
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_PlaySound("MISLFIRE", 1)
		TNT1 A 0 A_CustomMissile("JuggernautRocket", 110, -42, random(-3, 3), 0)
		TNT1 A 0 A_CustomMissile("TankFireEffect", 110, -42, random(-3, 3), 0)
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_PlaySound("MISLFIRE", 1)
		TNT1 A 0 A_CustomMissile("JuggernautRocket", 110, 42, random(-3, 3), 0)
		TNT1 A 0 A_CustomMissile("TankFireEffect", 110, 42, random(-3, 3), 0)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		BS1B A 2 A_Recoil(-1)
		
		TNT1 A 0 A_CustomMissile ("SuperJuggernautBody1", 0)
		
		
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		TNT1 A 0 A_GiveInventory("JuggernautRocketAmmo", 2)
		TNT1 A 0 A_JumpIfInventory("JuggernautRocketAmmo", 4, "stopfiring")
		TNT1 A 0 A_CheckSight("StopFiring")
		Loop	
    
	StopFiring:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("JuggernautMachinegunAmmo", 30)
	TNT1 A 0 A_TakeInventory("JuggernautRocketAmmo", 6)
	Goto See
		
	
	
	
	////////////////////
	Pain:	
	    TNT1 A 0
	    BS1W A 2
		BS1W A 2 A_Pain
		Goto Rolling
		
		
	///////////////////////
	Death:
	    TNT1 A 0
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("KillTreads")
		EXPL A 0 Radius_Quake (6, 100, 0, 22, 0)
		TNT1 A 0 A_SpawnItem("BigExplosion1112")
	TNT1 A 0 A_PlaySound("weapons/explode")
	TNT1 A 0 A_PlaySound("EXPLOSIO", 3)
	TNT1 A 0 A_ChangeFlag("USESPECIAL", 0)
        TNT1 AAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 180), 2, random (0, 180))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 90, 0, random (0, 180), 2, random (0, 180))
        TNT1 A 0 A_CustomMissile ("CyberXDeath", 0, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0
		BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
				BS1B B 5 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		BS1B B 5 A_CustomMissile ("RealFlameTrailsMedium", 60, 0, random (0, 360), 2, random (0, 160))
		Goto Decay
		
		Decay:
		BS1B B 8 A_CustomMissile ("ExplosionSmoke", 60, 0, random (0, 360), 2, random (70, 110))
		Loop
	    
	}
} 


actor JuggernautBase
{
	Health 10000
	damagefactor "Killme", 9999.0
	Radius 64
	Height 2
	Scale 2.0
	Monster
	+NOBLOOD
	+SOLID
	-NOBLOCKMAP
	-COUNTKILL
	Mass 99999
	States
	{
	Spawn:
	BS1B A 5
	Loop
	
	Death:
	TNT1 A 0
	TNT1 A 0 A_NoBlocking
	Stop
	}
}


actor KillTreads
{
+NOTARGET
Radius 1
Height 1
DamageType Killme
+NOGRAVITY
+NOTELEPORT
+NODAMAGETHRUST
+THRUGHOST
+NORADIUSDMG
+NOEXTREMEDEATH
+FORCERADIUSDMG
PROJECTILE
	+DEHEXPLOSION
	+ACTIVATEMCROSS
States
{
Spawn:
TNT1 A 0
        TNT1 A 0 A_Explode(20,80,0)
Stop
 }
}


actor TreadsDamage
{
+NOTARGET
Radius 1
Height 1
DamageType Stomp
+NOGRAVITY
+NOTELEPORT
+NODAMAGETHRUST
+THRUGHOST
+NORADIUSDMG
+NOEXTREMEDEATH
+FORCERADIUSDMG
PROJECTILE
	+DEHEXPLOSION
	+ACTIVATEMCROSS
	+EXPLODEONWATER
States
{
Spawn:
TNT1 A 0
        TNT1 A 0 A_Explode(500,50,0)
TNT1 A 1 A_Noblocking
Stop
 }
}













Actor SuperJuggernautBody1
{
+RANDOMIZE
+FORCEXYBILLBOARD
+DONTSPLASH
+NOEXTREMEDEATH
+THRUACTORS
+NOGRAVITY
+NOCLIP
Projectile
damage 0
radius 2
height 0
speed 1
Scale 2.0
states
	{
	Spawn:
		BS1T AAAA 1 //A_FaceTarget
	    Stop
		Goto Death
Death:
    TNT1 A 0
    Stop
XDeath:
TNT1 A 0
Stop
	}
}

Actor SuperJuggernautBody2: SuperJuggernautBody1
{
states
	{
	Spawn:
		BS1T BBBB 1 BRIGHT //A_FaceTarget
	    Stop
		Goto Death
	}
}



Actor JuggernautMachinegunAmmo : Inventory
{
inventory.maxamount 30
}

Actor JuggernautRocketAmmo : Inventory
{
inventory.maxamount 6
}














ACTOR JuggernautRocket
{
	Radius 11
	Height 8
	Speed 30
	Damage (random (200, 250))
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	+ROCKETTRAIL
	+MISSILE
	+NOGRAVITY
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	//+DONTHURTSHOOTER
	States
	{
	Spawn:
		MISL I 1 Bright
		Loop
	Death:
		MISL B 0 Bright A_Explode
		TNT1 A 0 A_PlaySound("EXPLOSIO", 3)
		TNT1 A 0 A_SpawnItem("TankShotExplosion")
		TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticle", 0, 0, random (0, 360), 2, random (30, 160))
		TNT1 A 6
		TNT1 A 0 A_PlaySound("FAREXPL", 1)
		TNT1 AAAAA 0 A_CustomMissile ("ExplosionSmoke", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAA 0 A_CustomMissile ("ExplosionSmokeFast", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 12
		Stop
	}
}