
ACTOR Juggernaut : Fatso
{
    Scale 1.5
	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 "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 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_XBlood"
    damagefactor "Shrapnel", 0.4
	damagefactor "Explosive", 1.3
	Obituary "%o was destroyed by the Juggernaut"
	MaxStepHeight 24
	MaxDropOffHeight 32
	Speed 1
	Height 88
	Radius 48
	Mass 99999
	Painchance 10
	Painchance "Explosive", 50
	+MISSILEMORE
	+MISSILEEVENMORE
	MinMissileChance 150
	DeathHeight 4
	BurnHeight 0
	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(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W A 2 A_Recoil(-2)
		BS1W B 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W C 2 A_Recoil(-2)
		BS1W D 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W C 2 A_Recoil(-2)
		BS1W D 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W A 2 A_Chase("","")
		BS1W B 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W A 2 A_Recoil(-2)
		BS1W B 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		
		BS1W C 2 A_Recoil(-2)
		BS1W D 2 A_Recoil(-2)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1W C 2 A_Recoil(-2)
		BS1W D 2 A_Recoil(-2)
		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 ("JuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		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 ("JuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		TNT1 A 0 A_CustomMissile ("JuggernautBody2", 0)
		TNT1 A 0 A_CustomMissile("MonsterMinigunTracer", 72, 42, random(-8, 8), 0)
		TNT1 A 0 A_CustomMissile("MonsterMinigunTracer", 72, -42, random(-8, 8), 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(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody2", 0)
		TNT1 A 0 A_CustomMissile("MonsterMinigunTracer", 72, 42, random(-8, 8), 0)
		TNT1 A 0 A_CustomMissile("MonsterMinigunTracer", 72, -42, random(-8, 8), 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", 30, "stopfiring")
		TNT1 A 0 A_CheckSight("StopFiring")
		Loop
		
	FireRockets:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("juggernaut/engine")
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		
		TNT1 A 0 A_CustomMissile("JuggernautRocket", 110, -42, random(-3, 3), 0)
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Chase("","")
		TNT1 A 0 A_CustomMissile("JuggernautRocket", 110, 42, random(-3, 3), 0)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		BS1B A 2 A_Recoil(-2)
		
		TNT1 A 0 A_CustomMissile ("JuggernautBody1", 0)
		
		
		TNT1 A 0 A_SpawnItem("TreadsDamage",65)
		TNT1 A 0 A_GiveInventory("JuggernautRocketAmmo", 2)
		TNT1 A 0 A_JumpIfInventory("JuggernautRocketAmmo", 6, "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 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 : CurbstompedMarine
{
	Health 10000
	damagefactor "Killme", 9999.0
	Radius 64
	Height 2
	Scale 1.5
	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 JuggernautBody1
{
+RANDOMIZE
+FORCEXYBILLBOARD
+DONTSPLASH
+NOEXTREMEDEATH
+THRUACTORS
+NOGRAVITY
+NOCLIP
Projectile
damage 0
radius 2
height 0
speed 1
Scale 1.5
states
	{
	Spawn:
		BS1T AAAA 1 //A_FaceTarget
	    Stop
		Goto Death
Death:
    TNT1 A 0
    Stop
XDeath:
TNT1 A 0
Stop
	}
}

Actor JuggernautBody2: JuggernautBody1
{
states
	{
	Spawn:
		BS1T BBBB 1 BRIGHT //A_FaceTarget
	    Stop
		Goto Death
	}
}