Actor NemesisDementedTerminator
{
//Creator: Nemesiscaptain(uwu)and Makarov
//Origin: Infinity Gods
//Sprite: NDTR
//Title: "NemesisDementedTerminator" 
Monster
Health  24000
Radius 28 
Height 86 
Mass 0x7FFFFFFF
Speed 40
Scale 1.4
SeeSound "monster/dtermsit" 
PainSound "monster/dtermpin" 
DeathSound "monster/termdth"
ActiveSound "Terminator/dtermact"
BloodColor "Black"
//Nemesis Damage Factors
DamageFactor 0.45
DamageFactor "Explosion", 0.05
DamageFactor "DTRailgun", 0.4
DamageFactor "PDTPuff", 0.4
DamageFactor "RailG", 0.3
DamageFactor "T3rm", 0.0
//Terminator Damage Factors
DamageFactor "PlayerFireSword", 0.8
DamageFactor "CustomSpray", 0.0
DamageFactor "BFG9500Ball", 0.0
DamageFactor "Extreme", 0.0
DamageFactor "UltimateLegendary", 0.0
DamageFactor "HellComet", 0.0
DamageFactor "T3rm", 0.0
DamageFactor "PDTBFG", 0.03
DamageFactor "PDTBFGTracer", 0.03
DamageFactor "PlayerRailPuff", 0.0
DamageFactor "PDTPuff", 0.0
DamageFactor "FreezerBurn", 0.0
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0	
DamageFactor "CerEnergyBall", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "C0mm4nder", 0.0
DamageFactor "HFCyb3r", 0.3
DamageFactor "BFG10K", 0.65
DamageFactor "BFGSplash", 0.0
DamageFactor "BFGSpray", 0.0
DamageFactor "PlayerDevBall", 0.020
DamageFactor "PlayerDTBFGRailgunSlug", 0.020
DamageFactor "PlayerDevTracer", 0.020
DamageFactor "SuperWeapon", 0.0
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Legendary", 0.0
DamageFactor "TrueLegendaryDamage", 0.3
DamageFactor "TrueLegendaryPlayer", 0.3
DamageFactor "Cursed", 0.2
DamageFactor "Hackroid", 0.4
//Drops
DropItem "NemesisHealthBonusMax", 256, 64
DropItem "NemesisArmorBonus64", 256
DropItem "NemesisHealthBonusMax", 256, 64
DropItem "NemesisArmorBonus64", 256
DropItem "NemesisSuperSphere" 215
DropItem "NemesisAmmoSphere", 128, 1
DropItem "LegDemonRune", 80, 1
DropItem "NemesisRuneSpawnerTier4", 256, 1
DropItem "NemesisRuneSpawnerTier4", 256, 1
DropItem "TerminatorItem", 256, 1
DropItem "DemonicChalice", 256, 1
DropItem "SkullOfPower", 256, 1
DropItem "NemesisDemonicEnergy", 256
DropItem "NemesisGreaterDemonicEnergy", 256
DropItem "NemesisShell", 256
DropItem "NemesisShellBox", 130
DropItem "Nemesis Rifle", 200
DropItem "Nemesis Plasmatic Cannon", 200
DropItem "Nemesis Assault Shotgun", 200
DropItem "Nemesis Sawed-Off Shotgun", 200
DropItem "Nemesis BFG", 256
DropItem "TrueLegendaryRune" 25 1
DropItem "UpgradedNemesisArmor", 256, 1
+DONTHARMSPECIES
+MISSILEMORE
-FLOORCLIP
+FireResist
+NORADIUSDMG
+NOICEDEATH
+BOSS
+NOTARGET
+MISSILEEVENMORE
+CANTSEEK
+NOFEAR
+DONTSPLASH
+LOOKALLAROUND
+NOEXTREMEDEATH
+BOSSDEATH
+NOTIMEFREEZE
+NOTELEFRAG
+DONTGIB
+DONTMORPH
+QUICKTORETALIATE
+DONTRIP
+FLOAT
+NOGRAVITY
Species "cybers"
Obituary "%o was hunted, cornered, and annihilated by NemesisDementedTerminator."
  Tag "\c[v9]Nemesis Demented Terminator\c-"
var int user_music;
var int user_missile;
States 
{
  Spawn:
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR A 2 A_Look
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR B 2 A_Look
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,900,950)
	TNT1 A 0 ACS_ExecuteAlways(667)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR A 2 A_Chase
	TNT1 A 0 A_Jump(48,"Rush")
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR B 2 A_Chase
	TNT1 A 0 A_Jump(48,"Teleport")
	Loop
  Rush:
	NDTR A 0 A_Chase
	NDTR A 0 A_SpawnItemEx("NemesisDementedTerminatorGhost",0,0,0,0,0,0,0,128)
	NDTR A 2 A_Chase
	NDTR A 0 A_Chase
	NDTR A 0 A_SpawnItemEx("NemesisDementedTerminatorGhost",0,0,0,0,0,0,0,128)
	NDTR B 2 A_Chase
	NDTR A 0 A_Chase
	NDTR A 0 A_SpawnItemEx("NemesisDementedTerminatorGhost",0,0,0,0,0,0,0,128)
	NDTR A 2 A_Chase
	NDTR A 0 A_Chase
	NDTR A 0 A_SpawnItemEx("NemesisDementedTerminatorGhost",0,0,0,0,0,0,0,128)
	NDTR B 2 A_Chase
	TNT1 A 0 A_Jump(72,"See")
	Loop
  Teleport:
	NDTR A 0 A_UnSetShootable
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR EE 1 A_FadeOut(0.5,0)
	NDTR AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NDTR AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 A 0 A_PlaySound("boss/teleport")
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR EE 1 A_FadeIn(0.5)
	NDTR A 0 A_SetShootable
	Goto See
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIfCloser(300,"NemesisASG")
	TNT1 A 0 A_Jump(192,"Railgun","BFG9K","BFG10K","RedStar","OneTwoPunch","NemesisBFG","DTDevastator")
  Normal:   
	TNT1 A 0 A_JumpIfCloser(1500,1)
	Goto Railgun
	NDTR G 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	NDTR H 0 A_CustomMissile("NemesisZombieCannonLaser",48,-17,Random(-800,800)/100.00)
	NDTR H 2 Bright A_CustomMissile("NemesisZombieCannonLaser",48,-17,Random(-800,800)/100.00)
	TNT1 A 0 A_StopSoundEx("Weapon")	
	TNT1 A 0 A_Jump(15,"See","Missile")
	TNT1 A 0 A_SpidRefire
	Loop
  NemesisASG:
	NDTR E 4 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",26,26,58,Random(2, 6),0,Random(1, 3),Random(80,90),128)
	TNT1 AAAAAAAA 0 A_CustomMissile("NemesisASGBall",48,17,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	NDTR F 2 Bright A_PlaySoundEx("NemesisASG/Fire","Weapon")
	TNT1 A 0 A_StopSoundEx("Weapon")
	TNT1 A 0 A_Jump(15,"See","Missile")
    TNT1 A 0 A_SpidRefire
	Loop
  Railgun:
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	TNT1 A 0 A_Changeflag(reflective,1)
	TNT1 A 0 A_SetUserVar("user_missile", 0)
	NDTR EE 10 A_FaceTarget
  RailgunLoop:
	TNT1 A 0 A_JumpIf(user_missile > 40,"RailgunEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	NDTR E 2 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/darkcyberrail",CHAN_WEAPON)
	NDTR F 1 Bright A_CustomMissile("NemesisCyberRailLaser",58,26,random(-2,3))
	Loop
  RailgunEnd:
	NDTR E 15 Bright
	TNT1 A 0 A_Changeflag(reflective,0)
	TNT1 A 0 A_Jump(128,"BFG9K","BFG10K","RedStar","DTDevastator")
	Goto See	
  BFG9K:
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	NDTR EEEEEEEEEEEEFFFF 2 A_FaceTarget
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("NemesisCyberBFG9500Ball",48,15,random(-4,4))
	NDTR EE 4 A_FaceTarget   
	TNT1 A 0 A_Jump(128,"BFG10K","DTBFG","RedStar","DTDevastator")
	Goto See
  BFG10K:
	TNT1 A 0 A_Changeflag(reflective,1)
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	TNT1 A 0 A_SetUserVar("user_missile", 0)
	NDTR EEEEEEE 4 A_FaceTarget
  BFG10KLoop:
	TNT1 A 0 A_JumpIf(user_missile > 40,"BFG10KEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	NDTR E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("Nemesis10kProjectile",48,-15,random(-4,4))
	NDTR F 1 Bright A_CustomMissile("Nemesis10kProjectile",48,-15,random(-4,4))
	Loop
  BFG10KEnd:
	NDTR E 3 Bright A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	NDTR EEEEE 3 A_FaceTarget	
	NDTR E 4 A_FaceTarget
	TNT1 A 0 A_Changeflag(reflective,0)
	TNT1 A 0 A_Jump(128,"DTBFG","RedStar","DTDevastator")
	Goto See	
  RedStar:
	TNT1 A 0 A_PlaySoundEx("monster/dtermsit2","DTSIGHT")
	TNT1 A 0 A_SetInvulnerable
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	TNT1 A 0 A_PlayWeaponSound("star/load1")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	TNT1 A 0 A_PlayWeaponSound("star/load2")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("star/load3")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 0 A_FaceTarget
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 Bright A_SpawnItemEx("DTermLineSpawner")
	TNT1 A 0 A_UnSetInvulnerable
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SetUserVar("user_missile",0)
  RedStarLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 4,"RedStarEnd")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	NDTR F 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	NDTR F 2 Bright A_FaceTarget
	NDTR F 2 Bright A_FaceTarget
	NDTR F 2 Bright A_FaceTarget
	Loop
  RedStarEnd:
    TNT1 A 0 A_Jump(57,"OneTwoPunch")
	Goto See
  OneTwoPunch:
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	TNT1 A 0 A_StopSoundEx("Weapon")
	TNT1 A 0 A_Jump(20,"TwoRS","TwoDT")
	TNT1 A 0 A_SpidRefire
	Loop
 TwoRS:
	TNT1 A 0 A_Jump(160,"FTwoRS")
	TNT1 A 0 A_Jump(128,"LTwoRS")
  RTwoRS:
	TNT1 A 0 ThrustThing(Angle*256/360+64,12,0,0)
	TNT1 A 0 A_Jump(256,"FTwoRS")
  LTwoRS:
	TNT1 A 0 ThrustThing(Angle*256/360+192,12,0,0)
  FTwoRS:
 	NDTR E 0 A_FaceTarget
	NDTR E 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR E 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR E 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR E 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR E 0 A_PlayWeaponSound("star/fire")
	NDTR F 2 Bright A_CustomMissile("DivineGodTerminatorStar",78,17,0)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", -18, -15, 76, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	TNT1 A 0 A_Stop
	Goto See
 TwoDT:
		TNT1 A 0 A_Jump(160,"FTwoDT")
		TNT1 A 0 A_Jump(128,"LTwoDT")
  RTwoDT:
		TNT1 A 0 ThrustThing(Angle*256/360+64,12,0,0)
		TNT1 A 0 A_Jump(256,"FTwoDT")
  LTwoDT:
		TNT1 A 0 ThrustThing(Angle*256/360+192,12,0,0)
  FTwoDT:
 	NDTR E 0 A_FaceTarget
	TNT1 A 0 A_PlaySound("Cardinal/9k")
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR F 0 Bright A_CustomMissile("Nemesis10kProjectile",63,15,0)
	NDTR F 0 Bright A_CustomMissile("Nemesis10kProjectile",63,15,30)
	NDTR F 0 Bright A_CustomMissile("Nemesis10kProjectile",63,15,-30)
 	NDTR E 0 A_FaceTarget
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
 	NDTR E 0 A_FaceTarget
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	NDTR F 2 Bright A_CustomMissile("NemesisASGBall",88,-17)
	TNT1 A 0 A_Stop
	Goto See
  NemesisBFG:
    NDTR E 30 Bright A_FaceTarget
	TNT1 A 0 A_SetInvulnerable
	NDTR E 3 Bright A_PlaySoundEx("monster/dtermsit2","DTSIGHT")
	NDTR E 3 Bright A_PlaySound("NemesisBFG/charge",1)	
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_SetUserVar("user_missile",0)
  NemesisBFGCharging:
	TNT1 A 0 A_JumpIf(user_missile >= 38,"NemesisBFGFire")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 A 0 A_FaceTarget
	NDTR E 3 Bright A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	Loop
  NemesisBFGFire:
	NDTR EEEEEEEEEEEEE 0 A_SpawnItemEx("NemesisCyberFlameSpawner2")
	TNT1 A 0 A_UnSetShootable
    NDTR EEEEEEEEEEE 1 A_FadeOut(0.1,0)
	NDTR EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
    NDTR E 20
    NDTR E 1 A_PlayWeaponSound("boss/teleport")
	TNT1 A 0 A_FaceTarget
	NDTR EEEEEEEEEEEEE 0 A_SpawnItemEx("NemesisCyberFlameSpawner2")
	NDTR EEEEEEEEEEE 1 A_FadeIn(0.1)	
	TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	NDTR F 5 A_CustomMissile("NemesisGuruBall", 58, -26, 0, 0)
	Goto See
  DTDevastator:
	TNT1 A 0 A_PlaySoundEx("monster/dtermsit2","DTSIGHT")
	TNT1 A 0 A_SetUserVar("user_missile",0)
	NDTR E 0 Bright A_PlaySound ("devastator/charge")
  DevastatorLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 55,"DevastatorCharged")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 A 0 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 A_Facetarget
    Loop
  DevastatorCharged:
	NDTR F 0 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 A_Facetarget
	NDTR F 0 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 A_Facetarget
	NDTR F 0 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 A_Facetarget
	NDTR F 0 Bright A_SpawnItemEx("DTermLineSpawner")
	NDTR E 2 A_Facetarget
	NDTR F 0 A_PlaySound ("devastator/fire")
	NDTR F 0 Bright A_CustomMissile("VexedGeneralRDevastatorBall",78,17,-7)
	NDTR F 0 Bright A_CustomMissile("VexedGeneralRDevastatorBall",78,17,7)
	NDTR F 2 Bright A_FaceTarget
	NDTR F 2 Bright A_FaceTarget
	NDTR E 2 Bright A_FaceTarget
	NDTR EEEEEEEEEEEEEEEEEEEEEEE 2 Bright 
	NDTR E 2
	Goto See
  Pain:
	NDTR L 2 A_Pain	
	Goto Teleport
  PainMissile:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	Goto Missile
  Death:
    NDTR Q 10 A_Scream	
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	NTER SSSSSS 5 Bright A_CustomMissile("WhiteNemesisKaboom",random(10,60),random(30,-30),random(0,360),2,random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAAAAAAA 0 A_CustomMissile("NemesisCyberBouncyBFG",0,0,random(0,360),2,random(-5,30))
	TNT1 A 0 A_SpawnItemEx("NemesisDeathBall",0,0,0,0,0,0,0,SXF_SETMASTER,0)
	NTER SSSSSS 5 Bright A_CustomMissile("WhiteNemesisKaboom",random(10,60),random(30,-30),random(0,360),2,random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 A 0 A_SpawnItemEx("NemesisDeathBall",0,0,0,0,0,0,0,SXF_SETMASTER,0)
	NTER SSSSSS 5 Bright A_CustomMissile("WhiteNemesisKaboom",random(10,60),random(30,-30),random(0,360),2,random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 A 0 A_SpawnItemEx("NemesisDeathBall",0,0,0,0,0,0,0,SXF_SETMASTER,0)
	NTER SSSSSS 5 Bright A_CustomMissile("WhiteNemesisKaboom",random(10,60),random(30,-30),random(0,360),2,random(0,360))
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem",1,"VexedSpawn")
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem2",1,"VexedSpawn")
	NDTR TUVW 12
    NDTR "X" 6 A_Fall
	NDTR "Y" 2
	NDTR "Z" -1 A_KillMaster
	Stop
  VexedSpawn:
	TNT1 A 0 A_SpawnItemEx("NemesisNuke2")
	TNT1 A 0 A_SpawnItemEx("VexedNemesisDementedTerminator",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TELEFRAG)
	TNT1 A 1 A_NoBlocking
	Stop
    }
}

Actor INFNemesisDementedTerminator : NemesisDementedTerminator
{
Tag "\c[v9]Nemesis Demented Terminator\c-"
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR A 2 A_Look
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner")
	NDTR B 2 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Cyberdemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR NemesisDementedTerminatorGhost
{
Scale 1.4
RENDERSTYLE Translucent
Alpha 0.75
+NOGRAVITY
+CLIENTSIDEONLY
+DONTSPLASH
+NOINTERACTION
+NOCLIP
States
{
Spawn:
    NDTR A 2 A_FadeOut(0.18)
    Loop
    }
}
