Ares laser arm in mecha mayhem now only sweeps horizontally and swaps sides each time it fires

Mecha mayhem now requires alternating holding A and D keys instead of just holding A key we're making so much progress guys
This commit is contained in:
CongratsIsTrash authored and Cameron Ewell committed 2025-06-09 18:48:32 -04:00
1 parent f90b4f463a
commit 61ba4b56da
2 files changed
+18 -4

No files matched your search

+3 -2
View File
@@ -505,11 +505,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
}
// Prevent mechs from being respawned
if (otherExoMechWasFirst)
// CIT 08JUN2025: This code is pointless and makes me unable to work swapping the laser arm position. Commenting it out.
/*if (otherExoMechWasFirst)
{
if (NPC.ai[3] < 1f)
NPC.ai[3] = 1f;
}
}*/
// Phases
bool spawnOtherExoMechs = lifeRatio < 0.7f && NPC.ai[3] == 0f;
+15 -2
View File
@@ -184,6 +184,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
bool nerfedAttacks = false;
if (exoTwinsAlive)
nerfedAttacks = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].Calamity().newAI[1] != (float)Apollo.Apollo.SecondaryPhase.PassiveAndImmune;
// Used to make the beam only sweep horizontally during mecha mayhem phase
bool mechaMayhem = nerfedAttacks && exoWormAlive && Main.npc[CalamityGlobalNPC.draedonExoMechWorm].Calamity().newAI[1] != (float)ThanatosHead.SecondaryPhase.PassiveAndImmune;
// Phases
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
@@ -346,7 +348,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
else if (shouldGetBuffedByBerserkPhase)
deathrayPhaseGateValue *= 0.5f;
float deathrayPhaseVelocity = (nerfedAttacks ? 6f : passivePhase ? 9f : 12f) * baseVelocityMult;
float deathrayPhaseVelocity = (nerfedAttacks ? 8f : passivePhase ? 9f : 12f) * baseVelocityMult;
if (lastMechAlive)
deathrayPhaseVelocity *= 1.2f;
else if (shouldGetBuffedByBerserkPhase)
@@ -512,10 +514,21 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
AIState = (float)Phase.Nothing;
calamityGlobalNPC.newAI[2] = 0f;
// Change deathray sweep type for next deathray phase
// Change deathray sweep type for next deathray phase; this does not affect anything during mecha mayhem
calamityGlobalNPC.newAI[3] += 1f;
if (calamityGlobalNPC.newAI[3] > 1f)
calamityGlobalNPC.newAI[3] = 0f;
// If mecha mayhem, make Ares swap the position of the laser and gauss arms, and ensure the beam always sweeps horizontal
if (mechaMayhem)
{
calamityGlobalNPC.newAI[3] = 0f;
if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] == 0f)
Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] = 1f;
else
Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] = 0f;
Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ForceNetUpdate();
}
}
break;