From 9bec545dd5beaacc27714da0bdbc4201844bfaa4 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 9 Aug 2021 16:40:32 -0500 Subject: [PATCH] Fixed SCal shield stuff --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 6650bba206..a3b71c126d 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -406,8 +406,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas hitboxSize = Vector2.Max(hitboxSize, new Vector2(42, 44)); if (npc.Size != hitboxSize) npc.Size = hitboxSize; + bool shouldNotUseShield = bulletHellCounter2 % 900 != 0 || attackCastDelay > 0 || + NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()) || + npc.ai[0] == 1f || npc.ai[0] == 2f; - // Make the shield and forcefield fade away in her acceptance phase. + // Make the shield and forcefield fade away in SCal's acceptance phase. if (npc.life <= npc.lifeMax * 0.01) { shieldOpacity = MathHelper.Lerp(shieldOpacity, 0f, 0.08f); @@ -415,7 +418,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas } // Summon a shield if the next attack will be a charge. - else if (((willCharge && AttackCloseToBeingOver) || npc.ai[1] == 2f) && bulletHellCounter2 % 900 == 0) + // Make it go away if certain triggers happen during this, such as a bullet hell starting, however. + else if (((willCharge && AttackCloseToBeingOver) || npc.ai[1] == 2f) && !shouldNotUseShield) { if (npc.ai[1] != 2f) { @@ -1189,7 +1193,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas halfLife = true; } - // TODO: Resprite the seekers to be something other than eyeballs. if (npc.life <= npc.lifeMax * 0.2) { if (!secondStage) @@ -1838,7 +1841,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas #endregion #region Transition - // TODO: Add a special flame that encases SCal during the transition phase instead of just dust. else if (npc.ai[0] == 1f || npc.ai[0] == 2f) { npc.dontTakeDamage = true;