Actor RuneOfTheNemesisHorde: TarmidhesRune Replaces TarmidhesRune
{
//Creator: Nemesiscaptain(uwu)and Makarov (GDWolf for original concept)
//Origin: Nexus Infinity
//Sprite: THRN
//Title: "RuneOfTheNemesisHorde"
ActiveSound "tlcyb/demand"
Inventory.PickupSound "Arcradimus/BFGElectric1"
Inventory.PickupMessage "The rune cracks open - Nemesis warriors emerge from the void!"
States
{
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_NamedExecuteWithResult("NexusNoFloat") == 0,2)
	TNT1 A 0 A_ChangeFlag(FLOATBOB,0)
    TNT1 A 0 A_CustomMissile ("NemesisHellionSmokeSpawner", 0, 0, random(0,-360), 2, random(0,360))
    TNT1 A 0 A_LoopActiveSound
	THRN AAAAAA 10 Bright A_CustomMissile ("NemesisHellionSmokeSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
    Goto Spawn+2
  Pickup:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,1)
	Goto NemesisNope
    TNT1 A 0 A_JumpIfInventory("RuneOfTheNemesisHordeToken",1,"Nope")
	TNT1 A 0 A_GiveInventory("RuneOfTheNemesisHordeToken",1)
	TNT1 A 0 A_GiveInventory("RuneOfTheNemesisHordeItem",1)
	TNT1 A 1 A_StopSound
	Stop
  Nope:
	THRN A 1
	Fail
  NemesisNope:
	TNT1 A 0 ACS_NamedLockedExecute("TarmidhesMessage",0)
    THRN A 1
	Fail
  }
}

ACTOR RuneOfTheNemesisHordeItem : CustomInventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
Inventory.InterHubAmount 1
Tag "The rune pulses with void energy... Nemesis warriors answer your call."
Inventory.Icon "THRXA0"
+INVENTORY.UNDROPPABLE
+INVENTORY.BIGPOWERUP
+INVENTORY.INVBAR
+FLOATBOB
+COUNTITEM
+FLOORCLIP
+NOTIMEFREEZE
States
	  {
      Use:
	    TNT1 A 0 A_PlaySound("Tarmidhesrune/use",7)
		//TNT1 A 0 A_TakeInventory("NemesisRuneIcon",1)
		TNT1 A 0 A_GiveInventory("RuneOfTheNemesisHordeIcon",1)
	    TNT1 AAAA 1 A_SpawnItemEx("FriendlyNemesisSpawner",0,0,0,0,0,0,0,SXF_SETMASTER,0,tid-1)
	    Stop
      }
}

ACTOR NemesisTeleportExplode
{
	+NOGRAVITY
	+NOINTERACTION
	Renderstyle Subtract
	Translation "0:255=%[0.00,0.00,0.00]:[2.00,2.00,2.00]"
	States
	{
	Spawn:
		YAE2 A 0 NoDelay A_SetScale(frandom(1.25,1.0))
		YAE2 A 0 A_PlaySound("Weapons/BombExp")
	Main:
        YAE2 ABCDEFGHIJKLMNO random(1,2) Bright A_FadeOut(0.03)
		YAE2 QSU random(1,2) A_FadeOut(0.03)
		Stop
	}
}

ACTOR FriendlyNemesisSpawner
{
Radius 24
Height 8
Speed 17
Monster
+FRIENDLY
-SHOOTABLE
-COUNTKILL
-SOLID
var int user_limit;
States
{
   Spawn:
    TNT1 A 0
	TNT1 A 0 A_SetAngle(random(0,359))
	TNT1 A 1 A_Recoil(-40)
	TNT1 A 0 A_JumpIf(user_limit > 3,"Spawner")
	TNT1 A 0 A_SetUserVar("user_limit",user_limit+1)
	TNT1 A 1 A_Recoil(-4)
	TNT1 A 2 A_Jump(48,"Spawner")
    Goto Spawn+3
   Spawner:
    TNT1 A 1 A_Jump(256,"NemesisZombie","NemesisAssaultCaptain","NemesisStealthTrooper","NemesisCommando")
	Goto Death
   NemesisZombie:
    TNT1 A 0 A_SpawnItemEx("NemesisTeleportExplode",0,0,30)
    TNT1 A 5 A_SpawnItemEx("FriendlyNemesisZombie",0,0,0,0,0,0,0,32|SXF_TRANSFERPOINTERS,0,tid)
	Goto Death
   NemesisAssaultCaptain:
    TNT1 A 0 A_SpawnItemEx("NemesisTeleportExplode",0,0,30)
    TNT1 A 5 A_SpawnItemEx("FriendlyNemesisAssaultCaptain",0,0,0,0,0,0,0,32|SXF_TRANSFERPOINTERS,0,tid)
	Goto Death
   NemesisStealthTrooper:
    TNT1 A 0 A_SpawnItemEx("NemesisTeleportExplode",0,0,30)
    TNT1 A 5 A_SpawnItemEx("FriendlyNemesisStealthTrooper",0,0,0,0,0,0,0,32|SXF_TRANSFERPOINTERS,0,tid)
	Goto Death
   NemesisCommando:
    TNT1 A 0 A_SpawnItemEx("NemesisTeleportExplode",0,0,30)
    TNT1 A 5 A_SpawnItemEx("FriendlyNemesisCommando",0,0,0,0,0,0,0,32|SXF_TRANSFERPOINTERS,0,tid)
	Goto Death
   Death:
	TNT1 A 1 A_Fall
	Stop
	}
}

ACTOR RuneOfTheNemesisHordeToken : LegendaryRuneItem { }
ACTOR RuneOfTheNemesisHordeIcon : LegendaryRuneItem { }

Actor FriendlyNemesisBase
{
  Monster
  Health 350
  Radius 9
  Height 56
  Speed 13
  PainChance 127
  MaxDropOffHeight 32
  MaxStepHeight 32
  Species "Player"
  DamageFactor "AllyRail", 0.0
  DamageFactor "AllyDTRG", 0.0
  DamageFactor "AllyDTRailgun", 0.0
  DamageFactor "AllyExplosion", 0.0
  DamageFactor "AllyDTPuff", 0.0
  DamageFactor "AllyDBFG", 0.0
  DamageFactor "Player", 0.0
  DamageFactor "Players", 0.0
  DamageFactor "FriendlyMonster", 0.0
  DamageFactor "PlayerNemesisPlasma", 0.0
  DamageFactor "PlayerDevTracer", 0.0
  DamageFactor "PlayerExplosive", 0.0
  DamageFactor "PlayerDTRG", 0.0
  DamageFactor "DTRailgun", 0.0
  DamageFactor "PDTBFGTracer", 0.0
  DamageFactor "LegendaryPlayer", 0.0
  DamageFactor "LegendaryGuruPlayer", 0.0
  DamageFactor "PDTPuff", 0.0
  DamageFactor "PlayerTear", 0.0
  DamageFactor "PlayerDBFG2", 0.0
  DamageFactor "PlayerDBFG10K2", 0.0
  DamageFactor "PlayerDevBall", 0.0
  DamageFactor "PlayerDevBall2", 0.0
  DamageFactor "PDTBFG", 0.0
  DamageFactor "DiscoBFG", 0.0
  DamageFactor "PlayerDemonicSkill", 0.0
  SeeSound "marine/see"
  ActiveSound "marine/active"
  PainSound "marine/pain"
  DeathSound "marine/death"
  Obituary "%o was killed by a friendly marine."
  MinMissileChance 1
  DamageFactor 0.55
  RadiusDamageFactor 0.55
  +NODROPOFF
  +FRIENDLY
  +QUICKTORETALIATE
  +DONTHARMSPECIES
  +DONTHARMCLASS
  +MISSILEMORE
  +MISSILEEVENMORE
  +NOBLOCKMONST
  +FLOORCLIP
  +NOTIMEFREEZE
  +THRUSPECIES
  var int user_minefield;
  States
  {
    Death:
        PLA1 I 10 A_Scream
        PLA1 J 10 A_NoBlocking
        PLA1 KLM 10
        PLA1 N -1
        Stop
    XDeath:
        PLAY O 5
        PLAY P 5 A_XScream
        PLAY Q 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
        PLAY Q 5 A_NoBlocking
        PLAY RSTUV 5
        PLAY W -1
        Stop
  }
}

