From dfb2ebb3e34d75a0d310d756efc0c03cf635e65b Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 14 Sep 2024 15:04:13 -0500 Subject: [PATCH] Changed to SimpleFlyMovement for fly away. --- NPCs/SlimeGod/EbonianPaladin.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NPCs/SlimeGod/EbonianPaladin.cs b/NPCs/SlimeGod/EbonianPaladin.cs index 5f3bebe3e6..a0a6ddea2b 100644 --- a/NPCs/SlimeGod/EbonianPaladin.cs +++ b/NPCs/SlimeGod/EbonianPaladin.cs @@ -339,18 +339,19 @@ namespace CalamityMod.NPCs.SlimeGod if (NPC.ai[1] == 0f) { Vector2 velocity = (player.Center - NPC.Center).SafeNormalize(new Vector2(NPC.direction, 0f)) * maxChargeVelocity; - NPC.velocity = velocity * chargeVelocityMult; - if (NPC.Distance(player.Center) < minChargeSafeDistance) { // Avoid cheap bullshit NPC.damage = 0; // Move away if too close - NPC.velocity /= chargeVelocityMult * -1f; + NPC.SimpleFlyMovement(velocity * -1f, 0.25f); } else { + // Set initial charge velocity + NPC.velocity = velocity * chargeVelocityMult; + // Set damage NPC.damage = setDamage;