From f3bead5190faaaaa910c85b687fb2e984dc5934e Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 8 Aug 2021 01:33:04 -0500 Subject: [PATCH] Streamlined BR's NPC deletion stuff --- Events/BossRushEvent.cs | 144 +++++++++---- NPCs/CalamityGlobalNPC.cs | 425 +------------------------------------- 2 files changed, 108 insertions(+), 461 deletions(-) diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index bc8afd12e8..879aa213e4 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -14,6 +14,7 @@ using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; using CalamityMod.NPCs.Perforator; using CalamityMod.NPCs.PlaguebringerGoliath; @@ -52,22 +53,28 @@ namespace CalamityMod.Events public bool UsesSpecialSound; public TimeChangeContext ToChangeTimeTo; public OnSpawnContext SpawnContext; + public List HostileNPCsToNotDelete; public delegate void OnSpawnContext(int type); - public Boss(int id, TimeChangeContext toChangeTimeTo = TimeChangeContext.None, OnSpawnContext spawnContext = null, int specialSpawnCountdown = -1, bool usesSpecialSound = false) + public Boss(int id, TimeChangeContext toChangeTimeTo = TimeChangeContext.None, OnSpawnContext spawnContext = null, int specialSpawnCountdown = -1, bool usesSpecialSound = false, params int[] permittedNPCs) { // Default to a typical SpawnOnPlayer call for boss summoning if nothing else is inputted. if (spawnContext is null) - { spawnContext = (type) => NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); - } EntityID = id; SpecialSpawnCountdown = specialSpawnCountdown; UsesSpecialSound = usesSpecialSound; ToChangeTimeTo = toChangeTimeTo; SpawnContext = spawnContext; + HostileNPCsToNotDelete = permittedNPCs.ToList(); + + // Add the NPC type to delete blacklist list by default. + if (!HostileNPCsToNotDelete.Contains(id)) + HostileNPCsToNotDelete.Add(id); + if (BossIDsAfterDeath.TryGetValue(id, out int[] deathThings)) + HostileNPCsToNotDelete.AddRange(deathThings); } } public static bool BossRushActive = false; // Whether Boss Rush is active or not. @@ -88,47 +95,70 @@ namespace CalamityMod.Events Bosses = new List() { new Boss(NPCID.QueenBee), - new Boss(NPCID.BrainofCthulhu), - new Boss(NPCID.KingSlime), - new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night), - new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night), + + new Boss(NPCID.BrainofCthulhu, permittedNPCs: NPCID.Creeper), + + new Boss(NPCID.KingSlime, permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime, + NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType() }), + + new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night, permittedNPCs: NPCID.ServantofCthulhu), + + new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }), + new Boss(NPCID.Golem, TimeChangeContext.Day, type => { int shittyStatueBoss = NPC.NewNPC((int)(Main.player[ClosestPlayerToWorldCenter].position.X + Main.rand.Next(-100, 101)), (int)(Main.player[ClosestPlayerToWorldCenter].position.Y - 400f), type, 1); Main.npc[shittyStatueBoss].timeLeft *= 20; CalamityUtils.BossAwakenMessage(shittyStatueBoss); - }), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), - new Boss(NPCID.EaterofWorldsHead), - new Boss(ModContent.NPCType(), TimeChangeContext.Night), - new Boss(NPCID.TheDestroyer, TimeChangeContext.Night, specialSpawnCountdown: 300), + }, permittedNPCs: new int[] { NPCID.GolemFistLeft, NPCID.GolemFistRight, NPCID.GolemHead, NPCID.GolemHeadFree }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(NPCID.EaterofWorldsHead, permittedNPCs: new int[] { NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.VileSpit }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Night, permittedNPCs: ModContent.NPCType()), + + new Boss(NPCID.TheDestroyer, TimeChangeContext.Night, specialSpawnCountdown: 300, permittedNPCs: new int[] { NPCID.TheDestroyerBody, NPCID.TheDestroyerTail, NPCID.Probe }), + new Boss(NPCID.Spazmatism, TimeChangeContext.Night, type => { NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Spazmatism); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Retinazer); - }), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), + }, permittedNPCs: NPCID.Retinazer), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), NPCID.Spazmatism, NPCID.Retinazer }), + new Boss(NPCID.WallofFlesh, spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; NPC.SpawnWOF(player.position); - }), - new Boss(ModContent.NPCType()), + }, permittedNPCs: new int[] { NPCID.WallofFleshEye, NPCID.LeechHead, NPCID.LeechBody, NPCID.LeechTail, NPCID.TheHungry, NPCID.TheHungryII }), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + new Boss(NPCID.SkeletronHead, TimeChangeContext.Night, type => { Player player = Main.player[ClosestPlayerToWorldCenter]; int sans = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1); Main.npc[sans].timeLeft *= 20; CalamityUtils.BossAwakenMessage(sans); - }), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), - new Boss(ModContent.NPCType()), + }, permittedNPCs: NPCID.SkeletronHand), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType() }), + new Boss(ModContent.NPCType(), spawnContext: type => { NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType()); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType()); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType()); - }), + }, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType() }), + new Boss(NPCID.CultistBoss, spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; @@ -136,7 +166,9 @@ namespace CalamityMod.Events Main.npc[doctorLooneyTunes].direction = Main.npc[doctorLooneyTunes].spriteDirection = Math.Sign(player.Center.X - player.Center.X - 90f); Main.npc[doctorLooneyTunes].timeLeft *= 20; CalamityUtils.BossAwakenMessage(doctorLooneyTunes); - }), + }, permittedNPCs: new int[] { NPCID.CultistBossClone, NPCID.CultistDragonHead, NPCID.CultistDragonBody1, NPCID.CultistDragonBody2, NPCID.CultistDragonBody3, NPCID.CultistDragonBody4, + NPCID.CultistDragonTail, NPCID.AncientCultistSquidhead, NPCID.AncientLight, NPCID.AncientDoom }), + new Boss(ModContent.NPCType(), spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; @@ -154,13 +186,22 @@ namespace CalamityMod.Events int thePefectOne = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1); Main.npc[thePefectOne].timeLeft *= 20; CalamityUtils.BossAwakenMessage(thePefectOne); - }, specialSpawnCountdown: 300), - new Boss(NPCID.Plantera), - new Boss(ModContent.NPCType()), - new Boss(ModContent.NPCType()), - new Boss(ModContent.NPCType()), - new Boss(ModContent.NPCType()), - new Boss(ModContent.NPCType(), specialSpawnCountdown: 360), + }, specialSpawnCountdown: 300, permittedNPCs: ModContent.NPCType()), + + new Boss(NPCID.Plantera, permittedNPCs: new int[] { NPCID.PlanterasTentacle, NPCID.PlanterasHook, NPCID.Spore }), + + new Boss(ModContent.NPCType(), permittedNPCs: ModContent.NPCType()), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType() ,ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), permittedNPCs: ModContent.NPCType()), + + new Boss(ModContent.NPCType(), specialSpawnCountdown: 360, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + new Boss(ModContent.NPCType(), spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; @@ -169,38 +210,53 @@ namespace CalamityMod.Events int ravager = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1); Main.npc[ravager].timeLeft *= 20; CalamityUtils.BossAwakenMessage(ravager); - }, usesSpecialSound: true), + }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType() }), + new Boss(NPCID.DukeFishron, spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; int dukeFishron = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1); Main.npc[dukeFishron].timeLeft *= 20; CalamityUtils.BossAwakenMessage(dukeFishron); - }), + }, permittedNPCs: new int[] { NPCID.DetonatingBubble, NPCID.Sharkron, NPCID.Sharkron2 }), + new Boss(NPCID.MoonLordCore, spawnContext: type => { CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.BossRushTierThreeEndText2", XerocTextColor); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); - }), + }, permittedNPCs: new int[] { NPCID.MoonLordLeechBlob, NPCID.MoonLordHand, NPCID.MoonLordHead, NPCID.MoonLordFreeEye }), + new Boss(ModContent.NPCType(), TimeChangeContext.Night, type => { Player player = Main.player[ClosestPlayerToWorldCenter]; Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AstrumDeusSpawn"), player.Center); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); - }, usesSpecialSound: true), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), - new Boss(ModContent.NPCType()), - new Boss(ModContent.NPCType(), TimeChangeContext.Night, specialSpawnCountdown: 420), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), + }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Night, specialSpawnCountdown: 420, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), NPCID.DetonatingBubble}), + new Boss(ModContent.NPCType(), spawnContext: type => { Player player = Main.player[ClosestPlayerToWorldCenter]; int boomerDuke = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1); Main.npc[boomerDuke].timeLeft *= 20; CalamityUtils.BossAwakenMessage(boomerDuke); - }), - new Boss(ModContent.NPCType()), + }, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + new Boss(ModContent.NPCType(), TimeChangeContext.Day, type => { Player player = Main.player[ClosestPlayerToWorldCenter]; @@ -209,7 +265,8 @@ namespace CalamityMod.Events int prov = NPC.NewNPC((int)(player.position.X + Main.rand.Next(-500, 501)), (int)(player.position.Y - 250f), type, 1); Main.npc[prov].timeLeft *= 20; CalamityUtils.BossAwakenMessage(prov); - }, usesSpecialSound: true), + }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + new Boss(ModContent.NPCType(), spawnContext: type => { CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.BossRushTierFourEndText2", XerocTextColor); @@ -224,15 +281,18 @@ namespace CalamityMod.Events } Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SupremeCalamitasSpawn"), Main.player[ClosestPlayerToWorldCenter].Center); CalamityUtils.SpawnBossBetter(Main.player[ClosestPlayerToWorldCenter].Top - new Vector2(42f, 84f), type); - }), - new Boss(ModContent.NPCType(), TimeChangeContext.Day), + }, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + + new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), + new Boss(ModContent.NPCType(), TimeChangeContext.Day, type => { Player player = Main.player[ClosestPlayerToWorldCenter]; Main.PlaySound(CalamityMod.Instance.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DevourerSpawn"), player.Center); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); - }, usesSpecialSound: true) + }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }) }; BossIDsAfterDeath = new Dictionary() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 6fe8de63f3..ec50ff8fb8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2826,425 +2826,12 @@ namespace CalamityMod.NPCs #region Boss Rush Force Despawn Other NPCs private void BossRushForceDespawnOtherNPCs(NPC npc, Mod mod) { - switch (BossRushEvent.BossRushStage) - { - case 0: - if (npc.type != NPCID.QueenBee) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 1: - if (npc.type != NPCID.BrainofCthulhu && npc.type != NPCID.Creeper) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 2: - if (npc.type != NPCID.KingSlime && npc.type != NPCID.BlueSlime && npc.type != NPCID.SlimeSpiked && npc.type != NPCType() && - npc.type != NPCID.YellowSlime && npc.type != NPCID.PurpleSlime && npc.type != NPCID.GreenSlime && npc.type != NPCID.RedSlime && - npc.type != NPCID.IceSlime && npc.type != NPCID.UmbrellaSlime && npc.type != NPCID.RainbowSlime && npc.type != NPCID.Pinky) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 3: - if (npc.type != NPCID.EyeofCthulhu && npc.type != NPCID.ServantofCthulhu) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 4: - if (npc.type != NPCID.SkeletronPrime && npc.type != NPCID.PrimeSaw && npc.type != NPCID.PrimeVice && - npc.type != NPCID.PrimeCannon && npc.type != NPCID.PrimeLaser && npc.type != NPCID.Probe) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 5: - if (npc.type != NPCID.Golem && npc.type != NPCID.GolemFistLeft && npc.type != NPCID.GolemFistRight && - npc.type != NPCID.GolemHead && npc.type != NPCID.GolemHeadFree) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 6: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 7: - if (!EaterofWorldsIDs.Contains(npc.type) && npc.type != NPCID.VileSpit) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 8: - if (npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 9: - if (!DestroyerIDs.Contains(npc.type) && npc.type != NPCID.Probe) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 10: - if (npc.type != NPCID.Spazmatism && npc.type != NPCID.Retinazer) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 11: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCID.Spazmatism && npc.type != NPCID.Retinazer) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 12: - if (npc.type != NPCID.WallofFlesh && npc.type != NPCID.WallofFleshEye && npc.type != NPCID.TheHungry && - npc.type != NPCID.TheHungryII && npc.type != NPCID.LeechHead && npc.type != NPCID.LeechBody && - npc.type != NPCID.LeechTail) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 13: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 14: - if (npc.type != NPCID.SkeletronHead && npc.type != NPCID.SkeletronHand) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 15: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 16: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 17: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 18: - if (npc.type != NPCID.CultistBoss && npc.type != NPCID.CultistBossClone && npc.type != NPCID.CultistDragonHead && - npc.type != NPCID.CultistDragonBody1 && npc.type != NPCID.CultistDragonBody2 && npc.type != NPCID.CultistDragonBody3 && - npc.type != NPCID.CultistDragonBody4 && npc.type != NPCID.CultistDragonTail && npc.type != NPCID.AncientCultistSquidhead && - npc.type != NPCID.AncientLight && npc.type != NPCID.AncientDoom) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 19: - if (npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 20: - if (npc.type != NPCID.Plantera && npc.type != NPCID.PlanterasTentacle && npc.type != NPCID.PlanterasHook && - npc.type != NPCID.Spore) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 21: - if (npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 22: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 23: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 24: - if (npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 25: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 26: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 27: - if (npc.type != NPCID.DukeFishron && npc.type != NPCID.DetonatingBubble && npc.type != NPCID.Sharkron && - npc.type != NPCID.Sharkron2) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 28: - if (npc.type != NPCID.MoonLordCore && npc.type != NPCID.MoonLordHead && npc.type != NPCID.MoonLordHand && - npc.type != NPCID.MoonLordLeechBlob && npc.type != NPCID.MoonLordFreeEye) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 29: - if (!AstrumDeusIDs.Contains(npc.type)) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 30: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 31: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 32: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 33: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCID.DetonatingBubble) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 34: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 35: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 36: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 37: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 38: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - - case 39: - if (npc.type != NPCType() && npc.type != NPCType() && - npc.type != NPCType()) - { - npc.active = false; - npc.netUpdate = true; - } - - break; - } - } + if (!BossRushEvent.Bosses[BossRushEvent.BossRushStage].HostileNPCsToNotDelete.Contains(npc.type)) + { + npc.active = false; + npc.netUpdate = true; + } + } #endregion #region Pillar Event Progression Edit