ACTOR FriendlyNemesisZombie : FriendlyNemesisBase
{ 
  Health 1500
  Speed 20
  BloodColor "Black"
  DamageFactor 0.6
  RadiusDamageFactor 0.55
  DamageFactor "PlayerNemesisPlasma", 0.0
  DamageFactor "VileFires", 0.0
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "VengefulNemesisArmor", 85, 1
  DropItem "LegAmmoSphere", 88, 1
  DropItem "NemesisPowerShard", 35, 1
  DropItem "HandGrenadeAmmo", 235, 2
  DropItem "MineAmmo", 235, 2
  DropItem "Backpack", 198, 1
  DropItem "Armorplate", 205, 1
  DropItem "Portablemedkit", 210, 1
  DropItem "NLDemonAmmoBox", 200 
  DropItem "NLDemonAmmo", 250 
  DropItem "NemesisRuneSpawnerTier1", 60, 1
  DropItem "Nemesis Rifle", 128, 1
  SeeSound "NemesisZombie/Sight"
  PainSound "NemesisZombie/Pain"
  DeathSound "NemesisZombie/Death"
  ActiveSound "NemesisZombie/Active"
  Obituary "%o was killed by a friendly Nemesis Zombie."
  Tag "\c[v9]Friendly Nemesis Zombie\c-"
  States
  {
  Spawn:
	NSZO A 10 Bright A_Look
	TNT1 AA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Goto Idle
  Idle:
	NSZO A 0 A_Jump(48,"Find")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NSZO A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
	NSZO AA 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO BB 3 Bright A_GiveInventory("AIPatroling",1)
	NSZO C 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
    NSZO CC 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO DD 3 Bright A_GiveInventory("AIPatroling",1)
	Loop
  Find:
	TNT1 A 0 ACS_NamedExecuteAlways("Find Master Player",0,0,0,0)
    Goto Idle
  See:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	NSZO AA 3 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO BB 3 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(16,"GiveUp")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	NSZO CC 3 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO DD 3 Bright A_Chase
	TNT1 A 0 A_Jump(80,"Rush")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Loop
  GiveUp:
	NSZO A 10 Bright A_ClearTarget
	Goto Idle
  Rush:
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NSZO D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Loop
  Teleport:
	NSZO A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	NSZO A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NSZO A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	NSZO A 1 Bright A_SetShootable
	Goto See  
  Strafing:
	NSZO A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NSZO A 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NSZO A 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NSZO B 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NSZO B 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NSZO C 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NSZO C 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NSZO C 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NSZO D 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NSZO D 3 Bright A_GiveInventory("AIStrafing",1)
	Goto See
  Pause:
	TNT1 A 0 A_PlaySound("weapons/demontechsteam")
	NSZO EEEEE 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	Goto See  
  Missile:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	NSZO EEE 2 Bright A_GiveInventory("NemesisAIStrafing",1)
  MissileLoop:
	NSZO E 4 Bright A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisRifleShotPlayer",32,0,random(-2,2),0)
	NSZO F 4 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 A 0 A_Jump(10,"MidAttackTeleport")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_CPosRefire
	Loop
  MidAttackTeleport:
	NSZO E 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO E 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO EEE 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO EEE 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO EEE 1 Bright A_FadeOut(0.1,0)
	NSZO E 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NSZO E 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NSZO EEEEEEEEEE 1 Bright A_FadeIn(0.1)
	NSZO EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NSZO E 1 Bright A_FadeIn(0.1)
	NSZO E 1 Bright A_SetShootable
	Goto MissileLoop
  Pain:
	TNT1 A 0 A_Jump(30,"Teleport")
	NSZO G 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_Pain
	NSZO G 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	Goto See
  Death:
	TNT1 A 0 A_StopSound(6)	
	NSZO H 5 A_Scream
	NSZO I 5 A_Fall
	NSZO J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	NSZO K 5 
	TNT1 A 0 A_Jump(100,"MoreStuff")
	NSZO L -1
	Stop	
  MoreStuff:
	NSZO L 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NSZO LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NSZO LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NSZO L 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NSZO L -1
	Stop
  XDeath:
	TNT1 A 0 A_StopSound(6)
	NSZO O 3 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	NSZO P 3 A_XScream
	NSZO R 3 A_Fall
	NSZO STUV 3 
	TNT1 A 0 A_Jump(100,"MoreStuff2")
	NSZO W -1
	Stop
  MoreStuff2:
	NSZO W 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NSZO WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NSZO WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NSZO W 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NSZO W -1
	Stop
  }
}

ACTOR FriendlyNemesisRifleShotPlayer : NemesisRifleShotPlayer
{
+MTHRUSPECIES
DamageType "FriendlyMonster"
States
  {
  Death:
	TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom7",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisADemonTechEx",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 1 A_CustomMissile("FriendlyNemesisRifleShotExplosion",0,0,0,2)
	Stop
	}
}

ACTOR FriendlyNemesisRifleShotExplosion : NemesisRifleShotExplosionPlayer
{
+MTHRUSPECIES
DamageType "FriendlyMonster"
States
{
Spawn:
Death:
	TNT1 A 0
	TNT1 A 1 A_Explode(170,100)
	Stop
}
}

Actor NemesisAIStrafing : CustomInventory
{
  +INVENTORY.QUIET
  +INVENTORY.UNDROPPABLE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.AUTOACTIVATE
  +COUNTITEM
  Inventory.Amount 1
  Inventory.MaxAmount 0
  States
  {
  Pickup:
    NULL A 1
	NULL A 1 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    NULL A 1 NoiseAlert(0,0)
	NULL A 1 A_GiveInventory("AIJumping",1)
	NULL A 1 A_JumpIf(velx != 0 || vely != 0,2)
	NULL A 1 A_Jump(256,2)
	NULL A 1 A_Jump(235,5)
	NULL A 1 A_JumpIfInventory("StrafeSens",1,3)
	NULL A 1 A_GiveInventory("StrafeSens",1)
	NULL A 1 A_Jump(256,2)
	NULL A 1 A_TakeInventory("StrafeSens",1)
	NULL A 1 A_JumpIfInventory("StrafeSens",1,3)
	NULL A 1 ThrustThing(angle*256/360+38.7,5,0,0)
	NULL A 1 A_Jump(256,2)
	NULL A 1 ThrustThing(angle*256/360+38.7,-5,0,0)
    NULL A 1 A_FaceTarget
	NULL A 1 A_Jump(24,2)
	NULL A 1 A_JumpIfCloser(300,2)
	NULL A 1 A_Recoil(-1.5)
    Stop
	NULL A 1 A_Recoil(1.5)
    Stop
  }
}

