Actor InsanityBloodDoomSlayer : VexedNemesisDoomSlayer
{
//Creator: ??? + Nolram for extra edits
//Origin: Infinity Gods (Originally Doomslayer from Nexus)
//Sprite: BND0
//Title: "Insanity Blood DoomSlayer" 
  Health 6666
  Mass 600
  Speed 60
  FastSpeed 80
  MeleeRange 80
  BloodColor "Red"
  PainChance 20
  Species "LegendaryDoomguy"
  Damagetype "InsanityHell"
  DamageFactor 0.2
  DamageFactor "Ice", 0.05
  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.2
  DamageFactor "Cursed", 0.14
  DamageFactor "Hackroid", 0.26
  DamageFactor "TrueLegendaryDamage", 0.25
  DamageFactor "TrueLegendaryPlayer", 0.25
  PainChance "Explosion", 128
  PainChance "PlayerDTRG", 128
  PainChance "DTRailgun", 128
  PainChance "PDTPuff", 128
  PainChance "RailG", 128
  SeeSound "NemesisDoomslayer/taunt"
  ActiveSound " "
  PainSound "NemesisDoomslayer/pain"
  DeathSound "NemesisDoomslayer/death"
  AttackSound " "
  DropItem "Demon Tech Devastator" 256 1
  DropItem "Demon Tech BFG10K" 256 1
  DropItem "Explosive Minigun" 256 1
  DropItem "ExplosiveRailgun" 200 1
  DropItem "Explosive Shotgun" 200
  DropItem "CannongunSphere" 128
  DropItem "EFG9000", 200
  DropItem "HeavyGrenadeLauncher", 140
  DropItem "ExplosiveCombatpack", 180, 1
  DropItem "SuperChargedWeaponEnhancerModuleGiver" 256
  Obituary "%o was sent a ticket back to hell by the \c[i7]Insanity Blood DoomSlayer\c-!!!"
  Tag "\c[i7]Insanity Blood DoomSlayer\c-"
  Translation "0:255=%[0.00,0.00,0.00]:[1.50,0.20,0.00]"
  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:
	VND0 A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1768,910)
	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("InsanityFlameSpawner")
	VND0 AA 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND0 BB 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND0 CC 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND0 DD 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Jump(64,"Mines")
	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("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("HFCyberFlameSpawner")
	VND0 D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Jump(80,"See","Teleport")
	Loop
  Teleport:
	VND0 A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItem("InsanityFlameSpawner",0,0,0,0)
	VND0 AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	VND0 A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	VND0 A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItem("InsanityFlameSpawner",0,0,0,0)
	VND0 AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	VND0 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)
	VND0 AA 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VND0 BB 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VND0 CC 2 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VND0 DD 2 A_GiveInventory("DTZombieStrafing",1)
	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(2000,"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(8,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(256,"BFGAlt","PlasmaticRifle","Cannon1","BFG","DMG")
	Goto DMG
  LongRange:
	TNT1 A 0 A_Jump(8,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon1")
	TNT1 A 0 A_Jump(256,"BFG","BFGAlt","Cannon2","Cannon3","DMG")
	Goto DMG
  NearRange:
	TNT1 A 0 A_Jump(8,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon2","Nemesis")
	TNT1 A 0 A_Jump(256,"BFGAlt","ASG","Cannon1","DMG")
	Goto DMG
  CloseRange:
	TNT1 A 0 A_Jump(8,"NemesisAltBall","ZenAlt")
	TNT1 A 0 A_Jump(128,"ASG","Coachgun","DMG","Nemesis")
	TNT1 A 0 A_Jump(200,"PlasmaticRifle","Cannon2")
	TNT1 A 0 A_Jump(256,"BFGAlt","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("InsanityFlameSpawner")
	VND0 E 6
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	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(2000,2)
	TNT1 A 0 A_Jump(256,"MissileContinue")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND0 E 6
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	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("InsanityFlameSpawner")
	VND0 E 6
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	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("InsanityFlameSpawner")
	VND0 E 6
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	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)
	VND0 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)
	VND0 F 16
	Goto See
  Mines:
	TNT1 A 0 A_Jump(96,"MineInfAmmo")
	VND0 C 4 Fast
	VND0 E 15 Fast A_CustomMissile("InsaneCydestroyerThrownHellfireMine",32,0,0,2,15)
	VND0 C 4 Fast
	Goto See
  MineInfAmmo:
	VND0 C 6 Fast
	TNT1 AAAAAAAA 0 A_CustomMissile("InsaneCydestroyerThrownHellfireMine",32,0,random(0,360),2,15)
	VND0 E 5 Fast
	VND0 C 3 Fast
	Goto See
  Grenade:
	"####" A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	"####" E 4 Fast A_FaceTarget
	"####" A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	"####" E 1 A_CustomMissile("NemesisGrenade",32,0,0,2,4)
	"####" A 0 A_GiveInventory("MonsterAvoid",1)
	Goto See
  Pause:
	"####" EE 5 A_SpawnItemEx("InsanityFlameSpawner")
	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)
	VND1 E 10 A_FaceTarget
  ASGLoop:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfInventory("ASGZAmmo",16,"ReloadASG")
	VND1 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("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("Cardinal10K",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	TNT1 A 0 A_CustomMissile("Cardinal10K",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	VND1 F 3 Fast A_GiveInventory("DTZombieStrafing",1)	
	VND1 A 0 A_Jump(60,"Pause","TryCoachgun")
	VND1 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("InsanityFlameSpawner")
	VND1 E 10 Fast A_TakeInventory("ASGZAmmo",16)
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND1 E 4 Fast A_PlaySound("lasgguy/asgin") 
	VND1 E 5 Fast A_PlaySound("LShotgun/Cock")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	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)
	VND2 E 10 Fast
	VND2 EE 3 Fast A_GiveInventory("DTZombieStrafing",1) //holy god, oooooooof
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("NemesisASGBall",32,0,frandom(-15,15),CMF_OFFSETPITCH,frandom(-8,8))
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",1)
	VND2 F 5 Fast A_GiveInventory("DTZombieStrafing",1)
	Goto CoachgunReload
  CoachgunAlt:
	TNT1 A 0 A_PlaySound("Coachgun/Pickup",7,1.0,0,0.5)
	VND2 E 10 Fast
	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("Cardinal10K",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	VND2 F 4 Fast A_GiveInventory("DTZombieStrafing",1)
	VND2 EEE 4 Fast A_GiveInventory("DTZombieStrafing",1)

	TNT1 A 0 A_PlaySoundEx("NemesisSSG/Fire2","Weapon")
	TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("Cardinal10K",32,0,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	VND2 F 4 Fast A_GiveInventory("DTZombieStrafing",1)
	VND2 EEE 4 Fast A_GiveInventory("DTZombieStrafing",1)
    Goto CoachgunReload
  CoachgunReload:
	VND2 EEE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	VND2 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)
	VND2 E 1
	VND2 E 3 Fast A_PlaySound("Coachgun/Load")
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	VND2 E 3 Fast A_PlaySound("NemesisSSG/Close",7,1.0,0,0.5)
	TNT1 A 0 A_GiveInventory("DTZombieStrafing",1)
	VND2 E 3 Fast
	VND2 A 0 A_Jump(64,"Grenade","Coachgun")
    Goto See
  DMG:
	VND3 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")
	VND3 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("Cardinal10K",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)
	VND3 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")
	VND3 A 0 A_Jump(15,"Grenade")
	Loop
  DMGBurst:
	TNT1 A 0 A_JumpIfInventory("NemDMGAmmo",60,"ReloadDMG")
	VND3 EEE 3 Bright A_GiveInventory("DTZombieStrafing",1)
	VND3 E 2 Bright A_GiveInventory("DTZombieStrafing",1)
  DMGBurstLoop:
	VND3 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)
	VND3 F 0 A_PlaySoundEx("weapons/LMGFire","Weapon")
	TNT1 A 0 A_CustomMissile("Cybruiser15KFast",Random(28,34),0,Random(4,-4),0)
	VND3 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)
    VND3 EE 25 Fast A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
    VND3 E 20 Fast A_PlaySound("weapons/LMGReload1") 
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND3 E 40 Fast A_PlaySound("weapons/LMGReload3")
    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
    Goto See
  PauseDMG:
	VND3 EE 5 A_SpawnItemEx("InsanityFlameSpawner")
	Goto See
  PlasmaticRifle:
	TNT1 A 0 A_PlaySound("weapons/legup",7,1.0,0,0.5)
	VND0 E 10 A_FaceTarget
  PlasmaticRifleLoop:
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
	TNT1 A 0 A_JumpIfInventory("LegZombieRifleAmmo",50,"ReloadPlasmaticRifle")
	VND0 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("Cybruiser15KFast",32,0,random(-2,2),CMF_TRACKOWNER)
	VND0 F 2 Fast A_GiveInventory("DTZombieStrafing",1)
	VND0 A 0 A_MonsterRefire(128,"Pause")
	TNT1 A 0 A_Jump(24,"PausePlasmaticRifle")
	VND0 A 0 A_Jump(10,"Grenade")
	Loop
  ReloadPlasmaticRifle:
    TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	VND0 E 4 Fast A_PlaySound("weapons/demontecheject")
	VND0 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)
    VND0 EEEEE 3 Fast A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
    VND0 E 3 Fast A_PlaySound("weapons/demontechload") 
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	VND0 E 6 Fast A_PlaySound("weapons/demontechclick3")
    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
    Goto See
  PausePlasmaticRifle:
	VND0 A 0 A_PlaySound("weapons/demontechsteam",6)
	Goto Pause
  Cannon1:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	VND4 E 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,5))
  Cannon1Loop:
	VND4 A 0 A_JumpIf(user_missile >= 15,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	VND4 EE 4 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("LegCannon/Fire",1)
	TNT1 A 0 A_CustomMissile("LesserCardinalMiniDTBFG",32)
	VND4 FF 4 Fast A_GiveInventory("DTZombieStrafing",1)
	VND4 A 0 A_MonsterRefire(128,"Pause")
	Loop
  Cannon2:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	VND4 E 15 A_FaceTarget
	VND4 A 0 A_PlaySound("NemesisCannon/Mode2")
	VND4 E 10 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,4))
  Cannon2Loop:
	VND4 A 0 A_JumpIf(user_missile >= 25,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	VND4 E 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser",7)
	TNT1 A 0 A_CustomMissile("TrueInsaneNoblelaser",32)
	VND4 F 3 Fast A_GiveInventory("DTZombieStrafing",1)
	VND4 A 0 A_MonsterRefire(128,"Pause")
	Loop
  Cannon3:
	TNT1 A 0 A_PlaySound("legendarycannon/up",7,1.0,0,0.5)
	VND4 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)
	VND4 E 1 Bright A_FaceTarget
	VND4 EEEEEEEEEEEEEE 3 Fast A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",CHAN_WEAPON)
	VND4 F 7 A_CustomMissile("PyroShot",32,0,0)
	VND4 E 10 A_FaceTarget
	Loop
  BFG:
	VND5 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)
	VND5 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)
	VND5 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("truelegbfg/trigger",6,1.0,0,0.5)
	VND5 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("NemesisBFG/charge",1)	
	VND5 EEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
	TNT1 A 0 A_PlaySound("NemesisBFG/Fire",1)
	VND5 F 20 A_CustomMissile("UltimateDevastatorBall",32)
	Goto Pause
  BFGAlt:
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
	VND5 E 15 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,random(0,2))
  BFGAltLoop:
	VND5 A 0 A_JumpIf(user_missile >= 6,"Pause")
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	VND5 EE 4 Fast A_GiveInventory("DTZombieStrafing",1)
	VND5 F 0 A_PlayWeaponSound("star/fire")
	VND5 F 14 Fast A_CustomMissile("CardinalDTBFG10KBall")
	VND5 EEEEE 4 Fast A_GiveInventory("DTZombieStrafing",1)
	VND5 A 0 A_MonsterRefire(128,"Pause")
	Loop

  Nemesis:
	TNT1 A 0 A_PlaySound("NemesisReady",7,1.0,0,0.5)
	TNT1 A 0 A_SetUserVar("user_nemesis",1)
	VND6 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("Nemesis/Laser",7)
	VND6 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)
    VND6 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)
    VND6 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)
	VND6 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("NemesisUp",1,1.0,0,ATTN_NONE)
	VND6 EEEEEEEEEEEEEEEEEEEE 5 A_GiveInventory("DTZombieStrafing",1)
    TNT1 A 0 A_TakeInventory("NemDoomSlayerNemesisClip",300)
	TNT1 A 0 A_PlaySound("Nemesis/FireBall",6,1.0,0,ATTN_NONE)
	VND6 F 20 A_CustomMissile("NemesisAltBallMonster",32)
	VND6 EEEEE 5
    Goto Pause

  LaserBeam:
	TNT1 A 0 A_PlaySound("Weapons/GuruUp",7,1.0,0,0.5)
    TNT1 A 0 A_Playsound("MasterSparkCharge")
	VND5 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
	VND5 F 1 Fast A_CustomMissile("NemesisSentientLaser",34,0,0)
	Goto LaserBeamLoop+2
  ZenAlt:
	TNT1 A 0 A_PlaySound("ZENUP3",1,1.0,0,ATTN_NONE)
	VND6 EEEEEEEF 6 A_FaceTarget
	TNT1 A 0 A_Playsound("ZENUP",6,1.0,0,ATTN_NONE)
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("UnmakerParticleSpawner",8,0,28,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH,160)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,0)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,45)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,90)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,135)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,180)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,225)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,270)
	TNT1 A 0 A_CustomMissile("VexedCardinalAltNemUnmakerBall",0,0,315)
    VND6 F 15 Bright
	VND6 EE 30
	Goto See

  PainNemesis:
	TNT1 A 0 A_StopSound(6)
    TNT1 A 0 A_SetUserVar("user_nemesis",0)
	TNT1 A 0 A_JumpIfHealthLower(1000,"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(2500,"TryShard")
	TNT1 A 0 A_Jump(32,"PowerShard","ResistanceBuff")
  PainContinue:
	VND0 G 2
	VND0 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_JumpIfInTargetInventory("NexusStrength",1,"GodTransformation")
	TNT1 A 0 A_JumpIfInTargetInventory("TerminatorDamage2",1,"GodTransformation")
	TNT1 A 0 A_JumpIfInTargetInventory("NexusSpread",1,"GodTransformation")
	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("DemonicChalice",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("HellStormLauncher",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("BehemothCannon",0,0,64,random(1,8),0,2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Demon Tech Shotgun",0,0,64,random(0,8),0,2,random(1,360),0,0)
	TNT1 A 0 A_SpawnItemEx("HellfireUltrasphere",0,0,64,random(1,8),0,2,random(0,360),0,32)
	TNT1 A 0 A_SpawnItemEx("NuclearMissileBox",0,0,64,random(1,8),0,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("PyroCannon",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("HellsFurySphere",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("LegAmmoSphere",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("UpgradedHellArmor",0,0,12,random(0,8),random(0,8),2,random(0,360),0,0)
	VND0 H 5 A_Scream
	VND0 I 5 A_NoBlocking
	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
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	VND0 N 100
	VND0 N -1
	Stop
   GodTransformation:
	VND0 H 3
	VND0 H 15 A_Pain
	TNT1 A 0 A_SpawnItemEx("RedLightning")
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("RedLightning",Random(1250,-1250),Random(1250,-1250),-1000,0,0,0,SXF_NOCHECKPOSITION,0)
	VND0 H 15 A_SpawnItemEx("InsanityFlameSpawner")
	TNT1 A 0 A_SpawnItem("DarkDesNuke2")
	TNT1 A 0 A_SpawnItemEx("BloodGodDoomSlayer",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	Stop
	}
}

Actor INFInsanityBloodDoomSlayer : InsanityBloodDoomSlayer
{
Tag "\c[i7]Insanity Blood DoomSlayer\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(130,"Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 2,1)
	Goto Remove
	Idle:
	VND0 A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("InsanityFlameSpawner")
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("HellKnight",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}