From d6bd9c6053c3d4387bd1a05da4eaa42602ee71a2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 26 Oct 2025 21:20:04 -0400 Subject: [PATCH] Several boss fixes: - Hive Mind and Perforators only appear on Boss Checklist in worlds of their respective evil - Fixed Primordial Wyrm not being marked as defeated - Fixed SCal being able to fire projectiles in the one frame between bros dying and phase transition --- ModSupport/WeakReferenceSupport.cs | 4 ++++ NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 7 +++++++ NPCs/SupremeCalamitas/SupremeCalamitas.cs | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index fbf4dbf23b..16a7083033 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -419,9 +419,11 @@ namespace CalamityMod string entryName = "HiveMind"; BossChecklistProgressionValues.TryGetValue(entryName, out float order); int type = NPCType(); + Func IsCorruption = () => !WorldGen.crimson || Main.drunkWorld; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; AddBoss(bossChecklist, calamity, entryName, order, DownedHiveMind, type, new Dictionary() { + ["availability"] = IsCorruption, ["spawnInfo"] = GetSpawnInfo(entryName), ["despawnMessage"] = GetDespawnMessage(entryName), ["spawnItems"] = ItemType(), @@ -435,9 +437,11 @@ namespace CalamityMod string entryName = "Perforators"; BossChecklistProgressionValues.TryGetValue(entryName, out float order); int type = NPCType(); + Func IsCrimson = () => WorldGen.crimson || Main.drunkWorld; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; AddBoss(bossChecklist, calamity, entryName, order, DownedPerforators, type, new Dictionary() { + ["availability"] = IsCrimson, ["displayName"] = GetDisplayName(entryName), ["spawnInfo"] = GetSpawnInfo(entryName), ["despawnMessage"] = GetDespawnMessage(entryName), diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 71119e2239..93ff213d5f 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -1452,6 +1452,13 @@ namespace CalamityMod.NPCs.PrimordialWyrm potionType = ModContent.ItemType(); } + public override void OnKill() + { + // Mark Primordial Wyrm as dead + DownedBossSystem.downedPrimordialWyrm = true; + CalamityNetcode.SyncWorld(); + } + public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ModContent.ItemType()); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index fbddbe5da9..28b63083da 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2063,6 +2063,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.dontTakeDamage = true; NPC.chaseable = false; NPC.damage = 0; + attackPause = 5; if (!canDespawn) NPC.velocity *= 0.95f; @@ -2525,7 +2526,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas Vector2 projectileSpawn = NPC.Center + projectileVelocity * 8f; projectileVelocity *= 5f * uDieLul; int projectileType = gigablast; - Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, gigablastDamage, 0f, Main.myPlayer, 0f, 2f); + if (attackPause == 0) + Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, gigablastDamage, 0f, Main.myPlayer, 0f, 2f); } } @@ -2539,7 +2541,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - // Previously the 0.4% health threshold transition + // Previously the 40% health threshold transition if (lifeRatio <= 0.45f && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) == false) { NPC.ai[0] = 1f;