ACTOR FriendlyNemesisAssaultCaptain : FriendlyNemesisBase
{
  Health 1700
  Speed 20
  BloodColor "Black"
  PainChance 20
  DamageFactor 0.6
  DamageFactor "PlayerNemesisPlasma", 0.0
  DamageFactor "VileFires", 0.0
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "StimKit", 222, 3
  DropItem "HealthFlask", 227, 5
  DropItem "Armorplate", 212, 1
  DropItem "LegAmmoSphere", 95, 1
  DropItem "Portablemedkit", 217, 1
  DropItem "NemesisRuneSpawnerTier1", 70, 1
  DropItem "VengefulNemesisArmor", 92, 1
  DropItem "NemesisPowerShard", 35, 1
  DropItem "HandGrenadeAmmo", 237, 2
  DropItem "MineAmmo", 242, 2
  DropItem "ModdedBackPack", 202, 1
  DropItem "NemesisShell", 256
  DropItem "NemesisShellBox", 130
  DropItem "Nemesis Assault Shotgun", 128, 1
  SeeSound "NemesisAssaultCaptain/sight"
  AttackSound " "
  PainSound "NemesisAssaultCaptain/pain"
  DeathSound "NemesisAssaultCaptain/death"
  ActiveSound "NemesisAssaultCaptain/active"
  Obituary "%o was killed by a friendly Nemesis Assault Captain."
  Tag "\c[v9]Friendly Nemesis Assault Captain\c-"
  var int user_infammo;
  States
  {
  Spawn:
	NASG A 10 Bright A_Look
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Goto Idle
  Idle:
	NASG A 0 A_Jump(48,"Find")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NASG A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
	NASG AA 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG BB 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_Jump(6,"Mine")
	NASG C 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
    NASG CC 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG DD 3 Bright A_GiveInventory("AIPatroling",1)
	Loop
  See:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG AA 4 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG BB 4 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(16,"GiveUp")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG CC 4 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG DD 4 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_Jump(64,"Mine")
	TNT1 A 0 A_Jump(64,"Rush")
	TNT1 A 0 A_Jump(64,"DodgeLeft","DodgeRight")
	TNT1 A 0 A_Jump(64,"Chase")
	Loop
  Find:
	TNT1 A 0 ACS_NamedExecuteAlways("Find Master Player",0,0,0,0)
    Goto Idle
  GiveUp:
	NASG A 10 Bright A_ClearTarget
	Goto Idle
  Chase:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG AA 1 Bright A_FastChase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_Jump(1,"Heal")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge")
	NASG AA 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge")
	NASG BB 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge")
	NASG BB 1 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	TNT1 A 0 A_JumpIfCloser(150,"Dodge")
	NASG CC 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_Jump(10,"Heal")
	TNT1 A 0 A_JumpIfCloser(150,"Dodge")
	NASG CC 1 Bright A_FastChase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge")
	NASG DD 1 Bright A_FastChase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfCloser(130,"Dodge")
	NASG DD 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	TNT1 A 0 A_Jump(95,"Mine")
	TNT1 A 0 A_Jump(128,"Dodge")
	Loop
  Rush:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG B 1 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisASGZombieGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NASG D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_Jump(85,"See")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Loop
  Heal:
	TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	NASG 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)
	NASG 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)
	NASG 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
  InfiniteAmmo:
	TNT1 A 0 A_JumpIf(user_infammo == 1,"Missile")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG A 5 Bright
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 ACS_NamedExecuteAlways("EnemyInfiniteAmmo",0)
	TNT1 A 0 A_PlaySound("legammo/use",0,1.0,0,0.5)
	Goto See
  SeeNoDodge:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG AABB 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	NASG CCDD 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	NASG AABB 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	NASG CCDD 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	NASG AABB 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	NASG CCDD 2 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	Goto Chase
  Dodge:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG A 1 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 ThrustThingZ(0, 20, 0, 0)
	TNT1 A 0 A_Jump(256, "DodgeRight", "DodgeLeft")
  DodgeLeft:
	TNT1 A 0 ThrustThing(angle*256/360+192, 15, 0, 0)
	TNT1 A 0 A_Jump(40,"Heal")
	TNT1 A 0 A_Jump(35,"Heal2")
	TNT1 A 0 A_Jump(30,"Heal3")
	TNT1 A 0 A_Jump(20,"InfiniteAmmo")
	Goto SeeNoDodge
  DodgeRight:
	TNT1 A 0 ThrustThing(angle*256/360+64, 15, 0, 0)
	TNT1 A 0 A_Jump(40,"Heal")
	TNT1 A 0 A_Jump(35,"Heal2")
	TNT1 A 0 A_Jump(30,"Heal3")
	TNT1 A 0 A_Jump(20,"InfiniteAmmo")
	Goto SeeNoDodge
  Teleport:
	NASG A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	NASG A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NASG A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	NASG A 1 Bright 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(30,"InfiniteAmmo")
	TNT1 A 0 A_Jump(30,"SuperCombo")
	NASG E 3 Bright A_GiveInventory("NemesisAIStrafing",1)
  MissileLoop:
	TNT1 A 0 A_JumpIf(user_infammo == 1,"MissileLoopInfAmmo")
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_JumpIfInventory("ASGZAmmo",16,"Reload")
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_GiveInventory("ASGZAmmo",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("NemesisASG/Fire",5)
	TNT1 AAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NASG F 2 Bright A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NASG E 4 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(3,"InfiniteAmmo")
	TNT1 A 0 A_Jump(20,"MidAttackTeleport")
	TNT1 A 0 A_Jump(10,"Grenade")
	TNT1 A 0 A_JumpIfCloser(300,"MidAttackTeleport")
	Loop
  MissileLoopInfAmmo:
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_TakeInventory("ASGZAmmo",16)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	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("NemesisASG/Fire",5)
	TNT1 AAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NASG F 2 Bright A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NASG E 4 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")
	Loop
  Strafing:
	NASG A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NASG A 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NASG A 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NASG B 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NASG B 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NASG C 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NASG C 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NASG C 3 Bright A_GiveInventory("AIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NASG D 3 Bright A_GiveInventory("AIStrafing",1)
    TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NASG D 3 Bright A_GiveInventory("AIStrafing",1)
	Goto See
  Mine:
	TNT1 A 0 A_JumpIf(user_infammo == 1,"MineInfAmmo")
	NASG C 1 Bright
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	NASG C 12 Bright A_CustomMissile("FriendlyNemesisSpringMineSet",32,0,0,2,15)
	NASG E 12 Bright
	NASG C 3 Bright
	Goto See
  MineInfAmmo:
	NASG C 1 Bright
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	NASG C 12 Bright A_CustomMissile("FriendlyNemesisSpringMineSet",32,0,0,2,15)
	NASG E 12 Bright
	TNT1 A 0 A_SetAngle(random(0,360))
	NASG C 3 Bright
	TNT1 A 0 A_Jump(64,"See")
	Loop
  Grenade:
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	NASG CE 4 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	NASG E 1 Bright A_CustomMissile("FriendlyNemesisGrenade",32,0,0,2,4)
	Goto Dodge
  MidAttackTeleport:
	NASG E 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG E 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG EEE 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG EEE 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG EEE 1 Bright A_FadeOut(0.1,0)
	NASG E 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NASG E 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG EEEEEEEEEE 1 Bright A_FadeIn(0.1)
	NASG EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG EEE 1 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 1 Bright A_FadeIn(0.1)
	NASG E 1 Bright A_SetShootable
	Goto Grenade
  SuperCombo:
	TNT1 A 0 A_JumpIf(user_infammo == 1,"Missile")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG A 5 Bright
	TNT1 A 0 ACS_NamedExecuteAlways("EnemyInfiniteAmmo",0)
	TNT1 A 0 A_PlaySound("legammo/use",0,1.0,0,0.5)
  SuperComboASG:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_TakeInventory("ASGZAmmo",16)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	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("NemesisASG/Fire",5)
	TNT1 AAAA 0 Bright A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 Bright A_CustomBulletAttack(15,12,4,0,"FriendlyNemesisASGPuffExplode",0)
	NASG F 2 Bright A_CustomBulletAttack(15,12,4,Random(5,15)*6,"FriendlyNemesisASGBulletPuff",0,CBAF_NORANDOM)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_TakeInventory("ASGZAmmo",16)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	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("NemesisASG/Fire",5)
	TNT1 AAAA 0 Bright A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 Bright A_CustomBulletAttack(15,12,4,0,"FriendlyNemesisASGPuffExplode",0)
	NASG F 2 Bright A_CustomBulletAttack(15,12,4,Random(5,15)*6,"FriendlyNemesisASGBulletPuff",0,CBAF_NORANDOM)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_TakeInventory("ASGZAmmo",16)
	NASG E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	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("NemesisASG/Fire",5)
	TNT1 AAAA 0 Bright A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 Bright A_CustomBulletAttack(15,12,4,0,"FriendlyNemesisASGPuffExplode",0)
	NASG F 2 Bright A_CustomBulletAttack(15,12,4,Random(5,15)*6,"FriendlyNemesisASGBulletPuff",0,CBAF_NORANDOM)
	NASG E 4 Bright A_FaceTarget
	Goto MidSuperCombo
  SuperComboGrenade:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	NASG CE 4 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	NASG E 1 Bright A_CustomMissile("FriendlyNemesisGrenade",32,0,0,2,4)
	TNT1 A 0 A_Jump(32,"See")
	Goto MidSuperCombo
  SuperComboMines:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	NASG C 1 Bright
	NASG C 6 Bright A_CustomMissile("FriendlyNemesisSpringMineSet",32,0,0,2,15)
	NASG E 6 Bright
	TNT1 A 0 A_SetAngle(random(0,360))
	NASG C 3 Bright
	TNT1 A 0 A_Jump(100,"MidSuperCombo")
	TNT1 A 0 A_Jump(32,"See")
	Loop
  MidSuperCombo:
	TNT1 A 0 A_JumpIf(user_infammo == 0,"See")
	NASG E 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG E 1 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 3 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 3 Bright A_FadeOut(0.1,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 3 Bright A_FadeOut(0.1,0)
	NASG E 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NASG E 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG EEEEEEEEEE 1 Bright A_FadeIn(0.1)
	NASG E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 3 Bright A_FadeIn(0.1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NASG E 1 Bright A_FadeIn(0.1)
	NASG E 1 Bright A_SetShootable
	TNT1 A 0 A_Jump(128,"SuperComboASG","SuperComboMines")
	Goto SuperComboGrenade
  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_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG E 20 Bright A_TakeInventory("ASGZAmmo",16)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG E 8 Bright A_PlaySound("lasgguy/asgin") 
	NASG E 10 Bright A_PlaySound("LShotgun/Cock")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_ChangeFlag("NoPain",0)
	Goto See
  Pain:
	TNT1 A 0 A_Jump(30,"Teleport")
	TNT1 A 0 A_Jump(20,"Dodge")
	NASG G 3 Bright
	NASG G 3 Bright A_Pain
	TNT1 A 0 A_Jump(40,"Dodge")
	Goto See
  Death:
	TNT1 A 0 A_StopSound(6)
	NASG H 5
	NASG I 5 A_Scream
	NASG J 5 A_Fall
	NASG J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	NASG K 5
	TNT1 A 0 A_Jump(100,"MoreStuff")
	NASG L -1
	Stop
  MoreStuff:
	NASG L 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NASG LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisAssaultCaptainItemRandomizer")
	NASG LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisAssaultCaptainItemRandomizer")
	NASG L 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NASG L -1
	Stop
  XDeath:
	TNT1 A 0 A_StopSound(6)	
	NASG O 5 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	NASG P 5 A_XScream
	NASG Q 5 A_Fall
	NASG RSTUV 5
	TNT1 A 0 A_Jump(100,"MoreStuff2")
	NASG W -1
	Stop
  MoreStuff2:
	NASG W 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NASG WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 1 A_SpawnItem("NemesisAssaultCaptainItemRandomizer")
	NASG WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW 1 A_SpawnItem("NemesisAssaultCaptainItemRandomizer")
	NASG W 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NASG W -1
	Stop
	}
}

ACTOR FriendlyNemesisASGBall : NemesisASGBallPlayer
{
  +MTHRUSPECIES
  DamageType "FriendlyMonster"
  Species "Player"
  States
  {
  Death:
	TNT1 A 0 Bright
	TNT1 A 0 A_SpawnItemEx("NemesisKaboom7ASG")
	TNT1 A 1 Bright A_CustomMissile("FriendlyNemesisASGShotExplosion",0,0,0,2)
	Stop
	}
}

ACTOR FriendlyNemesisASGShotExplosion : NemesisASGShotExplosionPlayer
{
Damagetype "FriendlyMonster"
Species "Player"
+MTHRUSPECIES
+FOILINVUL
States
{
Spawn:
Death:
	TNT1 A 0
	TNT1 A 1 A_Explode(70,60)
	Stop
}
}

Actor FriendlyNemesisASGPuffExplode : NemesisASGPuffExplode {Species "Player" Damagetype "FriendlyMonster" +MTHRUSPECIES}
Actor FriendlyNemesisASGBulletPuff : NemesisASGBulletPuff {Damagetype "FriendlyMonster"}
Actor FriendlyNemesisGrenade : NemesisGrenade {Species "Player" Damagetype "FriendlyMonster" +MTHRUSPECIES}

Actor FriendlyNemesisSpringMineSet
{
Radius 12
Height 9
Speed 7
+MOVEWITHSECTOR
+MISSILE
+DROPOFF
+NOBLOCKMAP
+NOTELEPORT
+THRUACTORS
+CANBOUNCEWATER
Damagetype "FriendlyMonster"
BounceType "Grenade"
BounceCount 3
Reactiontime 525
BounceSound "MINBNC"
States
{
  Spawn:
    TNT1 A 0 A_CountDown
    NSPM A 1 Bright
    Loop
  Death:
    TNT1 A 0
    TNT1 A 1 Bright A_CustomMissile("FriendlyNemesisSpringMineActive",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
    Stop
	}
}

Actor FriendlyNemesisSpringMineActive
{
Projectile
Radius 12
Height 9
Mass 1000000
Speed 0
WallBounceFactor 0.16
BounceFactor 0.36
BounceType "Grenade"
+DROPOFF
+FLOORCLIP
+NOTELEPORT
+FRIENDLY
+NODAMAGE
+BRIGHT
+FORCEPAIN
-NOGRAVITY
+MOVEWITHSECTOR
+FORCERADIUSDMG
+DONTHARMSPECIES
+THRUACTORS
+CANBOUNCEWATER
Species "Player"
Damagetype "FriendlyMonster"
Obituary "%o came too close to spring mine."
Tag "Spring Mine Planted"
var int user_counter;
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_RearrangePointers(AAPTR_NULL, AAPTR_TARGET, AAPTR_NULL)
    TNT1 A 0 A_PlaySound("SMNSET1")
    NSPM AAAAAAAAAA 2
    TNT1 A 0 A_PlaySound("SMNSET2")
    NSPM AD 1
  SpawnLoop:
    NSPM ADAD 1 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND,0,100,0,360,"Attack")
    TNT1 A 0 A_JumpIf(user_counter >= 300,"Attack")
    TNT1 A 0 A_SetUserVar("user_counter",user_counter + 1)
    Loop
  Attack:
    TNT1 A 0
    NSPM ABC 2
    TNT1 A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_DEFAULT, AAPTR_DEFAULT)
    TNT1 A 0 ThrustThingZ(0,45,0,0)
    TNT1 A 0 A_PlaySound("MINLNCH")
    NSPM AAAAAAAAA 2
    NSPM AAA 1
    TNT1 A 0 A_PlaySound("SPRNMNXP")
    TNT1 A 0 A_CustomMissile("FriendlyNemesisSpringMineActiveBomb",0,0,0,CMF_AIMDIRECTION)
    //TNT1 A 0 A_Explode(Random(350,400),200,0,1,100)
    TNT1 A 10 A_SpawnItemEx("WhiteProjExplodeLarge",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
    Stop
  Vanish:
    NSPM ADADADADADAD 1 A_FadeOut(0.1,1)
    Stop
	}
}

Actor FriendlyNemesisLiveMineBomb
{
Projectile
Speed 0
Damage 0
+NOCLIP
+FORCERADIUSDMG
DamageType "FriendlyMonster"
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_Explode(186,162)
    Stop
  }
}

