From db20339488fac79be8612ec149fb03bbe3236823 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Thu, 9 Feb 2023 23:48:43 -0600 Subject: [PATCH] gourdian fix --- NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index f8dcbb34f9..fd3ee02d5a 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -375,12 +375,12 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.localAI[3] = 0f; // Go low just before moving to the other side to avoid bullshit hits - bool goLow = (NPC.localAI[3] > moveToOtherSideInPhase1GateValue - goLowDuration && NPC.localAI[3] <= moveToOtherSideInPhase1GateValue + goLowDuration) || - NPC.localAI[3] > timeBeforeMoveToOtherSideInPhase1Reset - goLowDuration || NPC.localAI[3] < 0f; + bool goLow = (NPC.localAI[3] > (moveToOtherSideInPhase1GateValue - goLowDuration) && NPC.localAI[3] <= (moveToOtherSideInPhase1GateValue + goLowDuration * 0.5f)) || + NPC.localAI[3] > (timeBeforeMoveToOtherSideInPhase1Reset - goLowDuration) || NPC.localAI[3] <= (-goLowDuration * 0.5f); // Set side to stay on while not going low if (!goLow) - calamityGlobalNPC.newAI[0] = NPC.direction; + calamityGlobalNPC.newAI[0] = -NPC.direction; // Swap sides while going low if (NPC.localAI[3] == (moveToOtherSideInPhase1GateValue - goLowDuration * 0.5f) || NPC.localAI[3] == (timeBeforeMoveToOtherSideInPhase1Reset - goLowDuration * 0.5f)) @@ -404,8 +404,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians } if (goLow) { - inertia *= 0.75f; - velocity *= 1.25f; + inertia *= 0.66f; + velocity *= 1.33f; } Vector2 destination = player.Center + Vector2.UnitX * distanceToStayAwayFromTarget * calamityGlobalNPC.newAI[0];