From bf0eabe14f5cf2b5083c72d79beb076f89fd714d Mon Sep 17 00:00:00 2001 From: Big E Date: Sat, 7 Feb 2026 19:45:31 -0500 Subject: [PATCH] + Changed Texture Pack drawing for BoC's illusions and gave the Chase attack a fixed number of chases --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 7 ++-- .../Bosses/BrainOfCthulhu/FalseBrain.cs | 33 ++----------------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index 36fcc3398c..3e1a0fbf69 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -141,7 +141,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride #region Idle Period internal static int ChaseTime => 160; - internal static int MaxChases => 3; + internal static int ChaseAmount => 2; internal static int IdleTeleportDuration => CalamityWorld.death ? 36 : 44; internal static float ChaseMinSpeed => 3; internal static float ChaseMaxSpeed => CalamityWorld.death ? 18 : 15; @@ -1645,9 +1645,6 @@ public class BrainOfCthulhuAI : VanillaAIOverride private void Phase2Idle() { - //goes from 3 at full health to 1 at low health - int chases = (int)Math.Ceiling(MaxChases * (NPC.life / (float)NPC.lifeMax)); - NPC.rotation = NPC.velocity.X / 6f * MathHelper.Pi / 8f; if (Time == ChaseTime - 5) @@ -1721,7 +1718,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride AttackFlag = false; #region Attack Selection - if (AttackCounter >= chases) //Pick attack + if (AttackCounter >= ChaseAmount) //Pick attack { NPC.rotation = 0; ResetAttackValues(); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs index 2e454be5c8..765709b0d4 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs @@ -48,10 +48,7 @@ public class FalseBrain : ModNPC, ILocalizedModType NPC.localAI[0] = Main.rand.Next(6); - if(BrainOfCthulhuSystem.IsBrainOfCthulhuTextureVanilla) - NPC.localAI[1] = 1 + Main.rand.NextFloat(-0.25f, 0.25f); - else - NPC.localAI[1] = 1 + (Main.rand.NextFloat(0.25f, 0.75f) * (Main.rand.NextBool() ? -1 : 1)); + NPC.localAI[1] = 1 + Main.rand.NextFloat(-0.25f, 0.25f); } private int Variant => (int)NPC.localAI[0]; private float Angle => NPC.ai[0]; @@ -182,33 +179,7 @@ public class FalseBrain : ModNPC, ILocalizedModType else { tex = TextureAssets.Npc[NPCID.BrainofCthulhu].Value; - frame = tex.Frame(1, 8, 0, 4 + (int)NPC.frameCounter); - - switch(Variant) - { - case 0: - scaleAddition = new(-0.125f, 0.25f); - break; - case 1: - scaleAddition = new(0.25f, -0.125f); - break; - case 2: - drawColor = Color.Lerp(drawColor, Color.Red.MultiplyRGB(drawColor), 0.5f); - break; - case 3: - drawColor = Color.Lerp(drawColor, Color.Orange.MultiplyRGB(drawColor), 0.5f); - break; - case 4: - drawColor = Color.Lerp(drawColor, Color.Yellow.MultiplyRGB(drawColor), 0.5f); - break; - case 5: - scaleAddition = new(0.1625f, 0.1625f); - break; - case 6: - scaleAddition = new(-0.1625f, -0.1625f); - break; - - } + frame = tex.Frame(1, 8, 0, (int)NPC.frameCounter); } if (SpawnTime > 0)