Actor FriendlyNemesisSpringMineActiveBomb : FriendlyNemesisLiveMineBomb
{
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_Explode(Random(600,800),200,0,1,100)
    Stop
  }
}

ACTOR FriendlyNemesisStealthTrooper : FriendlyNemesisBase
{ 
  Health 1800
  Speed 20
  PainChance 25
  BloodColor "Black"
  Renderstyle Translucent
  Alpha 0.5
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "VengefulNemesisArmor", 85, 1
  DropItem "LegAmmoSphere", 60, 1
  DropItem "PartialKakuhou", 100, 3
  DropItem "NemesisPowerShard", 50, 1
  DropItem "HandGrenadeAmmo", 235, 2
  DropItem "MineAmmo", 235, 2
  DropItem "Backpack", 198, 1
  DropItem "Armorplate", 205, 1
  DropItem "Portablemedkit", 210, 1
  DropItem "NLDemonAmmoBox", 256 
  DropItem "NLDemonAmmo", 256 
  DropItem "NemesisShellBox", 200 
  DropItem "NemesisShell", 256 
  DropItem "NemesisRuneSpawnerTier1", 60, 1
  DropItem "Nemesis Rifle", 150
  DropItem "Nemesis Sawed-Off Shotgun", 100
  DamageFactor "PlayerNemesisPlasma", 0.0
  DamageFactor "VileFires", 0.0
  DamageFactor 0.6
  SeeSound "NemesisStealthTrooper/sight"
  PainSound "NemesisStealthTrooper/pain"
  DeathSound "NemesisStealthTrooper/death"
  ActiveSound "NemesisStealthTrooper/active"
  Obituary "%o was neutralized by a Friendly Nemesis Stealth Trooper."
  var int user_kakuhou;
  Tag "\c[v9]Friendly Nemesis Stealth Trooper\c-"
  States 
  {
  Spawn:
	TNT1 A 0 A_SetTranslucent(0.5)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST A 10 Bright A_Look
	Goto Idle
  Idle:
    TNT1 A 0 A_SetTranslucent(0.5)
	NMST A 0 A_Jump(48,"Find")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NMST A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
	NMST AA 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NMST BB 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_Jump(6,"Mine")
	NMST C 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
    NMST CC 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NMST DD 3 Bright A_GiveInventory("AIPatroling",1)
	Loop
  See:
	TNT1 A 0 A_SetTranslucent(0.5)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST A 0 A_JumpIfTargetInLOS("Strafing")
	NMST AA 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST BB 3 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(16,"GiveUp")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	NMST A 0 A_JumpIfTargetInLOS("Strafing")
	NMST CC 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST DD 3 Bright A_Chase
	TNT1 A 0 A_Jump(40,"Mine")
	TNT1 A 0 A_Jump(40,"Rush")
	TNT1 A 0 A_Jump(100,"Phase")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)  
	Loop
  Find:
	TNT1 A 0 ACS_NamedExecuteAlways("Find Master Player",0,0,0,0)
    Goto Idle
  GiveUp:
	NMST A 10 Bright A_ClearTarget
	Goto Idle
  Rush:
	NMST A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST B 1 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(80,"Phase")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisStealthTrooperGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NMST D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMST AA 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMST BB 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMST CC 3 Bright A_GiveInventory("NemesisAIStrafing",1)  
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMST DD 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	Goto See
  Phase:
	TNT1 A 0 A_PlaySound("phaseimp/teleport")
	NMST E 2 A_FaceTarget
	NMST E 1 A_SetTranslucent(0.35)
	NMST E 1 A_SetTranslucent(0.20)
	NMST E 1 A_SetTranslucent(0.10)
	Goto Phased
  UnPhase:
	TNT1 A 0 A_PlaySound("phaseimp/teleport")
	NMST E 1 A_SetTranslucent(0.15)
	NMST E 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SetTranslucent(0.5)
	NMST E 2 A_FaceTarget	
    Goto See  
  Phased:
	NMST AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_ExtChase(0,0)
	NMST AABBCCDDAABBCCDD 1 A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(24,"UnPhase")
	Goto Phased+32
  Teleport:
	TNT1 A 0 A_SetTranslucent(0.5)
	NMST A 1 Bright A_UnSetShootable
	NMST AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST AAAAA 1 A_FadeOut(0.1,0)
	NMST A 2 
	NMST AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NMST AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NMST A 1 A_PlayWeaponSound("boss/teleport")
	NMST AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMST AAAAA 1 A_FadeIn(0.1)
	NMST A 1 Bright A_SetShootable
	Goto See  
  Pause:
	NMST EEEEE 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	Goto See  
  Kakuhou:
	TNT1 A 0 A_JumpIf(user_kakuhou == 1,"Missile")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NASG A 5 Bright
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 ACS_NamedExecuteAlways("EnemyKakuhou",0)
	TNT1 A 0 A_CustomMissile("Ghoulshot",32)
	TNT1 A 0 A_PlaySound("Kakuhou/Use",0,1.0,0,0.5)
	Goto See
  NemesisSSG:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	NMS2 EE 10 A_FaceTarget
	TNT1 AA 0 A_SpawnItemEx("NemesisShellCasing", 0, 12, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NMS2 F 5 Bright A_PlaySoundEx("NemesisSSG/Fire1","Weapon")
	NMS2 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisSSG/Close",7,1.0,0,0.5)
	Goto Teleport
  NemesisSSGKakuhou:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	NMS2 EE 7 A_FaceTarget
	TNT1 AA 0 A_SpawnItemEx("NemesisShellCasing", 0, 12, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NMS2 F 5 Bright A_PlaySoundEx("NemesisSSG/Fire1","Weapon")
	NMS2 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisSSG/Close",7,1.0,0,0.5)
	Goto Teleport
  NemesisSSGSniper:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	NMS2 EE 10 A_FaceTarget
	TNT1 A 0 A_FaceTarget
	NMS2 EEEEEEEEEEEEEEEEEEEE 1 A_CustomRailgun(-1,10,NONE,NONE,RGF_SILENT|RGF_NOPIERCING,1,0,"RailTargetPuff",0,0,0,0,2,0,"NemesisCyberNobleRailTarget")
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-8,8),CMF_OFFSETPITCH,frandom(-4,4))
	NMS2 F 5 Bright A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NMS2 E 10 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("FriendlyNemesisASGBall",32,0,frandom(-8,8),CMF_OFFSETPITCH,frandom(-4,4))
	NMS2 F 5 Bright A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NMS2 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisSSG/Close",7,1.0,0,0.5)
	Goto MissileLoop
  Missile:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_Jump(30,"Kakuhou")
	TNT1 A 0 A_Jump(30,"NemesisSSGSniper")
	NMST E 10 A_FaceTarget
  MissileLoop:
	TNT1 A 0 A_JumpIf(user_kakuhou == 1,"MissileLoopKakuhou")
	TNT1 A 0 A_JumpIfCloser(350,"NemesisSSG")
	NMST E 3 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisRifleShotPlayer",32,0,random(-2,2),0)
	NMST F 3 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 A 0 A_SpidRefire
	TNT1 A 0 A_Jump(20,"Pause")
	TNT1 A 0 A_Jump(55,"Nade")
	TNT1 A 0 A_Jump(20,"Mine")
	Loop
  MissileLoopKakuhou:
	TNT1 A 0 A_JumpIfCloser(350,"NemesisSSGKakuhou")
	NMST EE 1 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisRifleShotPlayer",32,0,random(-2,2),0)
	NMST F 2 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 A 0 A_SpidRefire
	TNT1 A 0 A_Jump(10,"Pause")
	TNT1 A 0 A_Jump(30,"Nade")
	TNT1 A 0 A_Jump(10,"Mine")
	Loop
  Nade:
	NMST E 1 A_JumpIfCloser(1000,1)
	Goto Missile
	NMST E 0 A_JumpIfCloser(280,"Missile")
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	NMST EE 4 A_GiveInventory("NemesisAIStrafing",1)
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	TNT1 A 0 A_GiveInventory("NemesisAIStrafing",1)
	NMST E 6 A_CustomMissile("FriendlyNemesisGrenade",32,0,0,2,10)
	NMST E 1
	Goto See
  Mine:
	NMST C 1 Bright
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	NMST C 12 Bright A_CustomMissile("FriendlyNemesisSpringMineSet",32,0,0,2,15)
	NMST E 12 Bright
	NMST C 3 Bright
	Goto See
  Pain:
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_Jump(30,"Teleport")
	TNT1 A 0 A_Jump(90,"Phase")
	NMST G 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	NMST G 0 A_Pain
	NMST G 3 Bright A_GiveInventory("NemesisAIStrafing",1)
	Goto See
  XDeath:
  Death:
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_StopSound(6)
	NMST H 5 A_Scream
	NMST I 5 A_Fall
	NMST J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_Jump(100,"MoreStuff")
	NMST L -1 
	Stop
  MoreStuff:
	NMST L 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NMST LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NMST LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NMST L 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NMST L -1
	Stop
	}
}

