From 28cc25a5f549758491fbaffcd090574f6ca08817 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sun, 6 Feb 2022 21:41:42 -0600 Subject: [PATCH] 1 - Removed demonshade enrage AI changes. 2 - Murdered Timed DR entirely, fuck it, burn it down. --- Items/DifficultyItems/Malice.cs | 22 +- NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs | 3 +- NPCs/CalamityAI.cs | 54 ++--- NPCs/CalamityGlobalNPC.cs | 213 +++--------------- NPCs/Crabulon/CrabShroom.cs | 5 +- NPCs/Crabulon/CrabulonIdle.cs | 9 +- NPCs/Cryogen/Cryogen.cs | 7 +- NPCs/DesertScourge/DesertScourgeBody.cs | 3 +- NPCs/DesertScourge/DesertScourgeHead.cs | 5 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 5 +- NPCs/HiveMind/HiveMind.cs | 7 +- NPCs/Leviathan/Leviathan.cs | 5 +- NPCs/Leviathan/Siren.cs | 5 +- NPCs/Perforator/PerforatorHeadLarge.cs | 3 +- NPCs/Perforator/PerforatorHeadMedium.cs | 3 +- NPCs/Perforator/PerforatorHeadSmall.cs | 3 +- NPCs/Perforator/PerforatorHive.cs | 7 +- .../PlaguebringerGoliath.cs | 7 +- NPCs/Polterghast/Polterghast.cs | 5 +- .../ProfanedGuardians/ProfanedGuardianBoss.cs | 8 +- NPCs/Providence/Providence.cs | 7 +- NPCs/Ravager/RavagerBody.cs | 6 +- NPCs/Signus/Signus.cs | 5 +- NPCs/SlimeGod/SlimeGod.cs | 5 +- NPCs/SlimeGod/SlimeGodCore.cs | 5 +- NPCs/SlimeGod/SlimeGodRun.cs | 5 +- NPCs/SlimeGod/SlimeGodRunSplit.cs | 5 +- NPCs/SlimeGod/SlimeGodSplit.cs | 5 +- NPCs/StormWeaver/StormWeaverHead.cs | 5 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 5 +- .../Bosses/BrainOfCthulhuAI.cs | 12 +- NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs | 6 +- .../VanillaNPCOverrides/Bosses/DestroyerAI.cs | 6 +- .../Bosses/DukeFishronAI.cs | 6 +- .../Bosses/EaterOfWorldsAI.cs | 8 +- .../Bosses/EyeOfCthulhuAI.cs | 6 +- NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs | 21 +- .../VanillaNPCOverrides/Bosses/KingSlimeAI.cs | 8 +- NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs | 6 +- NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs | 6 +- NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs | 10 +- .../VanillaNPCOverrides/Bosses/SkeletronAI.cs | 10 +- .../Bosses/SkeletronPrimeAI.cs | 26 +-- NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs | 12 +- .../Bosses/WallOfFleshAI.cs | 10 +- NPCs/Yharon/Yharon.cs | 6 +- 46 files changed, 192 insertions(+), 399 deletions(-) diff --git a/Items/DifficultyItems/Malice.cs b/Items/DifficultyItems/Malice.cs index 7552063d30..9a1da8785e 100644 --- a/Items/DifficultyItems/Malice.cs +++ b/Items/DifficultyItems/Malice.cs @@ -18,19 +18,19 @@ namespace CalamityMod.Items.DifficultyItems DisplayName.SetDefault("Malice"); Tooltip.SetDefault("Enables/disables Malice Mode, can only be used in Death Mode.\n" + - // Overall description and warning lines - "[c/c01818:This mode is subjective, play how you want, don't expect to live.]\n" + + // Overall description and warning lines + "[c/c01818:This mode is subjective, play how you want, don't expect to live.]\n" + - // Rev Mode line - "All effects from Death Mode are enabled, including the following:\n" + + // Rev Mode line + "All effects from Death Mode are enabled, including the following:\n" + - // Misc lines - "Nerfs the effectiveness of life steal a bit more.\n" + - - // Boss lines - "Enrages all bosses and gives them far more aggressive AI.\n" + - "Bosses and their projectiles deal 25% more damage.\n" + - "Increases the velocity of most boss projectiles by 25%."); + // Misc lines + "Nerfs the effectiveness of life steal a bit more.\n" + + + // Boss lines + "Enrages all bosses and gives them far more aggressive AI.\n" + + "Bosses and their projectiles deal 25% more damage.\n" + + "Increases the velocity of most boss projectiles by 25%."); } public override void SetDefaults() diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs index 7db2824b06..16726a17ae 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs @@ -145,8 +145,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm CalamityGlobalNPC.adultEidolonWyrmHead = npc.whoAmI; // Difficulty modes - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || enraged; + bool malice = CalamityWorld.malice; bool death = CalamityWorld.death; bool revenge = CalamityWorld.revenge; bool expertMode = Main.expertMode; diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index c5c3bd2019..715f09ee31 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -34,8 +34,7 @@ namespace CalamityMod.NPCs public static void AquaticScourgeAI(NPC npc, Mod mod, bool head) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -108,7 +107,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -690,8 +689,7 @@ namespace CalamityMod.NPCs // Variables for buffing the AI bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -713,12 +711,12 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged && (!player.ZoneUnderworldHeight || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (biomeEnraged && (!modPlayer.ZoneCalamity || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } @@ -1230,8 +1228,7 @@ namespace CalamityMod.NPCs Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); // Variables for increasing difficulty - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -1397,7 +1394,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -2018,8 +2015,7 @@ namespace CalamityMod.NPCs CalamityGlobalNPC.cataclysm = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -2038,7 +2034,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -2300,8 +2296,7 @@ namespace CalamityMod.NPCs CalamityGlobalNPC.catastrophe = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -2320,7 +2315,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -2582,8 +2577,7 @@ namespace CalamityMod.NPCs float lifeRatio = npc.life / (float)npc.lifeMax; // Variables - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -2595,7 +2589,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -3229,8 +3223,7 @@ namespace CalamityMod.NPCs CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Difficulty variables - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -3238,7 +3231,7 @@ namespace CalamityMod.NPCs float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1.5f; } @@ -3958,8 +3951,7 @@ namespace CalamityMod.NPCs double lifeRatio = npc.life / (double)npc.lifeMax; // Difficulty modes - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -4049,8 +4041,8 @@ namespace CalamityMod.NPCs npc.timeLeft = 1800; // Scale multiplier based on nearby active tiles - float tileEnrageMult = (BossRushEvent.BossRushActive || enraged) ? 1.375f : malice ? 1.25f : 1f; - npc.Calamity().CurrentlyEnraged = (tileEnrageMult > 1f && !BossRushEvent.BossRushActive) || enraged; + float tileEnrageMult = BossRushEvent.BossRushActive ? 1.375f : malice ? 1.25f : 1f; + npc.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !BossRushEvent.BossRushActive; // Set AI variable to be used by Dark Energies npc.ai[1] = tileEnrageMult; @@ -4537,8 +4529,7 @@ namespace CalamityMod.NPCs // Variables float rotationMult = 3f; float rotationAmt = 0.03f; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -4574,7 +4565,7 @@ namespace CalamityMod.NPCs float enrageScale = death ? 1.5f : 1f; if (npc.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (npc.localAI[2] > 0f || malice) @@ -5427,8 +5418,7 @@ namespace CalamityMod.NPCs float lifeRatio = npc.life / (float)npc.lifeMax; // Variables - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -5607,7 +5597,7 @@ namespace CalamityMod.NPCs bool biomeEnraged = npc.localAI[1] <= 0f; - npc.Calamity().CurrentlyEnraged = biomeEnraged || enraged; + npc.Calamity().CurrentlyEnraged = biomeEnraged; // If the player isn't in the ocean biome or Old Duke is transitioning between phases, become immune if (!phase3AI) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b60a413510..d304a96f60 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -79,14 +79,6 @@ namespace CalamityMod.NPCs { #region Variables - public float TimedDRScaleFactor { get; set; } = 0f; - private const float timedDR_Disabled = 0f; - private const float timedDR_Malice = 2f; - private const float timedDR_Worm = 3f; - private const float timedDR_NightProvi = 10f; - private const float timedDRMult_Normal = 0.67f; - private const float timedDRMult_Expert = 0.85f; - public float DR { get; set; } = 0f; public int KillTime { get; set; } = 0; @@ -900,8 +892,6 @@ namespace CalamityMod.NPCs VulnerabilitiesAndResistances(npc); - TimedDRScaleFactors(npc); - BoundNPCSafety(mod, npc); } #endregion @@ -1262,149 +1252,6 @@ namespace CalamityMod.NPCs } #endregion - #region Timed DR Stats - private void TimedDRScaleFactors(NPC npc) - { - bool malice = CalamityWorld.malice; - bool bossHasBeenDowned = GetDownedBossVariable(npc.type); - - // Every boss post-DoG has normal timed DR until it is downed - bool removePostDoGTimedDR = bossHasBeenDowned; - - // Post-Provi Pre-DoG timed DR is removed when anything DoG and onward is defeated - bool removePostProviPreDoGTimedDR = removePostDoGTimedDR || CalamityWorld.downedAdultEidolonWyrm || - CalamityWorld.downedSCal || CalamityWorld.downedExoMechs || CalamityWorld.downedYharon || CalamityWorld.downedDoG; - - // Post-ML Pre-Provi timed DR is removed when anything Providence and onward is defeated - bool removePostMLPreProviTimedDR = removePostProviPreDoGTimedDR || CalamityWorld.downedBoomerDuke || - CalamityWorld.downedPolterghast || CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 || - CalamityWorld.downedSentinel3 || CalamityWorld.downedProvidence; - - // Late Hardmode timed DR is removed when anything Moon Lord and onward is defeated - bool removeLateHardmodeTimedDR = removePostMLPreProviTimedDR || CalamityWorld.downedBumble || - CalamityWorld.downedGuardians || NPC.downedMoonlord; - - // Early Hardmode timed DR is removed when anything Plantera and onward is defeated - bool removeEarlyHardmodeTimedDR = removeLateHardmodeTimedDR || CalamityWorld.downedStarGod || - NPC.downedAncientCultist || CalamityWorld.downedScavenger || NPC.downedFishron || - CalamityWorld.downedPlaguebringer || NPC.downedGolemBoss || CalamityWorld.downedAstrageldon || - CalamityWorld.downedLeviathan || NPC.downedPlantBoss; - - // Pre Hardmode timed DR is removed when anything Wall of Flesh and onward is defeated - bool removePreHardmodeTimedDR = removeEarlyHardmodeTimedDR || CalamityWorld.downedCalamitas || - NPC.downedMechBoss1 || NPC.downedMechBoss2 || NPC.downedMechBoss3 || CalamityWorld.downedBrimstoneElemental || - CalamityWorld.downedAquaticScourge || CalamityWorld.downedCryogen || Main.hardMode; - - // Vanilla bosses - switch (npc.type) - { - // Pre Hardmode bosses - case NPCID.KingSlime: - case NPCID.EyeofCthulhu: - case NPCID.EaterofWorldsHead: - case NPCID.EaterofWorldsBody: - case NPCID.EaterofWorldsTail: - case NPCID.BrainofCthulhu: - case NPCID.Creeper: - case NPCID.QueenBee: - case NPCID.SkeletronHead: - case NPCID.WallofFlesh: - case NPCID.WallofFleshEye: - - TimedDRScaleFactor = removePreHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled; - - break; - - // The Destroyer - case NPCID.TheDestroyer: - case NPCID.TheDestroyerBody: - case NPCID.TheDestroyerTail: - - TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Worm : timedDR_Disabled; - - break; - - // Early Hardmode bosses - case NPCID.Spazmatism: - case NPCID.Retinazer: - case NPCID.SkeletronPrime: - case NPCID.Plantera: - - TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled; - - break; - - // Late Hardmode bosses - case NPCID.Golem: - case NPCID.GolemHead: - case NPCID.DukeFishron: - case NPCID.CultistBoss: - case NPCID.MoonLordCore: - case NPCID.MoonLordHead: - case NPCID.MoonLordHand: - - TimedDRScaleFactor = removeLateHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled; - - break; - } - - // Calamity bosses - bool preHardmodeCalamityBosses = CalamityLists.DesertScourgeIDs.Contains(npc.type) || npc.type == NPCType() || - npc.type == NPCType() || npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType() || npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType(); - - bool earlyHardmodeCalamityBosses = npc.type == NPCType() || CalamityLists.AquaticScourgeIDs.Contains(npc.type) || - npc.type == NPCType() || npc.type == NPCType(); - - bool lateHardmodeCalamityBosses = npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType() || CalamityLists.AstrumDeusIDs.Contains(npc.type); - - bool postMLPreProviCalamityBosses = npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType(); - - bool postProviPreDoGCalamityBosses = npc.type == NPCType() || npc.type == NPCType() || - CalamityLists.StormWeaverIDs.Contains(npc.type) || npc.type == NPCType() || npc.type == NPCType() || - npc.type == NPCType() || CalamityLists.DevourerOfGodsIDs.Contains(npc.type); - - bool postDoGCalamityBosses = npc.type == NPCType() || npc.type == NPCType() || - CalamityLists.ThanatosIDs.Contains(npc.type) || npc.type == NPCType() || npc.type == NPCType() || - CalamityLists.AresIDs.Contains(npc.type) || npc.type == NPCType(); - - if (preHardmodeCalamityBosses) - { - TimedDRScaleFactor = removePreHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.DesertScourgeIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled; - } - else if (earlyHardmodeCalamityBosses) - { - TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.AquaticScourgeIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled; - } - else if (lateHardmodeCalamityBosses) - { - TimedDRScaleFactor = removeLateHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.AstrumDeusIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled; - } - else if (postMLPreProviCalamityBosses) - { - TimedDRScaleFactor = removePostMLPreProviTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled; - } - else if (postProviPreDoGCalamityBosses) - { - TimedDRScaleFactor = removePostProviPreDoGTimedDR ? timedDR_Disabled : malice ? (CalamityLists.StormWeaverIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled; - } - else if (postDoGCalamityBosses) - { - TimedDRScaleFactor = removePostDoGTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled; - } - - // Reduce timed DR in lower difficulties - if (!Main.expertMode) - TimedDRScaleFactor *= timedDRMult_Normal; - else if (!CalamityWorld.revenge) - TimedDRScaleFactor *= timedDRMult_Expert; - } - #endregion - #region Vulnerabilities and Resistances private void VulnerabilitiesAndResistances(NPC npc) { @@ -2578,14 +2425,12 @@ namespace CalamityMod.NPCs if (yellowCandle > 0 && DR < 0.99f && npc.takenDamageMultiplier > 0.05f) damage += yellowCandleDamage; - // Boss that get higher timed DR than normal in specific circumstances - bool nightProvi = npc.type == NPCType() && (!Main.dayTime || CalamityWorld.malice); - // Calculate extra DR based on kill time, similar to the Hush boss from The Binding of Isaac - if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && (TimedDRScaleFactor > 0f || nightProvi)) + bool nightProvi = npc.type == NPCType() && (!Main.dayTime || CalamityWorld.malice); + if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && nightProvi) { // Set the DR scaling factor - float DRScalar = nightProvi ? timedDR_NightProvi : TimedDRScaleFactor; + float DRScalar = 10f; // The limit for how much extra DR the boss can have float extraDRLimit = (1f - DR) * DRScalar; @@ -2800,76 +2645,76 @@ namespace CalamityMod.NPCs switch (npc.type) { case NPCID.KingSlime: - return KingSlimeAI.BuffedKingSlimeAI(npc, enraged > 0, mod); + return KingSlimeAI.BuffedKingSlimeAI(npc, mod); case NPCID.EyeofCthulhu: - return EyeOfCthulhuAI.BuffedEyeofCthulhuAI(npc, enraged > 0, mod); + return EyeOfCthulhuAI.BuffedEyeofCthulhuAI(npc, mod); case NPCID.EaterofWorldsHead: case NPCID.EaterofWorldsBody: case NPCID.EaterofWorldsTail: - return EaterOfWorldsAI.BuffedEaterofWorldsAI(npc, enraged > 0, mod); + return EaterOfWorldsAI.BuffedEaterofWorldsAI(npc, mod); case NPCID.BrainofCthulhu: - return BrainOfCthulhuAI.BuffedBrainofCthulhuAI(npc, enraged > 0, mod); + return BrainOfCthulhuAI.BuffedBrainofCthulhuAI(npc, mod); case NPCID.Creeper: - return BrainOfCthulhuAI.BuffedCreeperAI(npc, enraged > 0, mod); + return BrainOfCthulhuAI.BuffedCreeperAI(npc, mod); case NPCID.QueenBee: - return QueenBeeAI.BuffedQueenBeeAI(npc, enraged > 0, mod); + return QueenBeeAI.BuffedQueenBeeAI(npc, mod); case NPCID.SkeletronHand: - return SkeletronAI.BuffedSkeletronHandAI(npc, enraged > 0, mod); + return SkeletronAI.BuffedSkeletronHandAI(npc, mod); case NPCID.SkeletronHead: - return SkeletronAI.BuffedSkeletronAI(npc, enraged > 0, mod); + return SkeletronAI.BuffedSkeletronAI(npc, mod); case NPCID.WallofFlesh: - return WallOfFleshAI.BuffedWallofFleshAI(npc, enraged > 0, mod); + return WallOfFleshAI.BuffedWallofFleshAI(npc, mod); case NPCID.WallofFleshEye: - return WallOfFleshAI.BuffedWallofFleshEyeAI(npc, enraged > 0, mod); + return WallOfFleshAI.BuffedWallofFleshEyeAI(npc, mod); case NPCID.TheDestroyer: case NPCID.TheDestroyerBody: case NPCID.TheDestroyerTail: - return DestroyerAI.BuffedDestroyerAI(npc, enraged > 0, mod); + return DestroyerAI.BuffedDestroyerAI(npc, mod); case NPCID.Probe: return DestroyerAI.BuffedProbeAI(npc, mod); case NPCID.Retinazer: - return TwinsAI.BuffedRetinazerAI(npc, enraged > 0, mod); + return TwinsAI.BuffedRetinazerAI(npc, mod); case NPCID.Spazmatism: - return TwinsAI.BuffedSpazmatismAI(npc, enraged > 0, mod); + return TwinsAI.BuffedSpazmatismAI(npc, mod); case NPCID.SkeletronPrime: - return SkeletronPrimeAI.BuffedSkeletronPrimeAI(npc, enraged > 0, mod); + return SkeletronPrimeAI.BuffedSkeletronPrimeAI(npc, mod); case NPCID.PrimeLaser: - return SkeletronPrimeAI.BuffedPrimeLaserAI(npc, enraged > 0, mod); + return SkeletronPrimeAI.BuffedPrimeLaserAI(npc, mod); case NPCID.PrimeCannon: - return SkeletronPrimeAI.BuffedPrimeCannonAI(npc, enraged > 0, mod); + return SkeletronPrimeAI.BuffedPrimeCannonAI(npc, mod); case NPCID.PrimeVice: - return SkeletronPrimeAI.BuffedPrimeViceAI(npc, enraged > 0, mod); + return SkeletronPrimeAI.BuffedPrimeViceAI(npc, mod); case NPCID.PrimeSaw: - return SkeletronPrimeAI.BuffedPrimeSawAI(npc, enraged > 0, mod); + return SkeletronPrimeAI.BuffedPrimeSawAI(npc, mod); case NPCID.Plantera: - return PlanteraAI.BuffedPlanteraAI(npc, enraged > 0, mod); + return PlanteraAI.BuffedPlanteraAI(npc, mod); case NPCID.PlanterasHook: return PlanteraAI.BuffedPlanterasHookAI(npc, mod); case NPCID.PlanterasTentacle: return PlanteraAI.BuffedPlanterasTentacleAI(npc, mod); case NPCID.Golem: - return GolemAI.BuffedGolemAI(npc, enraged > 0, mod); + return GolemAI.BuffedGolemAI(npc, mod); case NPCID.GolemFistLeft: case NPCID.GolemFistRight: - return GolemAI.BuffedGolemFistAI(npc, enraged > 0, mod); + return GolemAI.BuffedGolemFistAI(npc, mod); case NPCID.GolemHead: - return GolemAI.BuffedGolemHeadAI(npc, enraged > 0, mod); + return GolemAI.BuffedGolemHeadAI(npc, mod); case NPCID.GolemHeadFree: - return GolemAI.BuffedGolemHeadFreeAI(npc, enraged > 0, mod); + return GolemAI.BuffedGolemHeadFreeAI(npc, mod); case NPCID.DukeFishron: - return DukeFishronAI.BuffedDukeFishronAI(npc, enraged > 0, mod); + return DukeFishronAI.BuffedDukeFishronAI(npc, mod); case NPCID.Pumpking: if (CalamityWorld.downedDoG) @@ -2905,7 +2750,7 @@ namespace CalamityMod.NPCs case NPCID.CultistBoss: case NPCID.CultistBossClone: - return CultistAI.BuffedCultistAI(npc, enraged > 0, mod); + return CultistAI.BuffedCultistAI(npc, mod); case NPCID.AncientLight: return CultistAI.BuffedAncientLightAI(npc, mod); case NPCID.AncientDoom: @@ -2916,7 +2761,7 @@ namespace CalamityMod.NPCs case NPCID.MoonLordHead: case NPCID.MoonLordFreeEye: case NPCID.MoonLordLeechBlob: - return MoonLordAI.BuffedMoonLordAI(npc, enraged > 0, mod); + return MoonLordAI.BuffedMoonLordAI(npc, mod); default: break; diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index af2dfc5b93..e721bab6bd 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -51,9 +51,8 @@ namespace CalamityMod.NPCs.Crabulon public override void AI() { Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0f, 0.2f, 0.4f); - bool enraged = npc.Calamity().enraged > 0; - bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive || enraged; - float xVelocityLimit = (CalamityWorld.malice || BossRushEvent.BossRushActive || enraged) ? 7.5f : 5f; + bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; + float xVelocityLimit = (CalamityWorld.malice || BossRushEvent.BossRushActive) ? 7.5f : 5f; float yVelocityLimit = revenge ? 1.25f : 1f; Player player = Main.player[npc.target]; npc.velocity.Y += 0.02f; diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index aa82c637d4..977939c40d 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -75,12 +75,9 @@ namespace CalamityMod.NPCs.Crabulon public override void AI() { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0f, 0.3f, 0.7f); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -149,12 +146,12 @@ namespace CalamityMod.NPCs.Crabulon float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (biomeEnraged && (!player.ZoneGlowshroom || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 79e0d28a8d..00fb8415a4 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -107,8 +107,7 @@ namespace CalamityMod.NPCs.Cryogen Player player = Main.player[npc.target]; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -127,14 +126,14 @@ namespace CalamityMod.NPCs.Cryogen float enrageScale = death ? 0.5f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } if (enrageScale > 2f) enrageScale = 2f; - if (BossRushEvent.BossRushActive || enraged) + if (BossRushEvent.BossRushActive) enrageScale = 3f; // Percent life remaining diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index dd2735cf9e..9491d6de8b 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -63,8 +63,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void AI() { Player player = Main.player[npc.target]; - bool enraged = npc.Calamity().enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; float burrowTimeGateValue = death ? 420f : 540f; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 9ed1c47aed..bfb177f9a6 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -94,8 +94,7 @@ namespace CalamityMod.NPCs.DesertScourge { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -124,7 +123,7 @@ namespace CalamityMod.NPCs.DesertScourge float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 43454489f4..737c599262 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -262,12 +262,11 @@ namespace CalamityMod.NPCs.DevourerofGods // Variables Vector2 vector = npc.Center; bool flies = npc.ai[3] == 0f; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index f0f6b0a643..5b483273a2 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -352,8 +352,7 @@ namespace CalamityMod.NPCs.HiveMind Player player = Main.player[npc.target]; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -375,12 +374,12 @@ namespace CalamityMod.NPCs.HiveMind float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged && (!player.ZoneCorrupt || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index a9472bbc59..8c640dd6e8 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -93,8 +93,7 @@ namespace CalamityMod.NPCs.Leviathan CalamityGlobalNPC.leviathan = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -172,7 +171,7 @@ namespace CalamityMod.NPCs.Leviathan float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 58c92ef1b6..6c7b64a937 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -123,8 +123,7 @@ namespace CalamityMod.NPCs.Leviathan // Variables Player player = Main.player[npc.target]; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -144,7 +143,7 @@ namespace CalamityMod.NPCs.Leviathan float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1.5f; } diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index fcbb4b175d..f1ada4fd1f 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -77,8 +77,7 @@ namespace CalamityMod.NPCs.Perforator { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 38d8c8fd68..e769752de6 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -62,8 +62,7 @@ namespace CalamityMod.NPCs.Perforator { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 4169296aee..cf7269133e 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -73,8 +73,7 @@ namespace CalamityMod.NPCs.Perforator { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 9bd559111b..a1bcc08093 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -98,8 +98,7 @@ namespace CalamityMod.NPCs.Perforator if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) npc.TargetClosest(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -140,12 +139,12 @@ namespace CalamityMod.NPCs.Perforator float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (biomeEnraged && (!player.ZoneCrimson || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice)) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 4aeffd44d3..a1f5267cbf 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -113,8 +113,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.height = (int)(npc.frame.Height * (charging ? 1.5f : 1.8f)); // Mode variables - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -206,14 +205,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath float enrageScale = death ? 0.5f : 0f; if (biomeEnraged) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1.5f; } if (enrageScale > 1.5f) enrageScale = 1.5f; - if (BossRushEvent.BossRushActive || enraged) + if (BossRushEvent.BossRushActive) enrageScale = 2f; bool diagonalDash = (revenge && phase2) || malice; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 7a0c53e4c7..f1656c9031 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -142,8 +142,7 @@ namespace CalamityMod.NPCs.Polterghast // Variables Vector2 vector = npc.Center; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool speedBoost = false; bool despawnBoost = false; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -341,7 +340,7 @@ namespace CalamityMod.NPCs.Polterghast if (malice) tileEnrageMult = 1.75f; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive || enraged) && tileEnrageMult >= 1.6f; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && tileEnrageMult >= 1.6f; // Used to inform clone and hooks about number of active tiles nearby npc.ai[3] = tileEnrageMult; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index c546c31e9c..d38bf19a2e 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -87,12 +87,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void AI() { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - CalamityGlobalNPC.doughnutBoss = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -160,9 +157,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians else biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax; - if (enraged) - npc.Calamity().CurrentlyEnraged = true; - // Take damage or not npc.dontTakeDamage = biomeEnrageTimer <= 0 && !malice; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 0bdfe6ddc6..70c105dbc7 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -176,7 +176,6 @@ namespace CalamityMod.NPCs.Providence // Night bool bool malice = CalamityWorld.malice; - bool enraged = npc.Calamity().enraged > 0; bool nightTime = !Main.dayTime || malice; // Difficulty bools @@ -216,7 +215,7 @@ namespace CalamityMod.NPCs.Providence if (nightTime) projectileDamageMult = 2; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (nightTime || malice)) || enraged || biomeEnrageTimer <= 0; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (nightTime || malice)) || biomeEnrageTimer <= 0; // Projectile damage values int holyLaserDamage = npc.GetProjectileDamage(ModContent.ProjectileType()) * projectileDamageMult; @@ -248,7 +247,7 @@ namespace CalamityMod.NPCs.Providence float baseSpearRate = 18f; float spearRate = 1f + spearRateIncrease; - if (BossRushEvent.BossRushActive || enraged) + if (BossRushEvent.BossRushActive) spearRate += bossRushSpearRateIncrease; // Projectile fire rate multiplier @@ -518,7 +517,7 @@ namespace CalamityMod.NPCs.Providence float velocityBoost = death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); float acceleration = (expertMode ? 1.1f : 1.05f) + accelerationBoost; float velocity = (expertMode ? 16f : 15f) + velocityBoost; - if (BossRushEvent.BossRushActive || enraged || nightTime) + if (BossRushEvent.BossRushActive || nightTime) { acceleration = 1.5f; velocity = 25f; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 39f649f4db..40aca4ed72 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -96,14 +96,12 @@ namespace CalamityMod.NPCs.Ravager { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index eabe382a17..3e7cb42e39 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -96,8 +96,7 @@ namespace CalamityMod.NPCs.Signus CalamityGlobalNPC.signus = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; @@ -115,7 +114,7 @@ namespace CalamityMod.NPCs.Signus bool phase3 = lifeRatio < 0.5f; bool phase4 = lifeRatio < 0.33f; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; npc.damage = npc.defDamage; diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index dbf32b5335..3c11ac910e 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -62,12 +62,11 @@ namespace CalamityMod.NPCs.SlimeGod CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); CalamityGlobalNPC.slimeGodPurple = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; Vector2 vector = npc.Center; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 986a4bed7f..ca2769ff48 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -92,12 +92,11 @@ namespace CalamityMod.NPCs.SlimeGod CalamityGlobalNPC.slimeGod = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index 1b5e3ebf01..99186864b1 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -65,12 +65,11 @@ namespace CalamityMod.NPCs.SlimeGod CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); CalamityGlobalNPC.slimeGodRed = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; Vector2 vector = npc.Center; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index b484ab8c6a..e5e6e23492 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -67,12 +67,11 @@ namespace CalamityMod.NPCs.SlimeGod if (CalamityGlobalNPC.slimeGodRed < 0 || !Main.npc[CalamityGlobalNPC.slimeGodRed].active) CalamityGlobalNPC.slimeGodRed = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; Vector2 vector = npc.Center; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 4d4831e2d4..99506c55fc 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -67,12 +67,11 @@ namespace CalamityMod.NPCs.SlimeGod if (CalamityGlobalNPC.slimeGodPurple < 0 || !Main.npc[CalamityGlobalNPC.slimeGodPurple].active) CalamityGlobalNPC.slimeGodPurple = npc.whoAmI; - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; Vector2 vector = npc.Center; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 11f5304f56..4877f88ba6 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -143,12 +143,11 @@ namespace CalamityMod.NPCs.StormWeaver { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool enraged = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; if (invinceTime > 0) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 682880d869..ef92f526e8 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -350,8 +350,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas CalamityMod.StopRain(); - bool enraged = npc.Calamity().enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -541,7 +540,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas uDieLul = MathHelper.Clamp(uDieLul * 0.99f, 1f, 2f); protectionBoost = false; } - npc.Calamity().CurrentlyEnraged = !player.Hitbox.Intersects(safeBox) || enraged; + npc.Calamity().CurrentlyEnraged = !player.Hitbox.Intersects(safeBox); // Set DR to be 99% and unbreakable if enraged. Boost DR during the 5th attack. CalamityGlobalNPC global = npc.Calamity(); diff --git a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs index 7fdbc05e70..3a039ef8af 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs @@ -15,14 +15,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses 2 - No longer spins before charging in final phase 3 - Creepers spread out from each other 4 - Creepers are immune to debuffs*/ - public static bool BuffedBrainofCthulhuAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedBrainofCthulhuAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // whoAmI variable NPC.crimsonBoss = npc.whoAmI; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -36,12 +36,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if ((npc.position.Y / 16f) < Main.worldSurface || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (!Main.player[npc.target].ZoneCrimson || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } @@ -551,7 +551,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedCreeperAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedCreeperAI(NPC npc, Mod mod) { // Despawn if Brain is gone if (NPC.crimsonBoss < 0) @@ -561,7 +561,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index 3929a805ea..5539900a9e 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Master Mode changes // 1 - Use more dangerous attacks more often, // 2 - Cycles between attacks faster - public static bool BuffedCultistAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedCultistAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float lifeRatio = npc.life / (float)npc.lifeMax; // Phases - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.85f; bool phase3 = lifeRatio < 0.7f; @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses idleTime = 30; } - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index 4a283efa0a..7b9142a9f5 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -15,11 +15,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { // Master Mode changes // 1 - Splits like the Eater of Worlds - public static bool BuffedDestroyerAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedDestroyerAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // 10 seconds of resistance to prevent spawn killing @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs index 9fcb1a73f6..f94643714c 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 1 - Cycles between attacks faster, // 2 - Moves faster, // 3 - Bigger tornadoes - public static bool BuffedDukeFishronAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedDukeFishronAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float lifeRatio = npc.life / (float)npc.lifeMax; // Variables - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.7f; bool phase3 = lifeRatio < 0.4f; @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses (player.position.Y < 800f || player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400))); - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage; // If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune if (!phase3AI) diff --git a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs index d4a21c2ab2..5f76bda816 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs @@ -15,11 +15,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses 2 - Each worm is 30 segments long and is immune to debuffs 3 - Worm heads push away from each other 4 - Vile Spits home in on the target slightly and no longer die when hit*/ - public static bool BuffedEaterofWorldsAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedEaterofWorldsAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Causes it to split far more in malice mode @@ -40,12 +40,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if ((npc.position.Y / 16f) < Main.worldSurface || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } if (!Main.player[npc.target].ZoneCorrupt || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs index 2a2a70789a..3503eaac72 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs @@ -16,14 +16,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses 2 - Damaging either eye causes damage to both 3 - Horizontal dashes are far more common 4 - The delay between dashes and horizontal dashes is reduced*/ - public static bool BuffedEyeofCthulhuAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedEyeofCthulhuAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.65f; @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs index 73945ea134..806b539501 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 1 - Allow fists to travel further and faster, // 2 - More projectiles, // 3 - Fists can no longer be broken - public static bool BuffedGolemAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedGolemAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float lifeRatio = npc.life / (float)npc.lifeMax; // Phases - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; @@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (malice) enrage = true; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (enrage || turboEnrage)) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && (enrage || turboEnrage); bool reduceFallSpeed = npc.velocity.Y > 0f && npc.Bottom.Y > Main.player[npc.target].Top.Y; @@ -403,9 +403,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedGolemFistAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedGolemFistAI(NPC npc, Mod mod) { - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Enrage if the target isn't inside the temple @@ -630,10 +630,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } - public static bool BuffedGolemHeadAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedGolemHeadAI(NPC npc, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - // Don't collide npc.noTileCollide = true; @@ -655,7 +653,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Count body parts @@ -872,7 +870,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedGolemHeadFreeAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedGolemHeadFreeAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -894,10 +892,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; float golemLifeRatio = Main.npc[NPC.golemBoss].life / (float)Main.npc[NPC.golemBoss].lifeMax; - float combinedRatio = lifeRatio + golemLifeRatio; // Phases - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.7f || golemLifeRatio < 0.85f; bool phase3 = lifeRatio < 0.55f || golemLifeRatio < 0.7f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs index aec5278a80..ca384b8d43 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs @@ -16,19 +16,17 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses 2 - Spawns a rainbow slime every 5% HP 3 - Teleports ahead of his target 4 - Can use a jump and slam like a Big Mimic*/ - public static bool BuffedKingSlimeAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedKingSlimeAI(NPC npc, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - // Variables float num234 = 1f; bool teleporting = false; bool flag9 = false; npc.aiAction = 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) diff --git a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs index 06feda5861..4f10acb8dd 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/MoonLordAI.cs @@ -13,11 +13,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { // Master Mode changes // 1 - Moon Lord is at maximum aggression at all times - public static bool BuffedMoonLordAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedMoonLordAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; int aggressionLevel = 4; @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses if (malice) aggressionLevel = 5; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; if (npc.type == NPCID.MoonLordCore) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index 18d277f48b..ad7f737569 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -16,11 +16,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 2 - Spawns far more tentacles to protect herself in phase 2 and they resist piercing, // 3 - Spore gas spreads out far more, // 4 - Plantera is larger - public static bool BuffedPlanteraAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedPlanteraAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses acceleration = 0.15f; } - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage; // Detect active tiles around Plantera int radius = 20; // 20 tile radius diff --git a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs index ad95bec4de..9a64737f39 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs @@ -17,29 +17,29 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses 2 - Charges start off slow but accelerate to insane speed after several frames, this delay becomes shorter for the second and third dashes 3 - Fires stingers in a triple spread and they accelerate over time 4 - All attacks inflict Venom*/ - public static bool BuffedQueenBeeAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedQueenBeeAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; float enrageScale = death ? 0.25f : 0f; if ((npc.position.Y / 16f) < Main.worldSurface || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 0.5f; } if (!Main.player[npc.target].ZoneJungle || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 0.5f; } if (enrageScale > 1f) enrageScale = 1f; - if (BossRushEvent.BossRushActive || enraged) + if (BossRushEvent.BossRushActive) enrageScale = 2f; // Percent life remaining diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index d69e0de18a..fdfae64c8f 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -13,13 +13,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Master Mode changes // 1 - Arms are immune to damage and Skeletron no longer has increased defense while the arms are alive, // 2 - Moves far more aggressively - public static bool BuffedSkeletronAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedSkeletronAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; Vector2 vectorCenter = npc.Center; @@ -479,11 +479,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedSkeletronHandAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedSkeletronHandAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs index 22f106f945..d6ae3d97b8 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs @@ -16,13 +16,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 1 - Charges far quicker, // 2 - Arms and head accelerate extremely fast, // 3 - Arms remain closer to the head and resist piercing - public static bool BuffedSkeletronPrimeAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedSkeletronPrimeAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -633,9 +633,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedPrimeLaserAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedPrimeLaserAI(NPC npc, Mod mod) { - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -899,9 +899,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedPrimeCannonAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedPrimeCannonAI(NPC npc, Mod mod) { - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -1188,10 +1188,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedPrimeViceAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedPrimeViceAI(NPC npc, Mod mod) { - bool death = CalamityWorld.death || BossRushEvent.BossRushActive || enraged; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -1524,10 +1524,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedPrimeSawAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedPrimeSawAI(NPC npc, Mod mod) { - bool death = CalamityWorld.death || BossRushEvent.BossRushActive || enraged; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) diff --git a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs index 8b4d3b2b12..532d80734a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs @@ -327,11 +327,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 2 - Spazmatism moves and charges more often and faster, cycles attacks faster, // 3 - Retinazer is slightly smaller and Spazmatism is slightly larger #region Twins AI - public static bool BuffedRetinazerAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedRetinazerAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -345,7 +345,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } @@ -1025,11 +1025,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedSpazmatismAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedSpazmatismAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Get a target @@ -1043,7 +1043,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f; if (Main.dayTime || malice) { - npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; } diff --git a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs index e66bfc7693..3a105a788a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs @@ -15,13 +15,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // 2 - Moves quicker overall, // 3 - Mouth vomits a tight spread of 3 demon scythes at the same time as its leech vomit, // 4 - Eyes become immune to damage and stop firing when the wall drops below 15% health - public static bool BuffedWallofFleshAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedWallofFleshAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice; // Despawn if (npc.position.X < 160f || npc.position.X > ((Main.maxTilesX - 10) * 16)) @@ -409,11 +409,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses return false; } - public static bool BuffedWallofFleshEyeAI(NPC npc, bool enraged, Mod mod) + public static bool BuffedWallofFleshEyeAI(NPC npc, Mod mod) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; // Despawn diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index b63cf76934..750e118fa7 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -153,8 +153,7 @@ namespace CalamityMod.NPCs.Yharon CalamityMod.StopRain(); // Variables - bool enraged2 = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged2; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -339,7 +338,7 @@ namespace CalamityMod.NPCs.Yharon else { enraged = !player.Hitbox.Intersects(safeBox); - npc.Calamity().CurrentlyEnraged = enraged || enraged2; + npc.Calamity().CurrentlyEnraged = enraged; if (enraged) { phaseSwitchTimer = 15; @@ -1605,7 +1604,6 @@ namespace CalamityMod.NPCs.Yharon } // Set DR based on protection boost (aka enrage) - bool chargeTelegraph = npc.ai[0] < 2f && npc.localAI[1] > 0f; bool bulletHell = npc.ai[0] == 5f; calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR;