ACTOR MLGAssaultCaptain
{
//$Category Monsters/LCA
//$Sprite LASGA1
//$Title "Legendary Assault Captain"
    Health 6300
    Radius 20
    Height 56
    Speed 12
    PainChance 20
    MONSTER
    +NOTIMEFREEZE
	+BOSS
	+BOSSDEATH
	+FLOORCLIP
	+MISSILEMORE
	+MISSILEEVENMORE
	+QUICKTORETALIATE
	+NOICEDEATH
	+NODROPOFF
	+DONTGIB
	+NOTARGET
	+NORADIUSDMG
	+FORCERADIUSDMG
	+NOFEAR
    SeeSound "MLGZombie/Sight"
    ActiveSound "MLGZombie/Active"
    PainSound "lcmdo/pain"
    DeathSound "MLGZombie/Death"
    Obituary "%o lagged out during the MLG showdown."
    Tag "\c[u3]MLG Assault Captain\c-"
	BloodColor "Green"
	DropItem "Legendary Assault Shotgun" 202
	DropItem "LegendaryShell" 256 4
	DropItem "LegendaryShellBox" 130
	DropItem "LegendaryPowerShard" 30 1
    DropItem "LegendaryArmor", 256, 1
	DropItem "LegAmmoSphere" 95 1
	DropItem "HandGrenadeAmmo" 237 2
	DropItem "MineAmmo" 242 2
	DropItem "Backpack" 202 1
	DropItem "Armorplate" 212 1
	DropItem "Portablemedkit" 217 1
	DropItem "StimKit" 222 3
	DropItem "HealthFlask" 227 5
	DropItem "SuperCrate" 256 1
	//DropItem "MLGRune" 27 1
	Species "Zombie"
	DamageFactor 0.4
	//Vexed
    DamageFactor "Explosion", 0.0001
    DamageFactor "PlayerDTRG", 0.0001
    DamageFactor "DTRailgun", 0.0001
	DamageFactor "PDTPuff", 0.0001
	DamageFactor "RailG", 0.0001
	DamageFactor "PyroShot", 0.0001
	DamageFactor "PlayerPyro", 0.0001
	DamageFactor "PlayerBHole", 0.025
	DamageFactor "PlayerDBFG", 0.015
	DamageFactor "PlayerDBFG2", 0.015
    //Nemesis
	DamageFactor "PlayerNemesisPlasma", 0.0
	DamageFactor "VileFires", 0.0
	DamageFactor "DarkDemoEx", 0.0
	//Hackroid
	DamageFactor "LegendaryZombie", 0.0
	DamageFactor "PDTBFG", 0.0
	DamageFactor "DBFG10K2", 0.5
	DamageFactor "PlayerDBFG10K2", 0.5
	DamageFactor "DBFG2", 0.5
	DamageFactor "Legendary", 0.1
	DamageFactor "Superweapon", 0.1
	DamageFactor "LegendaryPlayer", 0.1
	DamageFactor "Hackroid", 0.0
	DamageFactor "DarkDemoEx", 0.0
	//CorruptLegCyber
	DamageFactor "PDTBFGTracer", 0.0
    DamageFactor "PlayerDevBall", 0.0
    DamageFactor "PlayerDevBall2", 0.0
    DamageFactor "PlayerDTBFGRailgunSlug", 0.0
	DamageFactor "PlayerDevTracer", 0.0
	DamageFactor "PlayerDBFG2", 0.0
    //Legendary
	DamageFactor "LegendaryGuru", 0.0
	DamageFactor "LegendaryPlayer", 0.3
	DamageFactor "LegendaryGuruPlayer", 0.3
	DamageFactor "LACGrenade", 0.0
	DamageFactor "PlayerDTRG", 0.5
	var int user_missile;
	var int user_music;
	var int user_protection;
	var int user_protected;
    States
    {
    Spawn:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
        MLSC A 10 Bright A_Look
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC Z 10 Bright A_Look
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
        Loop
    See:
		TNT1 A 0 A_JumpIf(user_music == 1,3)
		TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1808,910)
		TNT1 A 0 A_SetUserVar("user_music",1)
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
        MLSC AA 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC BB 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC CC 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC DD 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(20)
		TNT1 A 0 A_Jump(64,"Mine")
		MLSC A 0 A_Jump(64,"Rush")
		TNT1 A 0 A_Jump(64,"Right","Left","Back","BackLeftRange","BackRightRange")
		TNT1 A 0 A_Jump(64,"Chase")
		Loop
    Chase:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC AA 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_Jump(1,"Heal")
		MLSC A 0 A_JumpIfCloser(130,"Dodge")
		MLSC AA 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 0 A_JumpIfCloser(130,"Dodge")
		MLSC BB 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 0 A_JumpIfCloser(130,"Dodge")
		MLSC BB 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC A 0 A_JumpIfCloser(150,"Dodge")
		MLSC CC 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_Jump(10,"Heal")
		MLSC A 0 A_JumpIfCloser(150,"Dodge")
		MLSC CC 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 0 A_JumpIfCloser(130,"Dodge")
		MLSC DD 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 0 A_JumpIfCloser(130,"Dodge")
		MLSC DD 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		TNT1 A 0 A_Jump(40,"Teleport","ComboTel")
		TNT1 A 0 A_Jump(95,"Mine")
		MLSC A 0 A_Jump(128,"Dodge")
		Loop
	Rush:
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC A 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC A 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC B 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC B 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC C 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC C 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC D 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("MLGASGZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
		MLSC D 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_Jump(85,"See")
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		Loop
	Heal:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	    MLSC A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(5)
		TNT1 A 0 A_PlaySound("pickups/flask",0,1.0,0)
		GoTo See
	Heal2:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(15)
		TNT1 A 0 A_PlaySound("pickups/pstimpack",0,1.0,0)
		GoTo See
	Heal3:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(25)
		TNT1 A 0 A_PlaySound("pickups/pmedkit",0,1.0,0)
		GoTo See
	SeeNoDodge:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		MLSC CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		Goto Chase
	Dodge:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC A 1 Bright A_FaceTarget
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		MLSC E 0 ThrustThingZ(0, 20, 0, 0)
		MLSC A 0 A_Jump(256, "Right", "Left", "Back", "BackLeftRange", "BackRightRange")
	Left:
		MLSC E 0 ThrustThing(angle*256/360+192, 30, 0, 0)
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
		Goto SeeNoDodge
	Right:
		MLSC E 0 ThrustThing(angle*256/360+64, 30, 0, 0)
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
		Goto SeeNoDodge
	Back:
	    MLSC E 0 ThrustThing(angle*256/360+128,30,0,0)
	    TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
	    Goto See
    BackLeftRange:
    	MLSC E 0 ThrustThing(angle*256/360+random(133,187),30,0,0)
	    TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
	    Goto See
    BackRightRange:
	    MLSC E 0 ThrustThing(angle*256/360+random(69,123),30,0,0)
	    TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
	    Goto See
  Teleport:
	MLSC A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("GHellionSmokeSpawner")
	MLSC AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	MLSC A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	MLSC A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("GHellionSmokeSpawner")
	MLSC AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	MLSC A 1 Bright A_SetShootable
	Goto See  
   ComboTel:
       MLSC E 1 A_UnSetShootable
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeOut(0.1,0)
       MLSC EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)
       MLSC EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
       MLSC E 1 A_PlayWeaponSound("boss/teleport")
       MLSC EEEEEEEEEEEE 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
       MLSC EEEEEEEEEEE 1 A_FadeIn(0.1)   
       MLSC E 1 A_SetShootable
       Goto See
   Missile:
        TNT1 A 0 A_SetShootable
        TNT1 A 0 A_UnsetInvulnerable
        TNT1 A 0 A_SetTranslucent(1)
		TNT1 A 0 A_Jump(15,"Rage")
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 Bright A_GiveInventory("MLGZombieStrafing",1)
		TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
        TNT1 A 0 A_JumpIfInventory ("ASGZAmmo", 16, "Reload")
        MLSC E 4 Bright A_FaceTarget
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_GiveInventory ("ASGZAmmo", 1)
		TNT1 A 0 A_PlaySound("MLGASG/Fire",5)
		TNT1 AAAAAAA 0 A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	    MLSC F 2 Bright A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
		MLSC E 9 Bright A_FaceTarget
		TNT1 A 0 Bright A_CPosRefire
        TNT1 A 0 A_Jump(6,"Heal")
        TNT1 A 0 A_Jump(5,"Heal2")
        TNT1 A 0 A_Jump(4,"Heal3")
		TNT1 A 0 A_Jump(10,"Grenade")
        TNT1 A 0 A_JumpIfCloser(300,"Grenade")
        Goto Missile+4 
	Reload:
    	TNT1 A 0 A_ChangeFlag("NoPain", 1)
    	TNT1 A 0 A_PlaySound("lasgguy/asgout")
		TNT1 A 0 A_SpawnItemEx("LegendaryEmptyDrumSpawner", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
    	MLSC E 48 Bright A_TakeInventory ("ASGZAmmo", 16)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
    	MLSC E 8 Bright A_PlaySound("lasgguy/asgin") 
		MLSC E 20 Bright A_PlaySound("LShotgun/Cock")
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
    	TNT1 A 0 A_ChangeFlag("NoPain", 0)
    	Goto See
  Rage:
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("MLGZombie/Sight",7,1.0,0,ATTN_NONE)
	MLSC EEEEEEEE 2 Bright A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_SetUserVar("user_missile",0)
  RageLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 20,"See")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	MLSC E 1 Bright A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("MLGASG/Fire",5)
	TNT1 AAAAAAA 0 A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC F 3 Bright A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC E 1 Bright A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("MLGASG/Fire",5)
	TNT1 AAAAAAA 0 A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC F 3 Bright A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC E 1 Bright A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("MLGASG/Fire",5)
	TNT1 AAAAAAA 0 A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC F 3 Bright A_CustomMissile("MLGASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	MLSC E 1 Bright A_GiveInventory("MLGZombieStrafing",1)
	TNT1 A 0 A_PlaySound("Weapons/GrenadeFire",0,1.0,0,0.4)
	MLSC F 1 Bright A_CustomMissile("MLGGrenadeImpact",32,0,0,2,4)
	TNT1 A 0 A_Jump(80,"MidRageTeleport")
	Loop
  MidRageTeleport:
	MLSC E 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	MLSC E 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
	MLSC EEE 1 Bright A_FadeOut(0.3,0)
	MLSC E 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	MLSC E 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	MLSC EEE 1 Bright A_FadeIn(0.3)
	TNT1 A 0 A_GiveInventory("MLGZombieStrafing",1)
	MLSC E 1 Bright A_FadeIn(0.1)
	MLSC E 1 Bright A_SetShootable
	Goto RageLoop
	Strafing:
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		MLSC AA 3 Bright A_GiveInventory("MLGZombieStrafing",1)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		MLSC BB 3 Bright A_GiveInventory("MLGZombieStrafing",1)
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		MLSC CC 3 Bright A_GiveInventory("MLGZombieStrafing",1)	
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		MLSC DD 3 Bright A_GiveInventory("MLGZombieStrafing",1)
		Goto See
	Mine:
	    MLSC C 1 Bright
		MLSC C 12 Bright A_CustomMissile("LACThrownMine",32,0,0,2,15)
		MLSC E 12 Bright
		MLSC C 3 Bright
		Goto See
	Grenade:
		TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
		MLSC CE 4 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
		MLSC E 1 Bright A_CustomMissile("MLGGrenade",32,0,0,2,4)
		Goto Dodge
    Pain:
	    TNT1 A 0 A_Jump(10,"Protection")
	    TNT1 A 0 A_Jump(20,"Dodge")
	    TNT1 A 0 A_Jump(192,"PainMissile")
        MLSC G 3 Bright
        MLSC G 3 Bright A_Pain
		TNT1 A 0 A_Jump(40,"Dodge")
        Goto See
    PainMissile:
        MLSC G 3 Bright
        MLSC G 3 Bright A_Pain
        Goto Missile	
	Protection:
		TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
		TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
		TNT1 A 0 A_PlaySound("legendary/defense")
		TNT1 A 0 A_FaceTarget
		MLSC E 2 Bright ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		Goto See	
    Death:
	    TNT1 A 0 A_Jump(36,"LegendarySoul")
	    TNT1 A 0 A_StopSound(6)
        MLSC H 5
        MLSC I 5 A_Scream
        MLSC J 5 A_Fall
		MLSC J 5 A_SpawnItem("BodyCrash",0,0,0,0)
        MLSC K 5
        MLSC L -1
        Stop
	LegendarySoul:
	    TNT1 A 0 A_StopSound(6)
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
        MLSC H 5
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
        MLSC I 5 A_Scream
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
        MLSC J 5 A_Fall
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
		MLSC J 5 A_SpawnItem("BodyCrash",0,0,0,0)
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
        MLSC K 5
		TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
		MLSC L 140
		MLSC L 0 A_PlaySoundEx("brain/spit","Voice",0,2)
		MLSC LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
		MLSC LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
		MLSC LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
		TNT1 A 0 A_SpawnItemEx("LegendarySoul",0,0,16,0,0,0,0,32)
		TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
		MLSC L -1
        Stop	
    XDeath:
	    TNT1 A 0 A_StopSound(6)
        MLSC O 5 A_SpawnItemEx("GreenGibbedGenerator",0,0,0,0,0,0,0,128,0)
        MLSC P 5 A_XScream
        MLSC Q 5 A_Fall
        MLSC RSTUV 5
        MLSC W -1
        Stop
    }
}

