ACTOR SandStorm : NemesisSentient //THE FALLEN RISE AGAIN THE FALLEN RISE AGAIN THE FALLEN RISE AGAIN THE FALLEN RISE AGAIN THE FALLEN RISE AGAIN
{
//Creator: GDWolf
//Origin: Complex Very Strong Monsters
//Sprite: NSNT
//Title: "SandStorm"
  Health 45000 //He had a mini rework, Now he attacks, and there's also a limit to how many times he can use Mass Resurrect, in addition to also being able To summon nemesis enemies.
  DropItem "NemesisHealthBonusMax", 256, 64
  DropItem "NemesisArmorBonus64", 256
  DropItem "NemesisHealthBonusMax", 256, 64
  DropItem "NemesisArmorBonus64", 256
  DropItem "NemesisAmmoSphere", 128, 5
  DropItem "LegDemonRune", 80, 1
  DropItem "NemesisTimeFreezeSphere", 256, 1
  DropItem "LegendaryRune", 256, 1
  DropItem "LegendaryRune", 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 "TarmidhesRune" 64 1
  Obituary "%o couldn't keep up with the SandStorm."
  Tag "\c[v9]SandStorm (Resurrect attack of Nemesis Sentient!!!!!)\c-"
  var int user_lcounter;
  var int user_Summonlimit;
  var int user_Resurrectlimit;
  var int user_CheckPower;
  States
  {
  Spawn:
	TNT1 A 0 A_JumpIf(user_script == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("NemesisSentientFire",0)
	TNT1 A 0 A_SetUserVar("user_script",1)
	TNT1 A 0 A_Playsound("NemesisSentient/Loop",7,1,1)
	NSNT AB 2 A_Look
	Loop
  Idle:
	TNT1 A 0 A_JumpIf(user_rage == 0,2)
	TNT1 A 0 A_JumpIfInventory("MarineKilled",1,"Taunt")
  Idle2:
	TNT1 A 0 A_Look
	NSNT AB 2 A_Wander
	Loop
  Taunt:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",1)
	NSNT AB 2
	TNT1 A 0 A_PlaySound("NemesisSentient/Taunt",2,1.0,0,ATTN_NONE)
	TNT1 A 0 A_TakeInventory("MarineKilled",1)
	NSNT ABABABABABABAB 2
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_ChangeFlag("NODAMAGE",0)
	Goto Idle2
  See:
	TNT1 A 0 A_JumpIf(user_script == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("NemesisSentientFire",0)
	TNT1 A 0 A_SetUserVar("user_script",1)
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2013)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_CheckPower == 1,2)
	TNT1 A 0 A_Jump(256,"CheckPower")
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_UnsetInvulnerable
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem",1,"StartRage")
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem2",1,"StartRage")
	TNT1 A 0 A_JumpIf(user_rage == 1,"SeeRage")
	TNT1 A 0 A_JumpIfHealthLower(3000,"StartRage")
	NSNT AB 2 A_Chase
	TNT1 A 0 A_Jump(50,"Evade","Teleport")	
	Loop
  SeeRage:
	NSNT AB 2 A_Chase
	TNT1 A 0 A_Jump(80,"Evade","Teleport")	
	Loop
  StartRage:
	TNT1 A 0 A_JumpIf(user_rage == 1,"SeeRage")
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	NSNT P 10 A_PlaySound("NemesisSentient/Rage",2,1.0,0,ATTN_NONE)
	NSNT PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 2 A_SpawnItemEx("NemesisCyberFlameSpawner3")
	TNT1 A 0 ACS_NamedExecuteAlways("NemesisSentientRage",0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisSentientRageRing",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_Playsound("brain/spit",6,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SetUserVar("user_rage",1)
	TNT1 A 0 A_ChangeFlag("ALWAYSFAST",1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	NSNT PPPPPPPPPPPPPPPPPPPPPPP 2 A_SpawnItemEx("NemesisCyberFlameSpawner3")
	Goto SeeRage
  Teleport:
    TNT1 A 0
	TNT1 A 0 A_Jump(128,"Telederp")
    NSNT P 1 A_UnSetShootable
	TNT1 A 0 A_JumpIf(ARGS[0] == 0,2)
    TNT1 A 0 A_ChangeFlag(NOCLIP,1)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	//TNT1 A 0 ACS_NamedExecuteAlways("Hem_SetSpecies",0,2)
	NSNT P 4
	TNT1 A 0 A_PlaySound("Heresiarch/Teleport",6,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("HeresTeleportFXSpawner",0,0,62,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	NSNT PPPPPPPPPP 1 A_FadeOut(0.1,0)
	TNT1 A 1 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 AAAAAAAAAA 0 A_Wander
	TNT1 A 1 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 AAAAAAAAAA 0 A_Wander
	TNT1 A 1 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 AAAAAAAAAA 0 A_Wander
	TNT1 A 1 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 AAAAAAAAAA 0 A_Wander
	TNT1 A 1 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 AAAAAAAAAA 0 A_Wander
	TNT1 A 2 A_PlaySound("Heresiarch/Teleport",7,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("HeresTeleportFXSpawner",0,0,62,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 A 0 A_Facetarget
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_Facetarget(45)
	NSNT P 1 A_FadeIn(0.1)
	TNT1 A 0 A_SetTranslucent(1,0)
	NSNT PPPPPPPPPP 1 A_Facetarget(45)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOCLIP,0)
	//TNT1 A 0 ACS_NamedExecuteAlways("Hem_SetSpecies",0,2)
    TNT1 A 0 A_SetShootable
	Goto See
  CheckPower:
	   TNT1 A 0 A_SetUserVar("user_CheckPower",1)
       TNT1 A 0 A_JumpIfInTargetInventory("NexusStrength",1,"CheckPower2")
       Goto See
   CheckPower2:
       TNT1 A 0 A_JumpIfInTargetInventory("TerminatorDamage2",1,"FinalTruePower")
       Goto TruePower
   TruePower:
       //TNT1 A 0 A_GiveInventory("GodFinalBattleResistanceGiver2",1)
	   TNT1 A 0 A_GiveInventory("Health",10000)
       Goto See
   FinalTruePower:
       TNT1 A 0 A_GiveInventory("GodFinalBattleResistanceGiver3",1)
	   TNT1 A 0 A_GiveInventory("Health",20000)
       Goto See
  Telederp:
	NSNT P 15 A_UnSetShootable
	TNT1 A 0 A_JumpIf(ARGS[0] == 0,2)
	TNT1 A 0 A_ChangeFlag(NOCLIP,1)
	TNT1 A 0 A_ChangeFlag(LOOKALLAROUND,1)
	TNT1 A 0 A_SetUserVar("user_lcounter",0)
	NSNT P 4
	TNT1 A 0 A_PlaySound("Heresiarch/Teleport",6,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("HeresTeleportFXSpawner",0,0,62,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	NSNT PPPPPPPPPP 1 A_FadeOut(0.1,0)
	TNT1 A 0 A_ChangeFlag(NOBLOCKMAP,1)
	TNT1 A 0 A_ChangeFlag(THRUSPECIES,1)
  TelederpLoop:
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	NSNT PP 1 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 A_SetTranslucent(0,0)
	TNT1 A 0 A_LookEx(LOF_NOJUMP|LOF_NOSEESOUND,0,1250,0,360,1)
	TNT1 AA 0 A_Chase("TelederpEnd","",CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
	TNT1 A 0 //A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_Jump(30,"TelederpEnd")
	TNT1 A 0 A_SetUserVar("user_lcounter",user_lcounter+1)
	TNT1 A 0 A_JumpIf(user_lcounter > 10,"TelederpEnd")
	Loop
  TelederpEnd:
	NSNT P 5 //A_SetUserVar("user_currenthp",ACS_NamedExecuteWithResult("Hem_GetCurrentHealth"))
	TNT1 A 0 A_PlaySound("Heresiarch/Teleport",7,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("HeresTeleportFXSpawner",0,0,62,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_Facetarget
	NSNT PPPPPPPPPP 1 A_FadeIn(0.1)
	NSNT PP 5 A_Facetarget
	TNT1 A 0 A_JumpIf(user_rage == 1,"ExitTelederp")
	Goto ExitTelederp
  ExitTelederp:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOFEAR,1)
	TNT1 A 0 A_ChangeFlag(FRIGHTENED,0)
	TNT1 A 0 A_ChangeFlag(LOOKALLAROUND,0)
	TNT1 A 0 A_ChangeFlag(THRUSPECIES,0)
	TNT1 A 0 A_ChangeFlag(NOBLOCKMAP,0)
	TNT1 A 0 A_ChangeFlag(NODAMAGE,0)
	TNT1 A 0 A_ChangeFlag(NOCLIP,0)
	TNT1 A 0 A_SetShootable
	Goto See
  Evade:
 	TNT1 A 0 A_Jump(128,"Evade2")
	TNT1 A 0 ThrustThing(Angle*256/360+64,20,0,0)
	NSNT ABABABAB 2 A_Chase
	TNT1 A 0 A_Stop
	Goto See
  Evade2:
	TNT1 A 0 ThrustThing(Angle*256/360+192,20,0,0)
	NSNT ABABABAB 2 A_Chase
	TNT1 A 0 A_Stop
	Goto See
  Missile:
    TNT1 A 0 A_Jump(120,"BFG9KRage","FastBFG10K","MiniNemesisBFG")
	TNT1 A 0 A_Jump(100,"MassResurrect")
	Goto SeeRage
  MassResurrect:
    TNT1 A 0 A_Jump(120,"MassSummon","Teleport")
	TNT1 A 0 A_JumpIf(user_Resurrectlimit >= 3,"Teleport")
	TNT1 A 0 A_SetUserVar(user_Resurrectlimit,user_Resurrectlimit+1)	
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	NSNT P 3 A_SetInvulnerable
	TNT1 A 0 A_PlaySound("NemesisSentient/Resurrect",2,1.0,0,ATTN_NONE)
	TNT1 A 0 Radius_Quake(8,120,0,40,0)	
	NSNT PPPPPPPPPPPPPPPPPPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner2",0,0,0,0)
	NSNT PPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	TNT1 A 0 A_GiveInventory("OverlordMassResurrection")
	TNT1 A 0 A_GiveInventory("OverlordMassResurrection3")
	NSNT PPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	Goto See
  MassSummon:
    TNT1 A 0 A_JumpIf(user_Summonlimit >= 3,"Teleport")
	TNT1 A 0 A_SetUserVar(user_Summonlimit,user_Summonlimit+1)	 
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	NSNT P 3 A_SetInvulnerable
	TNT1 A 0 A_PlaySound("NemesisSentient/Resurrect",2,1.0,0,ATTN_NONE)
	TNT1 A 0 Radius_Quake(8,120,0,40,0)	
	NSNT PPPPPPPPPPPPPPPPPPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner2",0,0,0,0)
	NSNT PPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	NSNT P 0 A_CustomMissile("NemPentaLine3",0,0,-72,2)
    NSNT P 0 A_CustomMissile("NemPentaLine3",0,0,-144,2)
    NSNT P 0 A_CustomMissile("NemPentaLine3",0,0,-216,2)
    NSNT P 0 A_CustomMissile("NemPentaLine3",0,0,-288,2)
    NSNT P 0 A_CustomMissile("NemPentaLine3",0,0,0,2)
	NSNT PPP 3 A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	NSNT P 2 Bright A_SpawnItemEx("ThePainTrain",0,random(20,300),10,10,0,0,random(20,300),SXF_SETMASTER|SXF_NOCHECKPOSITION)
	NSNT P 2 Bright A_SpawnItemEx("ThePainTrain",0,random(20,300),10,10,0,0,random(20,300),SXF_SETMASTER|SXF_NOCHECKPOSITION)
	NSNT PPPPPPP 3 A_SpawnItem("NemesisCyberFlameSpawner3",0,0,0,0)
	Goto See
  Pain:
	TNT1 A 0 A_Jump(64,"Teleport","Evade")
	NSNT A 3
	NSNT A 3 A_Pain	
	TNT1 A 0 A_Jump(128,"Missile")
	Goto See
  Death:
	TNT1 A 0 A_Stopsound(7)
	TNT1 A 0 A_RemoveChildren(1)
	TNT1 A 0 A_Scream
	TNT1 A 0 A_SpawnItemEx("BeastSoulSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("UpgradedNemesisArmor",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisArmorSphere",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DivineContract",0,0,8,random(0,8),random(0,8),2,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisOmegaSphere",0,0,8,random(1,8),0,2,random(0,360),0)
	NSNT H 20 A_Fall
	TNT1 A 0 A_SpawnItemEx("NemesisSentientDeathEffect")
	NSNT IIIIIIIIIIIIIIIIIIIIJJJJJJJJJJ 2
	TNT1 A 0 A_SpawnItem("NemesisDeathBall")
    NSNT JJJJJJJJJJKKKKKKKKKKKKKKKKKKKK 2
	TNT1 A 0 A_SpawnItem("NemesisDeathBall")
    NSNT LLLLLLLLLLLLLLLLLLLL 2
	TNT1 AAAAAAAA 0 A_CustomMissile("NemesisCyberBouncyBFG",0,0,random(0,360),2,random(-5,30))
	TNT1 A 0 A_SpawnItem("NemesisDeathBall")
	TNT1 A 0 A_JumpIfInTargetInventory("NemesisFragmentToken",1,3)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NemesisFragment") == 0,2)
	TNT1 A 0 A_SpawnItemEx("NemesisFragmentSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,128)
	TNT1 A 0 A_ChangeFlag(BRIGHT,0)
	NSNT M 5 A_BossDeath
	TNT1 A -1 A_KillMaster
	Stop	
	}
}