Actor FriendlyGhoulShot : GhoulShot
{
Species "Player"
Damagetype "FriendlyMonster"
+MTHRUSPECIES
States
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_PlaySound("Kagune/Spawn",0,1.0,0)
	Fly:
		KAGU PPPPPPPPPP 2 A_SpawnItemEx("KaguneGas",random(5,-5),random(3,-3),random(3,-3),0,0,0,random(0,360))
		Goto Death
	Death:
		TNT1 A 0
		TNT1 A 1
		TNT1 AAAA 0 A_SpawnItemEx("KaguneGas",random(5,-5),random(3,-3),random(3,-3),random(-8,8),random(-8,8),random(-8,8),random(0,360))
		TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("FriendlyKaguneShard",0,0,0,25,random(-16,16),momz+random(-13,13),0,0,0)
		Stop
	}
}

Actor FriendlyKaguneShard : KaguneShard {Species "Player" Damagetype "FriendlyMonster" +MTHRUSPECIES}

ACTOR FriendlyNemesisCommando : FriendlyNemesisBase
{
  Health 1800
  BloodColor "Black"
  DamageFactor 0.6
  DamageFactor "PlayerNemesisPlasma", 0.0
  DamageFactor "VileFires", 0.0
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "NemesisHealthBonusMax", 256, 32
  DropItem "NemesisArmorBonus32", 256
  DropItem "VengefulNemesisArmor", 100, 1
  DropItem "LegAmmoSphere", 88, 1
  DropItem "NemesisPowerShard", 50, 1
  DropItem "HandGrenadeAmmo", 235, 2
  DropItem "MineAmmo", 235, 2
  DropItem "Backpack", 198, 1
  DropItem "Armorplate", 205, 1
  DropItem "Portablemedkit", 210, 1
  DropItem "NLDemonAmmoBox", 200 
  DropItem "NLDemonAmmo", 250 
  DropItem "NemesisRuneSpawnerTier1", 80, 1
  DropItem "Nemesis Plasmatic Cannon", 128, 1
  SeeSound "NemesisCommando/sight"
  PainSound "NemesisCommando/pain"
  DeathSound "NemesisCommando/death"
  ActiveSound "NemesisCommando/active"
  Obituary "%o was nullified by a Friendly Nemesis Commando."
  Tag "\c[v9]Friendly Nemesis Commando\c-"
  States
  {
  Spawn:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    NCOS A 10 Bright A_Look
    Goto Idle
  Idle:
	NCOS A 0 A_Jump(48,"Find")
    TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	NCOS A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
	NCOS AA 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NCOS BB 3 Bright A_GiveInventory("AIPatroling",1)
	NCOS C 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
    NCOS CC 3 Bright A_GiveInventory("AIPatroling",1)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NCOS DD 3 Bright A_GiveInventory("AIPatroling",1)
	Loop
  See:
    NCOS A 0 A_JumpIfTargetInLOS("Strafing")
    NCOS AABB 3 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_Jump(16,"GiveUp")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NCOS A 0 A_JumpIfTargetInLOS("Strafing")
	NCOS CCDD 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NCOS A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    Loop
  Find:
	TNT1 A 0 ACS_NamedExecuteAlways("Find Master Player",0,0,0,0)
    Goto Idle
  GiveUp:
	NCOS A 10 Bright A_ClearTarget
	Goto Idle
  Rush:
    NCOS A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS B 1 Bright A_Chase
	TNT1 A 0 ACS_NamedExecuteAlways("Check For Master Player Calling Help",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisCommandoGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NCOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NCOS AA 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NCOS BB 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NCOS CC 3 Bright A_GiveInventory("NLegZombieStrafing2",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NCOS DD 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	Goto See
  Teleport:
	NCOS A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NCOS AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	NCOS A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NCOS A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NCOS AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	NCOS A 1 Bright A_SetShootable
	Goto See  
  Pause:
	NCOS EEEEE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	Goto See	
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_Jump(88,"Laser","IonBeam","MiniBFG","10kProjectiles")
  Normal:
	NCOS EEEE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	NCOS E 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisCannonProj",32,0,0)
	NCOS F 3 Bright A_PlaySound("NemesisCannon/Fire",7)
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Goto Normal+3
  Laser:
	NCOS E 0 A_SetInvulnerable
	NCOS E 1 Bright A_FaceTarget
	NCOS EEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	LEGW A 0 A_PlaySound("NemesisCannon/Mode2")
	NCOS EEEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	NCOS E 0 A_UnSetInvulnerable
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisZombieCannonLaser",32,0,random(-6,6))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	NCOS EEEEEE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_Jump(80,"MiniBFG")
	Goto See
  IonBeam:
	NCOS E 0 A_PlaySound("cydes/mischrg",7,1,0,0.5)
	NCOS E 1 Bright A_FaceTarget
	NCOS EEEEEEEEEEEEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",CHAN_WEAPON)
	NCOS F 7 Bright A_CustomMissile("FriendlyNemesisCannonIonBeam",32,0,0)
	NCOS E 10 Bright A_FaceTarget
	TNT1 A 0 A_Jump(196,"See")
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",CHAN_WEAPON)
	NCOS F 7 Bright A_CustomMissile("FriendlyNemesisCannonIonBeam",32,0,0)
	NCOS E 10 Bright A_FaceTarget
	Goto See
  MiniBFG:
	NCOS E 0 A_SetInvulnerable
	NCOS E 0 A_PlaySound("superzombie/sight")
	NCOS E 1 Bright A_FaceTarget
	NCOS EEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	TNT1 A 0 A_PlayWeaponSound("star/load3")
	NCOS EEEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	NCOS E 0 A_UnSetInvulnerable
	NCOS F 0 A_PlayWeaponSound("star/fire")
	NCOS F 7 Bright A_CustomMissile("FriendlyMiniNemesisBFGBall",32,0,0)
	NCOS EEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	NCOS F 0 A_PlayWeaponSound("star/fire")
	NCOS F 7 Bright A_CustomMissile("FriendlyMiniNemesisBFGBall",32,0,0)
	NCOS EEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	NCOS E 8 Bright A_FaceTarget
	Goto See
  10kProjectiles:
	NCOS E 0 A_SetInvulnerable
	NCOS E 1 Bright A_FaceTarget
	NCOS EEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	NCOS EEEEEEEE 3 Bright A_GiveInventory("NLegZombieStrafing3",1)
	NCOS E 0 A_UnSetInvulnerable
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("FriendlyNemesis10kProjectile",32,0,Random(-4,4))
	NCOS FE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	NCOS EEEEEE 3 Bright A_GiveInventory("NLegZombieStrafing2",1)
	TNT1 A 0 A_Jump(80,"MiniBFG")
	Goto See
  Pain:
	TNT1 A 0 A_Jump(35,"Teleport")
	NCOS G 3 Bright
	NCOS G 3 Bright A_Pain
	Goto See
  XDeath:
  Death:
	TNT1 A 0 A_StopSound(6)
	NCOS H 5 A_Scream
    NCOS I 5 A_Fall
    NCOS J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    NCOS KLM 5 
	TNT1 A 0 A_Jump(100,"MoreStuff")
    NCOS N -1 
	Stop
  MoreStuff:
	NCOS N 100
	TNT1 A 0 A_SpawnItem("HellionSmokeAttack")
	NCOS NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NCOS NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN 1 A_SpawnItem("NemesisZombieItemRandomizer")
	NCOS N 1 A_SpawnItem("NemesisZombieSuperItemRandomizer")
	NCOS N -1
	Stop	
    }
}

Actor FriendlyNemesisZombieCannonLaser : NemesisCannonLaserPlayer
{
  Damagetype "FriendlyMonster"
  Species "Player"
  +MTHRUSPECIES
  States
  {
  Death:
	TNT1 A 0
	TNT1 A 0 A_Explode(128,128,0,1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisCannonShotExplosion")
	TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplode")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom3",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))
    TNT1 A 10 Bright
    Stop
  }
}

ACTOR FriendlyNemesisCannonShotExplosion : NemesisCannonShotExplosion
{
Damagetype "FriendlyMonster"
Species "Player"
+FOILINVUL
States
{
Spawn:
Death:
	TNT1 A 0
	TNT1 A 1 A_Explode(280,200,0,0)
	Stop
}
}

ACTOR FriendlyNemesisCannonProj : NemesisCannonProjPlayer
{
Species "Player"
Damagetype "FriendlyMonster"
+MTHRUSPECIES
States
	{
	Death:
	TNT1 A 0 A_PlaySound("weapons/rocklx",2)
	XDeath:
	TNT1 A 0
	TNT1 AA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom3",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_CustomMissile("FriendlyNemesisCannonShotExplosion",0,0,0,2)
	TNT1 I 8 Bright A_Explode(128,128,0)
	TNT1 J 6 Bright
	TNT1 K 4 Bright
	Stop
	}
}

ACTOR FriendlyNemesisCannonIonBeam : NemesisCannonIonBeamPlayer
{
  Species "Player"
  DamageType "FriendlyMonster"
  +MTHRUSPECIES
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("NemesisIonBeamTrail")
	TNT1 A 0 A_SpawnItemEx("NemesisCannonIonBeamParticle",0,0,0,frandom(-1,1),frandom(-1,1),frandom(-1,1))
	CLBA D 1 A_Explode(100,92,0,0)
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_Explode(500,256,0,1)
	TNT1 A 0 A_CustomMissile("FriendlyNemesisCannonShotExplosion")
	TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplodeLarge")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))
	TNT1 AAAAAAAA 0 A_SpawnItemEx("FriendlyNemesisCannonProj",Random(-8,8),Random(-8,8),Random(-8,8),Random(45,70),0,Random(-3,3),Random(170,190),SXF_NOCHECKPOSITION)	
	TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("FriendlyNemesisCannonProj",Random(-8,8),Random(-8,8),Random(-8,8),Random(45,70),0,Random(-3,3),Random(-14,14),SXF_NOCHECKPOSITION)
    TNT1 A 50 Bright
    Stop
  }
}