ACTOR INFMLGAssaultCaptain : MLGAssaultCaptain
{
Tag "\c[u3]MLG Assault Captain\c-"
States
{
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_Jump(140,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier3SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
    MLSC A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	MLSC Z 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("INFLegendaryAssaultCaptain",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR MLGASGBall : FastProjectile
{
  PROJECTILE
  Height 8
  Radius 4
  Speed 200
  Scale 0.2
  RenderStyle Add
  Alpha 1.0
  Decal Scorch
  Damage 16
  +FORCERADIUSDMG
  +NOTIMEFREEZE
  +THRUSPECIES
  DamageType "Legendary"
  DeathSound "weapons/demontechex"
  States
  {
  Spawn:
	TRA2 AB 1 Bright
	Loop  
  Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("MLGKaboom7ASG")
	TNT1 A 1 A_CustomMissile("MLGASGShotExplosion",0,0,0,2)
	Stop
	}
}

ACTOR MLGKaboom7ASG : NemesisKaboom7
{
Renderstyle Add
States
{
  Spawn:
	TNT1 A 0
	FXPG AABBCDEFGHIJKLM 1 Bright //A_FadeOut(0.05,1)
	Stop
	}
}

ACTOR MLGASGShotExplosion
{
Projectile
Speed 0
+FORCERADIUSDMG
+NOTIMEFREEZE
+NODAMAGETHRUST
Damagetype "Legendary"
States
{
  Spawn:
  Death:
	TNT1 A 0
	TNT1 A 1 A_Explode(80,256)
	Stop
	}
}

Actor MLGGrenadeImpact : NemesisGrenadeLowGrav
{
+LOWGRAVITY
States
{
  Spawn:
	HGN1 ABCDEFGH 3
	Loop
  Crash:
  Death:
  XDeath:
    HGN1 H 1 Bright A_ChangeFlag(EXTREMEDEATH,1)
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Explode(150,300)
	TNT1 A 0 Radius_Quake(2,24,0,15,0)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_PlaySound("weapons/hgrenadeex")
	TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner",0,0,0,0,0,0,0,128) 
	TNT1 AAA 0 A_CustomMissile("Kaboom7",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX4",0,0,random(0,360),2,random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_CLIENTSIDE,0)
	TNT1 A 1 Bright A_SpawnItem("MLGRocketEx")
	Stop
	}
}

ACTOR MLGRocketEx : LegendaryBlueRocketEx
{
States
  {
  Spawn:
	TNT1 A 0
	MLOC C 6 Bright
	MLOC DE 5 Bright
	Stop
  }
}

ACTOR MLGASGZombieGhostA
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOTIMEFREEZE
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    MLSC A 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR MLGASGZombieGhostB : MLGASGZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    MLSC B 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR MLGASGZombieGhostC : MLGASGZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    MLSC C 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR MLGASGZombieGhostD : MLGASGZombieGhostA
{   
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
    MLSC D 2 A_FadeOut(0.10)
    Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}
