1 - Ares Laser Cannon makes a charge up noise when it's about to fire its laser.

2 - Ares plasma bolts split less when he's in deathray phase and he's not the last mech alive.
3 - Ares tesla orbs are more predictive if he's the last mech alive.
4 - Ares tesla orbs do not arc if they are more than 100 tiles away from each other.
This commit is contained in:
Andrew Marheine committed 2021-10-04 03:10:36 -05:00
1 parent c4bff3cccd
commit 23344c4f09
6 files changed
+30 -14

No files matched your search

-2
View File
@@ -9,8 +9,6 @@ using CalamityMod.Items.TreasureBags;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.NPCs.ExoMechs.Apollo;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.NPCs.ExoMechs.Thanatos;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Skies;
+4
View File
@@ -320,6 +320,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
calamityGlobalNPC.newAI[2] += 1f;
if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration)
{
// Play a charge up sound so that the player knows when it's about to fire the deathray
if (calamityGlobalNPC.newAI[2] == deathrayTelegraphDuration - 100f)
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/CrystylCharge"), npc.Center);
// Inverse lerp returns the percentage of progress between A and B
float lerpValue2 = Utils.InverseLerp(movementDistanceGateValue, 2400f, distanceFromDestination.Length(), true);
+7 -1
View File
@@ -267,7 +267,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
float movementDistanceGateValue = 50f;
// Gate values
// Make plasma bolts split less if in deathray spiral phase and not the last mech alive, but fire more if in deathray spiral phase
bool fireMoreBolts = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays;
bool boltsSplitLess = fireMoreBolts && !lastMechAlive;
float plasmaBoltPhaseGateValue = fireMoreBolts ? 120f : 270f;
if (lastMechAlive)
plasmaBoltPhaseGateValue *= 0.7f;
@@ -332,7 +334,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
int type = ModContent.ProjectileType<AresPlasmaFireball>();
int damage = npc.GetProjectileDamage(type);
Vector2 offset = Vector2.Normalize(plasmaBoltVelocity) * 40f + Vector2.UnitY * 16f;
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
if (boltsSplitLess)
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -2f);
else
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
}
}
}
+2
View File
@@ -184,6 +184,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
predictionAmt *= 0.5f;
if (passivePhase)
predictionAmt *= 0.5f;
if (lastMechAlive)
predictionAmt *= 1.5f;
Vector2 predictionVector = player.velocity * predictionAmt;
Vector2 rotationVector = player.Center + predictionVector - npc.Center;
+14 -11
View File
@@ -48,16 +48,19 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
if (projectile.ai[0] != -1f)
if (projectile.ai[0] != -2f)
{
Vector2 targetLocation = new Vector2(projectile.ai[0], projectile.ai[1]);
if (Vector2.Distance(targetLocation, projectile.Center) < 80f)
projectile.tileCollide = true;
}
else
{
if (projectile.timeLeft < timeLeft / 2)
projectile.Kill();
if (projectile.ai[0] != -1f)
{
Vector2 targetLocation = new Vector2(projectile.ai[0], projectile.ai[1]);
if (Vector2.Distance(targetLocation, projectile.Center) < 80f)
projectile.tileCollide = true;
}
else
{
if (projectile.timeLeft < timeLeft / 2)
projectile.Kill();
}
}
int fadeInTime = 3;
@@ -166,8 +169,8 @@ namespace CalamityMod.Projectiles.Boss
// Plasma bolts
int totalProjectiles = CalamityWorld.malice ? 12 : 8;
// Reduce the total amount of projectiles by half if Apollo is shooting them
if (projectile.ai[0] == -1f)
// Reduce the total amount of projectiles by half if Apollo is shooting them or Ares Plasma Arm is shooting them and in deathray phase and not the last mech
if (projectile.ai[0] == -1f || projectile.ai[0] == -2f)
totalProjectiles /= 2;
float radians = MathHelper.TwoPi / totalProjectiles;
+3
View File
@@ -150,6 +150,9 @@ namespace CalamityMod.Projectiles.Boss
if (Main.projectile[i].type != projectile.type || Main.projectile[i].ai[0] != Identity + 1f || !Main.projectile[i].active || Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Calamity().newAI[0] == (float)AresBody.Phase.Deathrays)
continue;
if (Vector2.Distance(projectile.Center, Main.projectile[i].Center) > 1600f)
continue;
return Main.projectile[i];
}
return null;