Master Rev+ predictive EoW and BoC.

This commit is contained in:
mountaindrew10 committed 2024-04-01 14:03:20 -05:00
1 parent 2b531e721e
commit f2b2171fde
2 files changed
+12 -9

No files matched your search

@@ -198,8 +198,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
if (!despawn)
{
Vector2 brainCenter = npc.Center;
float targetXDist = Main.player[npc.target].Center.X - brainCenter.X;
float targetYDist = Main.player[npc.target].Center.Y - brainCenter.Y;
Vector2 destination = Main.player[npc.target].Center + (masterMode ? Main.player[npc.target].velocity * 20f : Vector2.Zero);
float targetXDist = destination.X - brainCenter.X;
float targetYDist = destination.Y - brainCenter.Y;
float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist);
float velocityScale = death ? 6f : 4.5f;
float velocityBoost = velocityScale * (1f - lifeRatio);
@@ -265,7 +266,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
SoundEngine.PlaySound(SoundID.ForceRoarPitched, npc.Center);
// Velocity
npc.velocity = (Main.player[npc.target].Center + (bossRush ? Main.player[npc.target].velocity * 20f : Vector2.Zero) - npc.Center).SafeNormalize(Vector2.UnitY) * chargeVelocity;
npc.velocity = (Main.player[npc.target].Center + (masterMode ? Main.player[npc.target].velocity * 20f : Vector2.Zero) - npc.Center).SafeNormalize(Vector2.UnitY) * chargeVelocity;
if (Main.getGoodWorld)
npc.velocity *= 1.15f;
}
@@ -925,7 +926,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
float chargeVelocity = (death ? (masterMode ? 12f : 9f) : (masterMode ? 9f : 6f)) + chargeAggressionScale;
chargeVelocity += 2f * enrageScale;
Vector2 targetDirection = Main.player[npc.target].Center - npc.Center;
Vector2 destination = Main.player[npc.target].Center + (masterMode ? Main.player[npc.target].velocity * 20f : Vector2.Zero);
Vector2 targetDirection = destination - npc.Center;
targetDirection = targetDirection.SafeNormalize(Vector2.UnitY);
if (Main.getGoodWorld)
{
@@ -324,7 +324,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
noFlyZone -= (int)(enrageScale * 200f);
if (masterMode)
noFlyZone -= 200;
noFlyZone -= phase5 ? 400 : 200;
if (noFlyZone < 100)
noFlyZone = 100;
@@ -357,8 +357,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
if (phase6)
{
segmentVelocity += 8f * (enrageScale + 1f);
segmentAcceleration += 0.4f * (enrageScale + 1f);
segmentVelocity += 6f * (enrageScale + 1f);
segmentAcceleration += 0.3f * (enrageScale + 1f);
}
else if (phase5)
{
@@ -389,8 +389,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
}
Vector2 segmentDirection = npc.Center;
float targetPosX = Main.player[npc.target].Center.X;
float targetPosY = Main.player[npc.target].Center.Y;
Vector2 destination = Main.player[npc.target].Center + (phase6 ? Main.player[npc.target].velocity * 20f : Vector2.Zero);
float targetPosX = destination.X;
float targetPosY = destination.Y;
targetPosX = (int)(targetPosX / 16f) * 16;
targetPosY = (int)(targetPosY / 16f) * 16;