Tweaked SHPC Soul of Sight homing

This commit is contained in:
CongratsIsTrash committed 2025-04-27 01:04:05 -04:00
1 parent f6d1b3fc5a
commit 4445e1e850
2 files changed
+5 -8

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic
public const float NightExplosionTimeMult = 2.5f;
public const int FlightDirectHitFlightBoost = 25; // The amount of flight time restored on direct hits with Flight bombs, in frames
public const float MightKnockbackStrength = 20f; // The value to multiply the unit vector by when applying velocity to enemies launched by Might bombs
public const float SightHomingRange = 288f; // Range of homing for Sight bombs, in pixels
public const float SightHomingRange = 320f; // Range of homing for Sight bombs, in pixels
public const int FrightFlatDamage = 20;
public override Color? TooltipExtensionColor => new Color(31, 251, 255);
+4 -7
View File
@@ -140,14 +140,11 @@ namespace CalamityMod.Projectiles.Magic
}
if (index != -1)
{
float speed = Projectile.velocity.Length();
Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.SafeDirectionTo(Main.npc[index].Center).ToRotation(), 0.1f).ToRotationVector2() * speed;
}
else // Slow down over time if not homing
Projectile.velocity *= 0.9875f;
Projectile.velocity = (Projectile.velocity * 18f + Utils.DirectionTo(Projectile.Center, Main.npc[index].Center) * 20f) / 19f;
else
Projectile.velocity *= 0.9875f; // Slow down over time if not homing
}
else if (!(GetSoulEffects((int)Projectile.ai[0]) == SoulType.Flight))// Always slow down if not Flight
else if (!(GetSoulEffects((int)Projectile.ai[0]) == SoulType.Flight)) // Always slow down if not Flight
Projectile.velocity *= 0.9875f;
float explodeRange = 250f;