ACTOR FriendlyMiniNemesisBFGBall : PlayerMiniNemesisBFGBall
{
  -SEEKERMISSILE
  +MTHRUSPECIES
  Species "Player"
  Damagetype "FriendlyMonster"
  Scale 1.5
  Speed 60
  Damage 100
  Bouncetype None
  States
  {
  Spawn:
	TNT1 A 0 Bright A_LoopActiveSound
	TNT1 A 0 A_SpawnItemEx("MiniCyberNemesisGuruSphereSmokeProjectile",0,0,0,frandom(-1,1),frandom(-1,1),frandom(-1,1),random(0,359))
    CLBB D 1 Bright A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
	TNT1 AA 0 A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 Radius_Quake(5,60,0,10,0)
	TNT1 A 0 A_Explode(50,400,0)
	TNT1 A 0 A_SpawnItemEx("MiniCyberNemesisGuruSphereSmokeProjectile",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
    CLBB D 6 Bright A_SpawnItem("NemesisWhiteProjExplodeLarge")
	TNT1 A 0 A_Explode(50,400,0)
	TNT1 A 0 A_SpawnItemEx("MiniCyberNemesisGuruSphereSmokeProjectile",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
    CLBB D 6 Bright A_SpawnItem("NemesisWhiteProjExplodeLarge")
	TNT1 A 0 A_Explode(50,400,0)
	TNT1 A 0 A_SpawnItemEx("MiniCyberNemesisGuruSphereSmokeProjectile",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
    CLBB D 6 Bright A_SpawnItem("NemesisWhiteProjExplodeLarge")
	TNT1 A 0 A_Explode(50,400,0)
	TNT1 A 0 A_SpawnItemEx("MiniCyberNemesisGuruSphereSmokeProjectile",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("NemesisWhiteProjParticleSuperLarge2",0,0,0,frandom(-10,10),frandom(-10,10),frandom(-10,10),random(0,359))
    CLBB D 6 Bright A_SpawnItem("NemesisWhiteProjExplodeLarge")
	TNT1 A 1 A_SpawnItem("FriendlyMiniNemesisDeathBall")
    Stop
  }
}

Actor FriendlyMiniNemesisDeathBall : MiniNemesisDeathBall
{
Species "Player"
DamageType "FriendlyMonster"
+FOILINVUL
+MTHRUSPECIES
States
	{
	Spawn:
		TNT1 A 0 Bright
		TNT1 A 0 Bright A_PlaySound("Weapons/GuruBlast3",5) 
		Goto Death
	Death:
		TNT1 A 0 A_PlaySound("Weapons/GuruBlast3",5)
		TNT1 A 0 Radius_Quake(15,20,0,20,0)
		//COLLATERAL DAMAGE EFFECTS
		TNT1 A 0 A_Explode(2048,700,0,1)
		TNT1 A 0 A_BFGSpray("FriendlyMiniNemesisGuruSpray",15,20)
		//IMPACT STUFF
		TNT1 A 0 A_SpawnItemEx("MiniNemesisBFGExplodeFX",0,0,10)
		TNT1 A 0 A_SpawnItemEx("MiniNemesisGuruStruckGlowX",0,0,10,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 A 0 A_SpawnItemEx("MiniNemesisGuruStruckGlowY",0,0,10,0,0,0,0,SXF_CLIENTSIDE,0)
		TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("FriendlyNemesisGuruSphereSmoke",random(126,-126),random(126,-126),random(66,-66),0.00001*random(100000,-100000),0.00001*random(100000,-100000),0.00001*random(100000,-100000),random(0,359),SXF_SETMASTER,0)
		TNT1 AAAAAAAAAAA 0 A_SpawnItemEx("MiniNemesisGuruChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
		TNT1 AAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("MiniNemesisGuruChunkSpark",random(126,-126),random(126,-126),random(66,-66),0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
		Stop
	}
}

ACTOR FriendlyMiniNemesisGuruSpray : MiniNemesisGuruSpray
{
Species "Player"
DamageType "FriendlyMonster"
+FOILINVUL
+MTHRUSPECIES
}

Actor FriendlyNemesisGuruSphereSmoke : CyberGuruSphereSmoke 
{
Damagetype "FriendlyMonster"
Scale 1.4 
States
	{
	Spawn1:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP1 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	Spawn2:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP2 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	Spawn3:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP3 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	Spawn4:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP1 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	Spawn5:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP2 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	Spawn6:
		TNT1 A 0 A_SetScale(ScaleX -0.002, ScaleY -0.002)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 A_Explode(10,164)
		NHP3 A 4 Bright A_FadeOut(0.0065,1)
		Loop
	}
}

Actor FriendlyNemesis10kProjectile : Nemesis10kProjectile
{
Species "Player"
DamageType "FriendlyMonster"
+FOILINVUL
+MTHRUSPECIES
}

//Test

ACTOR NemesisMarineBeacon : CustomInventory
{
+INVBAR
Inventory.MaxAmount 8
Inventory.InterHubAmount 8
Inventory.Icon "B3ACZ0"
Inventory.PickupSound "Beacon/Pickup"
Inventory.PickupMessage "Marine Beacon"
Tag "Beacon - Single Marine"
Scale 0.8
States
{
  Spawn:
	B3AC A -1
    Stop
  Use:
	TNT1 A 1 A_SpawnItemEx("NemesisBeaconActivated",0,0,16,8,0,4,0,0)
	Stop
}
}

ACTOR NemesisBeaconActivated
{
Monster
Health 1000
Radius 6
Height 28
Mass 9999
+FLOORCLIP
+FRIENDLY
+NOTELEPORT
-COUNTKILL
-SHOOTABLE
-SOLID
States
{
  Spawn:
    B3AC ABCDE 6
    B3AC E 20
    B3AC F 15 Bright A_PlaySound("beacon/alarm")
    B3AC E 20
    B3AC F 15 Bright A_PlaySound("beacon/alarm")
    B3AC E 20
    B3AC F 15 Bright A_PlaySound("beacon/alarm")
    B3AC F 35 Bright
    B3AC E 70 A_SpawnItemEx("NemesisBeaconActivatedSpawner",0,0,0,0,0,0,0,32|SXF_SETMASTER)
	B3AC A 1
    Goto Death
  Death:
	TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("TeleportFog")
	Stop
  }
}

ACTOR NemesisBeaconActivatedSpawner
{
Radius 12
Height 8
Speed 17
Monster
+FRIENDLY
-SHOOTABLE
-COUNTKILL
-SOLID
States
{
   Spawn:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx("TeleportFog")
    TNT1 A 5 A_SpawnItemEx("FriendlyNemesisCommando",0,0,0,0,0,0,0,32|SXF_TRANSFERPOINTERS)
	Goto End
   End:
	TNT1 A 1 A_Fall
	Stop
}
}