From 6b9ec7ebf00f58f81f8db0e203bd379fbff8b3be Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 15 Dec 2025 10:59:47 -0500 Subject: [PATCH] Anahita projectile behavior ends after exactly two attack cycles This prevents desyncing from telegraphs getting interrupted by bubbles/charges --- NPCs/Leviathan/Anahita.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index abfd453e40..c07457543b 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -446,6 +446,9 @@ namespace CalamityMod.NPCs.Leviathan NPC.rotation = NPC.velocity.X * 0.02f; NPC.spriteDirection = NPC.direction; + // Remove projectile telegraph + DrawProjectileTelegraphTimer = 0; + Vector2 anahitaPos = NPC.Center; float playerXDist = player.position.X + (player.width / 2) - anahitaPos.X; float playerYDist = player.position.Y + (player.height / 2) - 200f * NPC.scale - anahitaPos.Y; @@ -788,12 +791,8 @@ namespace CalamityMod.NPCs.Leviathan NPC.spriteDirection = NPC.direction; } - float phaseTimer = 300f; - phaseTimer -= 50f * enrageScale; - if (!leviAlive || phase4) - phaseTimer -= 150f * (1f - lifeRatio); - - if (NPC.ai[1] >= phaseTimer) + // End behavior after attacking twice + if (NPC.ai[1] > attackDivisor * 2) { NPC.ai[0] = -1f; NPC.ai[1] = 2f;