From 6a17ac09b03597149eff4c10f2c1eb1509bf2f28 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 15 Nov 2021 16:34:45 -0600 Subject: [PATCH] 1 - Fix for the previous commit. --- NPCs/ExoMechs/Apollo/Apollo.cs | 2 +- NPCs/ExoMechs/Ares/AresBody.cs | 2 +- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 2 +- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 2 +- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 2 +- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 2 +- NPCs/ExoMechs/Artemis/Artemis.cs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 74f11d774b..96670beeff 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -471,7 +471,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (velocityBoostMult > 0f) velocityBoostMult -= 0.004f; } - baseVelocity += 20f * velocityBoostMult; + baseVelocity *= 1f + velocityBoostMult; // If Apollo can fire projectiles, cannot fire if too close to the target bool canFire = Vector2.Distance(npc.Center, player.Center) > 320f; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index fc1358b27f..a8a4ff7ee8 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -449,7 +449,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (VelocityBoostMult > 0f) VelocityBoostMult -= 0.004f; } - baseVelocity += 20f * VelocityBoostMult; + baseVelocity *= 1f + VelocityBoostMult; // Distance from target float distanceFromTarget = Vector2.Distance(npc.Center, player.Center); diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index 1620658187..0ca20edd8a 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Velocity and acceleration values float baseVelocityMult = (berserk ? 0.25f : 0f) + (malice ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f); float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult; - baseVelocity += 20f * Main.npc[(int)npc.ai[2]].localAI[2]; + baseVelocity *= 1f + Main.npc[(int)npc.ai[2]].localAI[2]; Vector2 distanceFromDestination = destination - npc.Center; diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 18a20cc78e..e58b872828 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -284,7 +284,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Velocity and acceleration values float baseVelocityMult = (berserk ? 0.25f : 0f) + (malice ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f); float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult; - baseVelocity += 20f * Main.npc[(int)npc.ai[2]].localAI[2]; + baseVelocity *= 1f + Main.npc[(int)npc.ai[2]].localAI[2]; float baseAcceleration = berserk ? 1.25f : 1f; Vector2 distanceFromDestination = destination - npc.Center; diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 003147e921..0a863329d0 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Velocity and acceleration values float baseVelocityMult = (berserk ? 0.25f : 0f) + (malice ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f); float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult; - baseVelocity += 20f * Main.npc[(int)npc.ai[2]].localAI[2]; + baseVelocity *= 1f + Main.npc[(int)npc.ai[2]].localAI[2]; Vector2 distanceFromDestination = destination - npc.Center; diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 92c415aa45..0ff7a33137 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -293,7 +293,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Velocity and acceleration values float baseVelocityMult = (berserk ? 0.25f : 0f) + (malice ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f); float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult; - baseVelocity += 20f * Main.npc[(int)npc.ai[2]].localAI[2]; + baseVelocity *= 1f + Main.npc[(int)npc.ai[2]].localAI[2]; Vector2 distanceFromDestination = destination - npc.Center; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 5ef01138f6..5a4a11be41 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -506,7 +506,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (velocityBoostMult > 0f) velocityBoostMult -= 0.004f; } - baseVelocity += 20f * velocityBoostMult; + baseVelocity *= 1f + velocityBoostMult; // Rotation Vector2 predictionVector = AIState == (float)Phase.Deathray ? Vector2.Zero : player.velocity * predictionAmt;