Actor TruePromisedGodDoomSlayer : VexedNemesisDoomSlayer
{
//Creator: Nolram
//Origin: Infinity Gods (Originally Doomslayer from Nexus)
//Sprite: BND0
//Title: "True Promised God DoomSlayer" 
  Health 30000
  Mass 1200
  Speed 75
  FastSpeed 90
  MeleeRange 80
  Scale 1.4
  BloodColor "Blue"
  PainChance 7
  Monster
-NODROPOFF
+Boss
+noicedeath
+FASTMELEE
+NOFEAR
+NOTIMEFREEZE
+NORADIUSDMG
+NOEXTREMEDEATH
+LookAllAround
+DontHurtSpecies
+DONTHARMSPECIES
  Species "LegendaryDoomguy"
  Damagetype "Legendary"
  DamageFactor 0.11
  DamageFactor "Ice", 0.065
  DamageFactor "InsanityHell", 0.0
  DamageFactor "Explosion", 0.0001
  DamageFactor "PlayerDTRG", 0.0001
  DamageFactor "DTRailgun", 0.0001
  DamageFactor "PDTPuff", 0.0001
  DamageFactor "RailG", 0.0001
  DamageFactor "PyroShot", 0.0001
  DamageFactor "PlayerPyro", 0.0001
  DamageFactor "PlayerBHole", 0.025
  DamageFactor "PlayerDBFG", 0.015
  DamageFactor "PlayerDBFG2", 0.015
  DamageFactor "PlayerNemesisPlasma", 0.15
  DamageFactor "Cursed", 0.1
  DamageFactor "Hackroid", 0.165
  DamageFactor "Legendary", 0.0
  DamageFactor "TrueLegendaryDamage", 0.0
  DamageFactor "TrueLegendaryPlayer", 0.0
  PainChance "Explosion", 128
  PainChance "PlayerDTRG", 128
  PainChance "DTRailgun", 128
  PainChance "PDTPuff", 128
  PainChance "RailG", 128
  DropItem "TrueLegendaryCell" 256 1
  DropItem "TrueLegendaryCell" 128 1
  DropItem "TrueLegendaryCellPack" 128 1
  DropItem "LegendaryFusionCell" 128 1
  DropItem "LegendaryShell" 256 4
  DropItem "LegendaryShellBox" 256
  DropItem "LegendaryBulletBox" 256 
  DropItem "LegendaryLMGBulletMag" 256 20
  DropItem "LegendaryPowerShard" 256 1
  SeeSound "NemesisDoomslayer/taunt"
  ActiveSound " "
  PainSound "NemesisDoomslayer/pain"
  DeathSound "NemesisDoomslayer/death"
  AttackSound " "
  Obituary "%o was sent a ticket back to hell by the \c[o7]True Promised God DoomSlayer\c-!!!"
  Tag "\c[o7]True Promised God DoomSlayer\c-"
  Translation "0:255=%[0.00,0.00,0.00]:[0.25,0.40,1.55]"
  var int user_mastertid;
  var int user_music;
  var int user_missile;
  var int user_powershard;
  var int user_powershardlimit;
  var int user_powersphere;
  var int user_resistancebufflimit;
  var int user_resistancebuff;
  var int user_skullofpower;
  var int user_infammo;
  var int user_bfg;
  var int user_deathtimer;
  var int user_deathtimeractive;
  var int user_nemesis;
  States
  {
  Spawn:
	BND0 A 5 A_Look
	TNT1 AAA 0 Bright A_SpawnItemEx("LegArmorSpark",random(-30,30),random(-30,30),random(15,30),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0,2),0,0,64)
	TNT1 A 0 A_SpawnItemEx("ArmorParticleBlue",random(-12,12),random(-12,12),random(-12,12),random(-2,2),random(-2,2),random(-2,2),random(-20,20))
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1760,1012)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 AA 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 BB 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 CC 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 DD 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Jump(64,"Mines")
	TNT1 A 0 A_Jump(30,"Jump")
	TNT1 A 0 A_Jump(80,"Rush","Teleport")
	Loop
  Rush:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Jump(80,"See","Teleport")
	Loop
  Teleport:
	BND0 A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItem("TrueLegendaryCyberFlameSpawner",0,0,0,0)
	BND0 AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	BND0 A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	BND0 A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItem("TrueLegendaryCyberFlameSpawner",0,0,0,0)
	BND0 AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	BND0 A 1 Bright A_SetShootable
	Goto See  
  Strafing:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	BND0 AA 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	BND0 BB 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	BND0 CC 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	BND0 DD 2 A_GiveInventory("DTZombieStrafing",1)
	Goto See 
  Jump:
	    TNT1 A 0 A_Jump(120,"HighJump")
		TNT1 A 0 ThrustThingZ(0,70,0,1)
	    BND0 A 10 A_FaceTarget
		BND0 A 5 A_FaceTarget
		BND0 A 10 A_FaceTarget
		TNT1 A 0 A_Recoil(-50)
		GoTo See
  HighJump:
	    BND0 A 10 A_FaceTarget
		TNT1 A 0 ThrustThingZ(0,100,0,1)
		BND0 A 5 A_FaceTarget
		BND0 A 10 A_FaceTarget
		TNT1 A 0 A_Recoil(-50)
		GoTo See
  Taunt:
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,0.8,0,ATTN_NONE)
	TNT1 A 0 A_TakeInventory("MarineKilled",1)
	Goto See
  Missile:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_MonsterRefire(0,"See")
	TNT1 A 0 A_Jump(64,2)
	TNT1 A 0 A_JumpIfHealthLower(10000,"TryShard2")
	TNT1 A 0 A_Jump(32,"AmmoSphere","PowerSphere","SkullOfPower")
  MissileContinue:
	TNT1 A 0 A_JumpIfTargetInLOS("FarRange",360,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,1000)
	TNT1 A 0 A_JumpIfTargetInLOS("LongRange",360,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,750)
	TNT1 A 0 A_JumpIfTargetInLOS("NearRange",360,JLOSF_CLOSENOJUMP|JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,0,500)
	TNT1 A 0 A_JumpIfTargetInLOS("CloseRange",360,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,500,0)
	Goto DMG
  FarRange:
	TNT1 A 0 A_Jump(12,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(256,"TrueLegendaryBombs","PlasmaticRifle","Cannon1","BFG","DMG","EradicatorBFG","LegendaryNukeBall","TrueDarkBalls","LegendaryPulverizer")
	Goto DMG
  LongRange:
	TNT1 A 0 A_Jump(12,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon1")
	TNT1 A 0 A_Jump(256,"BFG","EradicatorBFG","TrueLegendaryBombs","Cannon2","Cannon3","DMG","TrueDarkBalls","LegendaryNukeBall","LegendaryPulverizer")
	Goto DMG
  NearRange:
	TNT1 A 0 A_Jump(12,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon2")
	TNT1 A 0 A_Jump(256,"TrueLegendaryBombs","ASG","Cannon1","DMG")
	Goto DMG
  CloseRange:
	TNT1 A 0 A_Jump(12,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(128,"ASG","Coachgun","DMG")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon2")
	TNT1 A 0 A_Jump(256,"TrueLegendaryBombs","Cannon1","Cannon3")
	Goto DMG
  TryShard2:
	TNT1 A 0 A_Jump(128,"TryResistance2")
	TNT1 A 0 A_JumpIf(user_powershardlimit >= 3,"TryResistance2")
	TNT1 A 0 A_JumpIf(user_powershard == 1,"TryResistance2")
	Goto PowerShard
  TryResistance2:
	TNT1 A 0 A_JumpIf(user_resistancebufflimit >= 4,"MissileContinue")
	TNT1 A 0 A_JumpIf(user_resistancebuff == 1,"MissileContinue")
	Goto ResistanceBuff
  AmmoSphere:
	TNT1 A 0 A_JumpIf(user_infammo == 2,"MissileContinue")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 6
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 ACS_NamedExecuteAlways("EnemyInfiniteAmmo",0)
	TNT1 A 0 A_PlaySound("legammo/use",6,1.0,0,0.4)
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,1.0,0,0.4)
	Goto See
  SkullOfPower:
	TNT1 A 0 A_JumpIf(user_skullofpower == 2,"MissileContinue")
	TNT1 A 0 A_JumpIfHealthLower(7500,2)
	TNT1 A 0 A_Jump(256,"MissileContinue")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	BND0 E 6
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_GiveInventory("LegDoomguySkullOfPower")
	TNT1 A 0 ACS_NamedExecuteAlways("LegDoomguySkullOfPower",0)
	TNT1 A 0 A_PlaySound("legdoomguy/quaddmg",7,1.0,0,0.4)
	TNT1 A 0 A_PlaySound("soterror/use",6,1.0,0,0.4)
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,1.0,0,0.4)
	Goto See
  PowerSphere:
	TNT1 A 0 A_JumpIf(user_powersphere == 2,"MissileContinue")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 6
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	TNT1 A 0 A_ChangeFlag("ALWAYSFAST",1)
	TNT1 A 0 ACS_NamedExecuteAlways("LegDoomguyPowerSphere",0)
	TNT1 A 0 A_PlaySound("legpowersphere/use",6,1.0,0,0.4)
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,1.0,0,0.4)
	Goto See
  PowerShard:
	TNT1 A 0 A_JumpIf(user_powershardlimit >= 4,"See")
	TNT1 A 0 A_SetUserVar(user_powershardlimit,user_powershardlimit+1)
	TNT1 A 0 A_JumpIf(user_powershard == 1,"See")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 6
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	TNT1 A 0 ACS_NamedExecuteAlways("NemesisDoomslayerPowerShard",0)
	TNT1 A 0 A_PlaySound("legendary/defense",6,1.0,0,0.4)
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,1.0,0,0.4)
	Goto See
  ResistanceBuff:
	TNT1 A 0 A_JumpIf(user_resistancebufflimit >= 4,"See")
	TNT1 A 0 A_SetUserVar(user_resistancebufflimit,user_resistancebufflimit+1)
	TNT1 A 0 A_JumpIf(user_resistancebuff == 1,"See")
	TNT1 A 0 A_PlaySound("Saber/Pickup",7,1.0,0,0.5)
	BND0 E 6
	TNT1 A 0 A_PlaySound("Saber/Buff",1,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Saber/Resistance",6,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("NemesisDoomslayer/taunt",2,1.0,0,0.4)
	TNT1 A 0 A_GiveInventory("LegDoomguySaberResistance")
	TNT1 A 0 ACS_NamedExecuteAlways("LegDoomguyResistanceBuff",0)
	BND0 F 16
	Goto See
  Mines:
	TNT1 A 0 A_Jump(96,"MineInfAmmo")
	BND0 C 4 Fast
	BND0 E 15 Fast A_CustomMissile("LACThrownMine",32,0,0,2,15)
	TNT1 AAAA 0 A_CustomMissile("LACThrownMine",32,0,random(0,360),2,15)
	BND0 C 4 Fast
	Goto See
  MineInfAmmo:
	BND0 C 6 Fast
	TNT1 AAAAAAAA 0 A_CustomMissile("LACThrownMine",32,0,random(0,360),2,15)
	TNT1 AAAAAAAA 0 A_CustomMissile("LACThrownMine",32,0,random(0,360),2,15)
	BND0 E 5 Fast
	BND0 C 3 Fast
	Goto See
  Grenade:
	BND0 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	BND0 E 4 Fast A_FaceTarget
	BND0 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	BND0 E 1 A_CustomMissile("TLSBomb",32,0,0,2,4)
	BND0 A 0 A_GiveInventory("MonsterAvoid",1)
	Goto See
  Pause:
	BND0 EE 5 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_PlaySound("weapons/LMGReload3",7,1.0,0,0.5)
	Goto See
  ASG:
	TNT1 A 0 A_PlaySound("LShotgun/Cock",7,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
  ASGLoop:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfInventory("ASGZAmmo",16,"ReloadASG")
	BND0 E 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_JumpIf(user_infammo == 1,2)
	TNT1 A 0 A_GiveInventory("ASGZAmmo",1)
	TNT1 A 0 A_SpawnItemEx("ShellCasing",-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("Legendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	TNT1 A 0 A_CustomMissile("Legendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	BND0 F 3 Fast A_GiveInventory("DTZombieStrafing",1)	
	TNT1 A 0 A_GiveInventory("ASGZAmmo",1)
	TNT1 A 0 A_SpawnItemEx("ShellCasing",-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("TrueLegendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	TNT1 A 0 A_CustomMissile("TrueLegendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	BND0 F 3 Fast A_GiveInventory("DTZombieStrafing",1)	
	BND0 A 0 A_Jump(60,"Pause","TryCoachgun")
	BND0 A 0 A_Jump(15,"Grenade")
	Loop
  ReloadASG:
	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("TrueLegendaryLineSpawner")
	BND0 E 10 Fast A_TakeInventory("ASGZAmmo",16)
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 4 Fast A_PlaySound("lasgguy/asgin") 
	BND0 E 5 Fast A_PlaySound("LShotgun/Cock")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	Goto See
  TryCoachgun:
	TNT1 A 0 A_JumpIfCloser(350,"Coachgun")
	//TNT1 A 0 A_JumpIfCloser(700,"CoachgunAlt")
	Goto Pause
  Coachgun:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	BND0 E 10 Fast
	BND0 EE 3 Fast A_GiveInventory("DTZombieStrafing",1) //holy god, oooooooof
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("TrueLegendary10KProjectile",32,0,frandom(-15,15),CMF_OFFSETPITCH,frandom(-8,8))
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",1)
	BND0 F 5 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 EE 3 Fast A_GiveInventory("DTZombieStrafing",1) //holy god, oooooooof
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("TrueLegendary10KProjectile",32,0,frandom(-15,15),CMF_OFFSETPITCH,frandom(-8,8))
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",1)
	BND0 F 5 Fast A_GiveInventory("DTZombieStrafing",1)
	Goto CoachgunReload
  CoachgunAlt:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	BND0 E 10 Fast
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("TrueLegendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	BND0 F 4 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 EEE 4 Fast A_GiveInventory("DTZombieStrafing",1)

	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("TrueLegendary10KProjectile",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	BND0 F 4 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 EEE 4 Fast A_GiveInventory("DTZombieStrafing",1)
    Goto CoachgunReload
  CoachgunReload:
	BND0 EEE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	BND0 E 3 Fast A_PlaySound("Coachgun/Open")
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	TNT1 AA 0 A_SpawnItemEx("NemesisShellCasing", 0, 12, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	BND0 E 1
	BND0 E 3 Fast A_PlaySound("Coachgun/Load")
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	BND0 E 3 Fast A_PlaySound("NemesisSSG/Close",7,1.0,0,0.5)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	BND0 E 3 Fast
	BND0 A 0 A_Jump(64,"Grenade","Coachgun")
    Goto See
  DMG:
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_Jump(96,"DMGBurst")
  DMGLoop:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfInventory("NemDMGAmmo",60,"ReloadDMG")
	BND0 E 2 Fast A_GiveInventory("DTZombieStrafing",1)	
	TNT1 A 0 A_JumpIf(user_infammo == 1,2)
	TNT1 A 0 A_GiveInventory("NemDMGAmmo",1)
	TNT1 A 0 A_CustomMissile("TrueLegendary10KProjectile",Random(28,34),0,Random(2,-2),0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("weapons/LMGFire",1)
	BND0 F 2 Fast A_GiveInventory("DTZombieStrafing",1)	
	TNT1 A 0 A_CustomMissile("TrueLegendary10KProjectile",Random(28,34),0,Random(2,-2),0)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TNT1 A 0 A_PlaySound("weapons/LMGFire",1)
	BND0 F 2 Fast A_GiveInventory("DTZombieStrafing",1)	
	TNT1 A 0 A_JumpIfCloser(350,"ASG")
	TNT1 A 0 A_MonsterRefire(128,"See")
	TNT1 A 0 A_Jump(20,"PauseDMG")
	BND0 A 0 A_Jump(15,"Grenade")
	Loop
  DMGBurst:
	TNT1 A 0 A_JumpIfInventory("NemDMGAmmo",60,"ReloadDMG")
	BND0 EEE 3 Bright A_GiveInventory("DTZombieStrafing",1)
	BND0 E 2 Bright A_GiveInventory("DTZombieStrafing",1)
  DMGBurstLoop:
	BND0 A 0 A_JumpIf(user_missile >= 5,"DMGBurstRepeat")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	TNT1 A 0 A_JumpIf(user_infammo == 1,2)
	TNT1 A 0 A_GiveInventory ("NemDMGAmmo",1)
	TNT1 A 0 A_SpawnItemEx("NemesisRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	BND0 F 0 A_PlaySoundEx("weapons/LMGFire","Weapon")
	TNT1 A 0 A_CustomMissile("TrueLegendary10KProjectile",Random(28,34),0,Random(4,-4),0)
	BND0 F 1 Bright A_GiveInventory("DTZombieStrafing",1)
    Loop
  DMGBurstRepeat:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	TNT1 A 0 A_Jump(16,"DMGLoop")
	TNT1 A 0 A_Jump(48,"PauseDMG")
	TNT1 A 0 A_MonsterRefire(128,"See")
    Goto DMGBurst
  ReloadDMG:
    TNT1 A 0 A_ChangeFlag(NOPAIN,1)
    TNT1 A 0 A_PlaySound("weapons/LMGReload2")
	TNT1 A 0 A_SpawnItemEx("LegendaryEmptyDrumSpawner",-8,7,30,4,0,(0.1)*Random(30,40),Random(-80,-90),128)
	TNT1 A 0 A_TakeInventory("NemDMGAmmo",60)
    BND0 EE 25 Fast A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
    BND0 E 20 Fast A_PlaySound("weapons/LMGReload1") 
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 40 Fast A_PlaySound("weapons/LMGReload3")
    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
    Goto See
  PauseDMG:
	BND0 EE 5 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	Goto See
  PlasmaticRifle:
	TNT1 A 0 A_PlaySound("weapons/legup",7,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
  PlasmaticRifleLoop:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfInventory("LegZombieRifleAmmo",50,"ReloadPlasmaticRifle")
	BND0 E 2 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_JumpIf(user_infammo == 1,2)
	TNT1 A 0 A_GiveInventory("LegZombieRifleAmmo",1)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	TNT1 AA 0 A_CustomMissile("TLegendaryCyberBFG15KBall",32,0,random(-2,2),CMF_TRACKOWNER)
	BND0 F 2 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 AA 0 A_CustomMissile("TLegendaryCyberBFG15KBall",32,0,random(-2,2),CMF_TRACKOWNER)
	BND0 F 2 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 AA 0 A_CustomMissile("TLegendaryCyberBFG15KBall",32,0,random(-2,2),CMF_TRACKOWNER)
	BND0 A 0 A_MonsterRefire(128,"Pause")
	TNT1 A 0 A_Jump(24,"PausePlasmaticRifle")
	BND0 A 0 A_Jump(10,"Grenade")
	Loop
  ReloadPlasmaticRifle:
    TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	BND0 E 4 Fast A_PlaySound("weapons/demontecheject")
	BND0 E 10 Fast A_PlaySound("weapons/demontechsteam")
	TNT1 A 0 A_SpawnItemEx("LDemonTechEmptyMag", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
	TNT1 A 0 A_TakeInventory("LegZombieRifleAmmo",50)
    BND0 EEEEE 3 Fast A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
    BND0 E 3 Fast A_PlaySound("weapons/demontechload") 
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryCyberFlameSpawner")
	BND0 E 6 Fast A_PlaySound("weapons/demontechclick3")
    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
    Goto See
  PausePlasmaticRifle:
	BND0 A 0 A_PlaySound("weapons/demontechsteam",6)
	Goto Pause
  Cannon1:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,5))
  Cannon1Loop:
	BND0 A 0 A_JumpIf(user_missile >= 15,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	BND0 EE 4 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("LegCannon/Fire",1)
	TNT1 A 0 A_CustomMissile("TLegTerminatorBFG9500Ball",32)
	BND0 F 0 Bright A_CustomMissile("LegendaryProjectile",32,17,random(5,-5))
	BND0 FF 4 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("LegCannon/Fire",1)
	BND0 F 0 Bright A_CustomMissile("LegendaryProjectile",32,17,random(5,-5))
	TNT1 A 0 A_CustomMissile("TLegTerminatorBFG9500Ball",32)
	BND0 F 0 Bright A_CustomMissile("SuperLegPlasma",32,17,random(5,-5))
	BND0 FF 4 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 A 0 A_MonsterRefire(128,"Pause")
	Loop
  Cannon2:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	BND0 A 0 A_PlaySound("NemesisCannon/Mode2")
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,4))
  Cannon2Loop:
	BND0 A 0 A_JumpIf(user_missile >= 25,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	BND0 E 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("LegTerminatorStar",32)
	BND0 F 3 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 A 0 A_MonsterRefire(128,"Pause")
	Loop
  Cannon3:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,2))
  Cannon3Loop:
  	TNT1 A 0 A_JumpIf(user_missile >= 3,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	TNT1 A 0 A_PlaySound("legendarycannon/charge",6,1.0,0,0.5)
	BND0 E 1 Bright A_FaceTarget
	BND0 EEEEEEEEEEEEEE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",CHAN_WEAPON)
	BND0 F 7 A_CustomMissile("TrueLegCybDevastatorBall",32,0,0)
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	BND0 E 10 A_FaceTarget
	Loop
  BFG:
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 20 A_CustomMissile("TrueLegCybDevastatorBall",32)
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 20 A_CustomMissile("CardinalSpecialGuruBall",32)
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("CyberGuruBall",32,17,random(5,-5))
	Goto Pause
  TrueLegendaryBombs:
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,2))
  TrueLegendaryBombsLoop:
	BND0 A 0 A_JumpIf(user_missile >= 6,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	BND0 EE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 F 0 A_PlayWeaponSound("star/fire")
	BND0 F 7 Fast A_CustomMissile("TLSBomb")
	BND0 EEEE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	BND0 F 0 A_PlayWeaponSound("star/fire")
	BND0 F 3 Fast A_CustomMissile("TLSBomb")
	BND0 A 0 A_MonsterRefire(128,"Pause")
	Loop
	
  EradicatorBFG:
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_PlaySound("EradicationBFG/Charge",1)
	BND0 EEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 15 A_CustomMissile("TrueLegCybDevastatorBall",32)
	BND0 F 0 Bright A_CustomMissile("TrueDarkLegendaryBall",32,17,random(5,-5))
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 15 A_CustomMissile("TrueDarkLegendaryBall",32)
	BND0 F 0 Bright A_CustomMissile("TrueLegCybDevastatorBall",32,17,random(5,-5))
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 15 A_CustomMissile("CardinalSpecialGuruBall",32)
	BND0 F 0 Bright A_CustomMissile("CardinalSpecialGuruBall",32,17,random(5,-5))
	Goto Pause
	
  TrueDarkBalls:
    TNT1 A 0 A_Jump(128,"Cynetik")
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	BND0 F 20 Bright A_CustomMissile("TrueDarkLegendaryBall",44,-24)
	BND0 F 0 Bright A_CustomMissile("TrueDarkLegendaryBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("TrueDarkLegendaryBall",32,17,random(5,-5))
	BND0 E 15 A_FaceTarget
	Goto See
	
	
  LegendaryNukeBall:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	BND0 EEEEEEEEEEEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	BND0 F 20 A_CustomMissile("LegendaryCardinalFinalBall",32)
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	Goto Pause
	
	
  LegendaryPulverizer:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	BND0 EEEEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	BND0 F 20 A_CustomMissile("LegendaryBomb",32)
	BND0 EEEEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	BND0 F 20 A_CustomMissile("LegendaryBomb",32)
	Goto Pause
	
  Cynetik:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG2",2,1.0,0,0.5)
	TNT1 A 0 A_JumpIf(user_bfg == 0,3)
	TNT1 A 0 A_SetUserVar(user_bfg,1)
	BND0 E 1 //A_PlaySound("LDoomguy/BFG",2,1.0,0,0.5)
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 E 10 A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	BND0 EEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("weapons/cynstrike",1)
	BND0 F 20 A_CustomMissile("CynetikBallEnemy",32)
	BND0 EEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("weapons/cynstrike",1)
	BND0 F 15 A_CustomMissile("CynetikBallEnemy",32)
	BND0 EEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("weapons/cynstrike",1)
	BND0 F 15 A_CustomMissile("CynetikBallEnemy",32)
	Goto Pause

  Nemesis:
	TNT1 A 0 A_PlaySound("NemesisReady",7,1.0,0,0.5)
	TNT1 A 0 A_SetUserVar("user_nemesis",1)
	BND0 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("Nemesis/Laser",7)
	BND0 EEE 1
	TNT1 A 0 A_PlaySound("Nemesis/LaserLoop",6,1.0,1)
  NemesisLoop:
	TNT1 A 0 A_GiveInventory("NemDoomSlayerNemesisClip",1)
	TNT1 A 0 A_CustomRailgun(random(8,20),0,0,0,RGF_SILENT,1,2,"NemesisRailPuff",0,0,0,0,8,0,"NemesisRailEffect",0)
    BND0 EE 1 Fast A_FaceTarget
	TNT1 A 0 A_GiveInventory("NemDoomSlayerNemesisClip",1)
	TNT1 A 0 A_CustomRailgun(random(8,20),0,0,0,RGF_SILENT,1,2,"NemesisRailPuff",0,0,0,0,8,0,"NemesisRailEffect",0)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
    BND0 EE 1 Fast A_FaceTarget
	TNT1 A 0 A_Jump(16,"NemesisPause")
	TNT1 A 0 A_MonsterRefire(96,"NemesisPause")
    Loop
  NemesisPause:
	TNT1 A 0 A_StopSound(6)
	BND0 E 15
    Goto See

  NemesisAltBall:
    TNT1 A 0
    TNT1 A 0 A_JumpifInventory("NemDoomSlayerNemesisClip",300,"NemesisAltBallFire")
	//TNT1 A 0 A_Jump(64,"Nemesis")
	Goto Missile
  NemesisAltBallFire:
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	BND0 EEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	BND0 F 20 A_CustomMissile("CardinalSpecialGuruBall",32)
	BND0 F 0 Bright A_CustomMissile("CardinalSpecialGuruBall",32,17,random(5,-5))
	BND0 F 0 Bright A_CustomMissile("CardinalSpecialGuruBall",32,17,random(5,-5))
	BND0 EEEEE 5
    Goto Pause

  LaserBeam:
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
    TNT1 A 0 A_Playsound("MasterSparkCharge")
	BND0 EEEEEE 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,2))
  LaserBeamLoop:
	TNT1 A 0 A_SetUserVar("user_missile",0)
	TNT1 A 0 A_Playsound("MasterSpark",0,1,0,ATTN_NONE)
	TNT1 A 0 A_JumpIf(user_missile >= 90,"Pause")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 A 0 A_FaceTarget
	BND0 F 1 Fast A_CustomMissile("NemesisSentientLaser",34,0,0)
	Goto LaserBeamLoop+2
  ZenAlt:
	BND0 EEEEEEEF 6 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	TNT1 A 0 A_CustomMissile("CyberGuruBall",0,0,0)
	TNT1 A 0 A_CustomMissile("TrueLegCybDevastatorBall",0,0,45)
	TNT1 A 0 A_CustomMissile("CyberGuruBall",0,0,90)
	TNT1 A 0 A_CustomMissile("TrueLegCybDevastatorBall",0,0,135)
	TNT1 A 0 A_CustomMissile("CyberGuruBall",0,0,180)
	TNT1 A 0 A_CustomMissile("TrueLegCybDevastatorBall",0,0,225)
	TNT1 A 0 A_CustomMissile("CyberGuruBall",0,0,270)
	TNT1 A 0 A_CustomMissile("TrueLegCybDevastatorBall",0,0,315)
    BND0 F 15 Bright
	BND0 EE 30
	Goto See

  PainNemesis:
	TNT1 A 0 A_StopSound(6)
    TNT1 A 0 A_SetUserVar("user_nemesis",0)
	TNT1 A 0 A_JumpIfHealthLower(15000,"TryShard")
	TNT1 A 0 A_Jump(32,"PowerShard","ResistanceBuff")
	Goto PainContinue
  Pain:
	TNT1 A 0 A_JumpIf(user_nemesis > 1,"PainNemesis")
	TNT1 A 0 A_JumpIfHealthLower(20000,"TryShard")
	TNT1 A 0 A_Jump(32,"PowerShard","ResistanceBuff")
  PainContinue:
	BND0 G 2
	BND0 G 2 A_Pain
	TNT1 A 0 A_Jump(192,"Missile")
	Goto See
  TryShard:
	TNT1 A 0 A_Jump(128,"TryResistance")
	TNT1 A 0 A_JumpIf(user_powershardlimit >= 4,"TryResistance")
	TNT1 A 0 A_JumpIf(user_powershard == 1,"TryResistance")
	Goto PowerShard
  TryResistance:
	TNT1 A 0 A_JumpIf(user_resistancebufflimit >= 6,"PainContinue")
	TNT1 A 0 A_JumpIf(user_resistancebuff == 1,"PainContinue")
	Goto ResistanceBuff
  Death:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	TNT1 A 0 A_SpawnItemEx("RingOfRegenerationHalf",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegDemonRune",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegTimeFreezeSphere",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Fusion Cannon",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("True Legendary Ion Striker",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryPowerSphere",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendarySyringe",0,0,64,random(0,8),0,2,random(1,360),0,32)
	TNT1 A 0 A_SpawnItemEx("TrueLegendarySyringe",0,0,64,random(0,8),0,2,random(1,360),0,32)
	TNT1 A 0 A_SpawnItemEx("RareRandomTrueLegItems",0,0,64,random(0,8),0,2,random(1,360),0,32)
	TNT1 A 0 A_SpawnItemEx("RandomOpSkulltagrune",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryRune",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryRune",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegAmmoSphere",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DivineContract",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("WingsOfAscension",0,0,12,random(0,8),random(0,8),2,random(0,360),0,100)
	TNT1 A 0 A_SpawnItemEx("UpgradedTrueLegendaryArmor",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("RandomSuperPowerUp",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryRune",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ArmageddonCannon",0,0,64,random(0,8),0,2,random(1,360),0,192)
	TNT1 A 0 A_SpawnItemEx("BfgUpgrade",0,0,64,random(1,8),0,2,random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("TrueLegUpgradeSpawnerStrong",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("BadLegendaryRevolver",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Assault Shotgun",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryCoachgun",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryQuadShotgun",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Light Machine Gun",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Plasmatic Rifle",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Railgun",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryBFG10K",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary Plasmatic Cannon",0,0,64,random(0,8),0,2,random(1,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Legendary BFG",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryUltraSphere",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryInvulnerabilitySphere",0,0,64,random(1,8),0,2,random(0,360),0,64)
	TNT1 A 0 A_SpawnItemEx("True Legendary Railgun",0,0,12,random(0,8),random(0,8),2,random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("True Legendary Plasmatic Cannon",0,0,12,random(0,8),random(0,8),2,random(0,360),0,128)
	VND0 H 5 A_Scream
	VND0 I 5 A_NoBlocking
	TNT1 A 0 A_SpawnItemEx("legendaryLightning")
	TNT1 A 0 A_SpawnItem("DemonLegendaryBFGMiniProjectileDeath")
	VND0 I 40 
	TNT1 A 0 A_SpawnItem("TrueDeathBall")
	VND0 I 40 
	TNT1 A 0 A_SpawnItem("DemonLegendaryBFGMiniProjectileDeath")
	VND0 I 35
	TNT1 A 0 A_SpawnItem("TrueDeathBall")
	VND0 I 35
	TNT1 A 0 A_SpawnItemEx("blueLightning")
	VND0 I 30 
	TNT1 A 0 A_SpawnItemEx("blueLightning")
	VND0 I 30 
	TNT1 A 0 A_SpawnItemEx("blueLightning")
	VND0 I 30 
	TNT1 A 0 A_SpawnItemEx("TrueLegTerminatorNukeDeath",0,0,0,0,0,0,0,SXF_SETMASTER,0)
	VND0 JK 5
	VND0 L 5 A_SpawnItem("BodyCrash",0,0,0,0)
	VND0 M 5
	VND0 N 5 ACS_NamedExecuteAlways("DropDoll",0,75)
	VND0 N 20
	VND0 N 100
	VND0 N -1
	Stop
	}
}