diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 2e4b7548e9..6886e5480d 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -411,9 +411,12 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo int numRockets = lastMechAlive ? 4 : nerfedAttacks ? 2 : 3; // Default vector to fly to - float chargeComboXOffset = -500f; + bool flyRight = npc.ai[0] % 2f == 0f || npc.ai[0] < 10f || !revenge; + float destinationX = flyRight ? 750f : -750f; + float destinationY = player.Center.Y; + float chargeComboXOffset = flyRight ? -500f : 500f; float chargeComboYOffset = npc.ai[2] == 0f ? 400f : -400f; - Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + 1200f, player.Center.Y) : AIState == (float)Phase.LineUpChargeCombo ? new Vector2(player.Center.X + 750f, player.Center.Y + chargeComboYOffset) : new Vector2(player.Center.X + 750f, player.Center.Y); + Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : AIState == (float)Phase.LineUpChargeCombo ? new Vector2(player.Center.X + destinationX, destinationY + chargeComboYOffset) : new Vector2(player.Center.X + destinationX, destinationY); // If Apollo can fire projectiles, cannot fire if too close to the target bool canFire = Vector2.Distance(npc.Center, player.Center) > 320f; @@ -553,6 +556,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (spawnOtherExoMechs) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; npc.ai[3] = 1f; SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; npc.localAI[0] = 0f; @@ -605,6 +611,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (otherMechIsBerserk) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; npc.localAI[0] = 0f; npc.localAI[1] = 0f; @@ -637,6 +646,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo if (otherMechIsBerserk) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; npc.localAI[0] = 0f; npc.localAI[1] = 0f; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index e9610457d4..293f0967a6 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -512,7 +512,10 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis } // Default vector to fly to - Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X - 1200f, player.Center.Y) : AIState == (float)Phase.Deathray ? new Vector2(player.Center.X, player.Center.Y - spinRadius) : new Vector2(player.Center.X - 750f, player.Center.Y); + bool flyLeft = npc.ai[0] % 2f == 0f || npc.ai[0] < 10f || !revenge; + float destinationX = flyLeft ? -750f : 750f; + float destinationY = player.Center.Y; + Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : AIState == (float)Phase.Deathray ? new Vector2(player.Center.X, destinationY - spinRadius) : new Vector2(player.Center.X + destinationX, destinationY); // Add a bit of randomness to the destination, but only in specific phases where it's necessary if (AIState == (float)Phase.Normal || AIState == (float)Phase.LaserShotgun || AIState == (float)Phase.PhaseTransition) @@ -563,6 +566,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (spawnOtherExoMechs) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 1f; @@ -605,6 +611,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (otherMechIsBerserk) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -632,6 +641,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis if (otherMechIsBerserk) { // Reset everything + if (npc.ai[0] < 10f) + npc.ai[0] = 10f; + npc.ai[0] += 1f; SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; npc.ai[1] = 0f; npc.ai[2] = 0f; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 8300ed03d3..09f7887588 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { // Normal laser - if (berserk) + if (berserk && npc.ai[0] % 3f == 0f) Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Predictive laser diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index b74805f881..2868cceb2c 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { // Normal laser - if (berserk) + if (berserk && npc.ai[0] % 3f == 0f) Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Predictive laser diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 106ec95511..9cc4ad27ee 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -452,7 +452,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Laser Barrage variables float laserBarrageLocationBaseDistance = SecondaryAIState == (int)SecondaryPhase.PassiveAndImmune ? baseDistance * 2f : baseDistance; - Vector2 laserBarrageLocation = new Vector2(0f, laserBarrageLocationBaseDistance); + Vector2 laserBarrageLocation = new Vector2(0f, npc.ai[1] % 2f == 0f ? laserBarrageLocationBaseDistance : -laserBarrageLocationBaseDistance); float laserBarrageLocationDistance = turnDistance * 3f; // Velocity and turn speed values @@ -737,6 +737,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime) { + npc.ai[1] += (berserk && revenge) ? 1f : 0f; npc.localAI[0] = berserk ? 1f : 0f; AIState = (float)Phase.Charge; calamityGlobalNPC.newAI[2] = 0f; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 1e37e0bb93..62995b60ac 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { // Normal laser - if (berserk) + if (berserk && npc.ai[0] % 3f == 0f) Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Predictive laser diff --git a/Projectiles/Boss/ApolloRocket.cs b/Projectiles/Boss/ApolloRocket.cs index d74e3b8e6e..d810251e86 100644 --- a/Projectiles/Boss/ApolloRocket.cs +++ b/Projectiles/Boss/ApolloRocket.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Boss // Set AI to stop homing, start accelerating float stopHomingDistance = malice ? 120f : death ? 160f : revenge ? 180f : expertMode ? 200f : 240f; - if (distanceFromTarget.Length() < stopHomingDistance || projectile.ai[0] == 1f) + if (distanceFromTarget.Length() < stopHomingDistance || projectile.ai[0] == 1f || projectile.timeLeft < 480) { projectile.ai[0] = 1f; diff --git a/build.txt b/build.txt index 6c8216d4c6..ec54e314f6 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 1.5.0.001 +version = 1.5.0.000 displayName = Calamity Mod (No Calamity Music) homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes