nvm, now brain is done

This commit is contained in:
mountaindrew10 committed 2024-01-17 19:19:00 -06:00
1 parent b90ce57b63
commit 5b929092ee
1 file changed
+9 -9
@@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
}
// Charge variables
float chargeVelocity = (death ? 18f : 15f) + 3f * enrageScale;
float chargeVelocity = (death ? 20f : 15f) + 3f * enrageScale;
if (phase7)
chargeVelocity *= 1.2f;
@@ -192,7 +192,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float targetXDist = Main.player[npc.target].Center.X - brainCenter.X;
float targetYDist = Main.player[npc.target].Center.Y - brainCenter.Y;
float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist);
float velocityScale = death ? 6f : 4.5f;
float velocityScale = death ? 9f : 4.5f;
float velocityBoost = velocityScale * (1f - lifeRatio);
float nonChargeSpeed = 18f + velocityBoost + 3f * enrageScale;
if (Main.getGoodWorld)
@@ -202,8 +202,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
targetXDist *= targetDistance;
targetYDist *= targetDistance;
float minInertia = death ? 60f : 75f;
float maxInertia = death ? 80f : 100f;
float minInertia = death ? 50f : 75f;
float maxInertia = death ? 75f : 100f;
float inertia = MathHelper.Lerp(minInertia, maxInertia, lifeRatio);
npc.velocity.X = (npc.velocity.X * inertia + targetXDist) / (inertia + 1f);
npc.velocity.Y = (npc.velocity.Y * inertia + targetYDist) / (inertia + 1f);
@@ -638,7 +638,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float targetXDistPhase1 = Main.player[npc.target].Center.X - brainCenterPhase1.X;
float targetYDistPhase1 = Main.player[npc.target].Center.Y - brainCenterPhase1.Y;
float targetDistancePhase1 = (float)Math.Sqrt(targetXDistPhase1 * targetXDistPhase1 + targetYDistPhase1 * targetYDistPhase1);
float maxMoveVelocity = (death ? 1.5f : 1f) + velocityScale;
float maxMoveVelocity = (death ? 2f : 1f) + velocityScale;
if (Main.getGoodWorld)
maxMoveVelocity *= 2f;
@@ -661,7 +661,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
if (Main.netMode != NetmodeID.MultiplayerClient)
{
if (!despawn)
npc.localAI[1] += (death ? 1.5f : 1f) + velocityScale;
npc.localAI[1] += (death ? 2f : 1f) + velocityScale;
if (npc.localAI[1] >= 360f)
{
@@ -792,7 +792,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Scale the aggressiveness of the charges with amount of Creepers remaining
float chargeAggressionScale = creeperRatio <= 0.1f ? 5f : creeperRatio <= 0.2f ? 3f : creeperRatio <= 0.4f ? 2f : creeperRatio <= 0.6f ? 1f : creeperRatio <= 0.8f ? 0.5f : 0f;
if (death)
chargeAggressionScale *= 1.5f;
chargeAggressionScale *= 1.25f;
// Give off blood dust before charging
float beginTelegraphGateValue = TimeBeforeCreeperAttack - CreeperTelegraphTime;
@@ -823,7 +823,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float brainXDist = Main.npc[NPC.crimsonBoss].Center.X - creeperCenter.X;
float brainYDist = Main.npc[NPC.crimsonBoss].Center.Y - creeperCenter.Y;
float brainDistance = (float)Math.Sqrt(brainXDist * brainXDist + brainYDist * brainYDist);
float velocity = (death ? 10f : 8f) + chargeAggressionScale;
float velocity = (death ? 12f : 8f) + chargeAggressionScale;
velocity += 2f * enrageScale;
// Max distance from Brain
@@ -873,7 +873,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Set damage
npc.damage = npc.defDamage;
float chargeVelocity = (death ? 7.5f : 6f) + chargeAggressionScale;
float chargeVelocity = (death ? 9f : 6f) + chargeAggressionScale;
chargeVelocity += 2f * enrageScale;
Vector2 targetDirection = Main.player[npc.target].Center - npc.Center;
targetDirection = targetDirection.SafeNormalize(Vector2.UnitY);