diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 9662f29895..f092a33484 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7214,8 +7214,7 @@ namespace CalamityMod.CalPlayer if (CalamityWorld.revenge) { customDamage = true; - double defenseMult = Main.hardMode ? 0.75 : 0.5; - double newDamage = (double)damage - ((double)player.statDefense * defenseMult); + double newDamage = (double)damage - ((double)player.statDefense * 0.75); double newDamageLimit = 5.0 + (Main.hardMode ? 5.0 : 0.0) + (NPC.downedPlantBoss ? 5.0 : 0.0) + (NPC.downedMoonlord ? 5.0 : 0.0); //5, 10, 15, 20 if (newDamage < newDamageLimit) { diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index d3bde7fc7f..f83c2102da 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -30,7 +30,6 @@ namespace CalamityMod.Items.DifficultyItems "Increases Nurse healing price.\n" + "Allows certain enemies to inflict the Horror and Marked debuffs.\n" + "Before you have killed your first boss you take 20% less damage from everything.\n" + - "Changes the Expert Mode 75% defense back to the Normal Mode 50% defense for the duration of prehardmode.\n" + "Changes ALL boss AIs and some enemy AIs in vanilla and the Calamity Mod.\n" + "DO NOT USE IF A BOSS IS ALIVE!\n" + "Can be toggled on and off."); diff --git a/NPCs/AbyssNPCs/AquaticScourgeBody.cs b/NPCs/AbyssNPCs/AquaticScourgeBody.cs index 422d50f4dc..2401a0fdcd 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeBody.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeBody.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000); + npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs b/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs index 3222e0bd66..9e5f082a1a 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000); + npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AbyssNPCs/AquaticScourgeHead.cs b/NPCs/AbyssNPCs/AquaticScourgeHead.cs index f288b2107f..8a65c391d9 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeHead.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeHead.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.Calamity().RevPlusDR(0.1f); npc.aiStyle = -1; aiType = -1; - npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000); + npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AbyssNPCs/AquaticScourgeTail.cs b/NPCs/AbyssNPCs/AquaticScourgeTail.cs index 54931bbfd5..a7ef71a827 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeTail.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeTail.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AbyssNPCs aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000); + npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index ae6d883988..a19b8a73a9 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -109,7 +109,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.alpha = 0; } } - if (Main.netMode != NetmodeID.MultiplayerClient) + /*if (Main.netMode != NetmodeID.MultiplayerClient) { int shootTime = 4; if ((double)npc.life <= (double)npc.lifeMax * 0.3 || CalamityWorld.bossRushActive) @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.netUpdate = true; } } - } + }*/ } public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 656c1e9485..b03b529083 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -16,8 +16,8 @@ namespace CalamityMod.NPCs.AstrumDeus private const int maxLength = 5; private int addOrbiter = 0; private int addOrbiter2 = 0; - private float speed = 0.15f; - private float turnSpeed = 0.1f; + private float speed = 0.12f; + private float turnSpeed = 0.08f; private bool tailSpawned = false; private bool secondStage = false; private bool thirdStage = false; @@ -179,15 +179,17 @@ namespace CalamityMod.NPCs.AstrumDeus npc.TargetClosest(true); } npc.velocity.Length(); - float speedMult = expertMode ? 1.8f : 1.6f; + float speedAdd = expertMode ? 0.06f : 0.045f; + float turnSpeedAdd = expertMode ? 0.04f : 0.03f; if (CalamityWorld.death || CalamityWorld.bossRushActive) { - speedMult = (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 3f : 2.5f; + speedAdd *= 1.25f; + turnSpeedAdd *= 1.25f; } float life = (float)npc.life; float totalLife = (float)npc.lifeMax; - float newSpeed = speed * (speedMult - (life / totalLife)); - float newTurnSpeed = turnSpeed * (speedMult - (life / totalLife)); + float newSpeed = speed + speedAdd * (1f - (life / totalLife)); + float newTurnSpeed = turnSpeed + turnSpeedAdd * (1f - (life / totalLife)); if (npc.alpha != 0) { for (int num934 = 0; num934 < 2; num934++) diff --git a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs index 26e72af5a9..72fc47db9a 100644 --- a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs +++ b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs @@ -99,8 +99,10 @@ namespace CalamityMod.NPCs.BrimstoneWaifu bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive; bool calamity = modPlayer.ZoneCalamity; - // Percent life remaining - float lifeRatio = (float)npc.life / (float)npc.lifeMax; + npc.defense = npc.defDefense; + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); Vector2 vectorCenter = npc.Center; @@ -156,7 +158,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu if (npc.ai[0] == 0f) { - npc.defense = provy ? 120 : 20; npc.chaseable = true; if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -202,7 +203,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } else if (npc.ai[0] == 1f) { - npc.defense = provy ? 120 : 20; npc.chaseable = true; Vector2 position = new Vector2(npc.ai[1] * 16f - (float)(npc.width / 2), npc.ai[2] * 16f - (float)(npc.height / 2)); for (int m = 0; m < 5; m++) @@ -235,7 +235,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.alpha -= 50; if (npc.alpha <= 0) { - npc.defense = provy ? 120 : 20; npc.chaseable = true; npc.ai[3] += 1f; npc.alpha = 0; @@ -255,7 +254,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } else if (npc.ai[0] == 3f) { - npc.defense = provy ? 120 : 20; npc.chaseable = true; npc.rotation = npc.velocity.X * 0.04f; npc.spriteDirection = (npc.direction > 0) ? 1 : -1; @@ -393,7 +391,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu if (CalamityWorld.death || !calamity) npc.localAI[0] += 1f; - if (npc.localAI[0] >= 140f) + if (npc.localAI[0] >= 120f) { npc.localAI[0] = 0f; diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index a38775ba06..ea98881a92 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -157,7 +157,12 @@ namespace CalamityMod.NPCs.Calamitas { float num823 = expertMode ? 9.5f : 8f; float num824 = expertMode ? 0.175f : 0.15f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num823 *= 1.25f; + num824 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num823 *= 1.5f; num824 *= 1.5f; @@ -241,7 +246,12 @@ namespace CalamityMod.NPCs.Calamitas float num832 = expertMode ? 9.5f : 8f; float num833 = expertMode ? 0.25f : 0.2f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num832 *= 1.25f; + num833 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num832 *= 1.5f; num833 *= 1.5f; diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 31d82ae56c..c70a19e8e1 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -181,7 +181,12 @@ namespace CalamityMod.NPCs.Calamitas { float num861 = 5f; float num862 = 0.1f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num861 *= 1.25f; + num862 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num861 *= 1.5f; num862 *= 1.5f; @@ -196,7 +201,7 @@ namespace CalamityMod.NPCs.Calamitas float num864 = player.position.X + (float)(player.width / 2) + (float)(num863 * (CalamityWorld.bossRushActive ? 270 : 180)) - vector86.X; float num865 = player.position.Y + (float)(player.height / 2) - vector86.Y; float num866 = (float)Math.Sqrt((double)(num864 * num864 + num865 * num865)); - if (expertMode) + if (expertMode || provy) { if (num866 > 300f) { @@ -328,7 +333,11 @@ namespace CalamityMod.NPCs.Calamitas { num870 += 4f; } - if (CalamityWorld.bossRushActive) + if (provy) + { + num870 *= 1.15f; + } + if (CalamityWorld.bossRushActive) { num870 *= 1.25f; } diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index 658421b5c6..52179abddd 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -181,7 +181,12 @@ namespace CalamityMod.NPCs.Calamitas { float num861 = 4.5f; float num862 = 0.2f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num861 *= 1.25f; + num862 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num861 *= 1.5f; num862 *= 1.5f; @@ -197,7 +202,7 @@ namespace CalamityMod.NPCs.Calamitas float num864 = player.position.X + (float)(player.width / 2) + (float)(num863 * (CalamityWorld.bossRushActive ? 270 : 180)) - vector86.X; float num865 = player.position.Y + (float)(player.height / 2) - vector86.Y; float num866 = (float)Math.Sqrt((double)(num864 * num864 + num865 * num865)); - if (expertMode) + if (expertMode || provy) { if (num866 > 300f) { @@ -329,7 +334,11 @@ namespace CalamityMod.NPCs.Calamitas { num870 += 4f; } - if (CalamityWorld.bossRushActive) + if (provy) + { + num870 *= 1.15f; + } + if (CalamityWorld.bossRushActive) { num870 *= 1.25f; } diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 5c1f258abf..65250efb6b 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -254,7 +254,12 @@ namespace CalamityMod.NPCs.Calamitas { float num823 = expertMode ? 10f : 8.5f; float num824 = expertMode ? 0.18f : 0.155f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num823 *= 1.25f; + num824 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num823 *= 1.5f; num824 *= 1.5f; @@ -347,7 +352,12 @@ namespace CalamityMod.NPCs.Calamitas float num832 = expertMode ? 10f : 8.5f; float num833 = expertMode ? 0.255f : 0.205f; - if (CalamityWorld.bossRushActive) + if (provy) + { + num832 *= 1.25f; + num833 *= 1.25f; + } + if (CalamityWorld.bossRushActive) { num832 *= 1.5f; num833 *= 1.5f; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index e86a38f59d..dbe238dfc5 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -3159,7 +3159,7 @@ namespace CalamityMod.NPCs } // Teleport dust - for (int m = 0; m < 60; m++) + for (int m = 0; m < 30; m++) { int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 3f); Main.dust[num39].noGravity = true; @@ -3212,12 +3212,11 @@ namespace CalamityMod.NPCs if (calamityGlobalNPC.newAI[2] != 0f && calamityGlobalNPC.newAI[3] != 0f) { - for (int m = 0; m < 10; m++) + for (int m = 0; m < 5; m++) { Vector2 position = new Vector2(calamityGlobalNPC.newAI[2], calamityGlobalNPC.newAI[3]); - int num39 = Dust.NewDust(position, npc.width, npc.height, 27, 0f, 0f, 200, default, 1f); + int num39 = Dust.NewDust(position, npc.width, npc.height, 27, 0f, 0f, 200, default, 2f); Main.dust[num39].noGravity = true; - Main.dust[num39].velocity.X = Main.dust[num39].velocity.X * 2f; } } @@ -3232,14 +3231,13 @@ namespace CalamityMod.NPCs { int dust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 1.5f); Main.dust[dust].noGravity = true; - Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 2f; } // Teleport if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[3] >= 420f) { // Teleport dust - for (int m = 0; m < 60; m++) + for (int m = 0; m < 30; m++) { int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 3f); Main.dust[num39].noGravity = true; @@ -3396,26 +3394,26 @@ namespace CalamityMod.NPCs if (enraged || configBossRushBoost) num176 += 3f; - if (num175 > 150f || CalamityWorld.death || CalamityWorld.bossRushActive) + if (num175 > 150f) num176 *= 1.05f; if (num175 > 200f) - num176 *= 1.1f; + num176 *= 1.05f; if (num175 > 250f) - num176 *= 1.1f; + num176 *= 1.05f; if (num175 > 300f) - num176 *= 1.1f; + num176 *= 1.05f; if (num175 > 350f) - num176 *= 1.15f; + num176 *= 1.1f; if (num175 > 400f) - num176 *= 1.15f; + num176 *= 1.1f; if (num175 > 450f) - num176 *= 1.15f; + num176 *= 1.1f; if (num175 > 500f) - num176 *= 1.2f; + num176 *= 1.1f; if (num175 > 550f) - num176 *= 1.2f; + num176 *= 1.1f; if (num175 > 600f) - num176 *= 1.2f; + num176 *= 1.1f; num175 = num176 / num175; npc.velocity.X = num173 * num175; @@ -3531,7 +3529,7 @@ namespace CalamityMod.NPCs else { npc.ai[3] += 1f; - if (npc.ai[3] >= 120f) + if (npc.ai[3] >= 200f) { npc.ai[2] += 1f; npc.ai[3] = 0f; @@ -12321,7 +12319,7 @@ namespace CalamityMod.NPCs if ((num1207 == num1208 - 14f || num1207 == num1208 - 7f || num1207 == num1208) && Main.netMode != NetmodeID.MultiplayerClient) { Vector2 vector203 = Utils.Vector2FromElipse(npc.localAI[0].ToRotationVector2(), value19 * npc.localAI[1]); - float velocity = CalamityWorld.bossRushActive ? 12f : 9f; + float velocity = CalamityWorld.bossRushActive ? 9f : 6.75f; Vector2 vector204 = Vector2.Normalize(v4) * velocity; Projectile.NewProjectile(npc.Center.X + vector203.X, npc.Center.Y + vector203.Y, vector204.X, vector204.Y, ProjectileID.PhantasmalBolt, 40, 0f, Main.myPlayer, 0f, 0f); } @@ -12639,7 +12637,7 @@ namespace CalamityMod.NPCs if ((num1178 == num1179 - 14f || num1178 == num1179 - 7f || num1178 == num1179) && Main.netMode != NetmodeID.MultiplayerClient) { Vector2 vector181 = Utils.Vector2FromElipse(npc.localAI[0].ToRotationVector2(), vector165 * npc.localAI[1]); - float velocity = CalamityWorld.bossRushActive ? 12f : 9f; + float velocity = CalamityWorld.bossRushActive ? 9f : 6.75f; Vector2 vector182 = Vector2.Normalize(v) * velocity; Projectile.NewProjectile(npc.Center.X + vector181.X, npc.Center.Y + vector181.Y, vector182.X, vector182.Y, ProjectileID.PhantasmalBolt, 40, 0f, Main.myPlayer, 0f, 0f); } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3c416d540d..eea143d8ba 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -145,9 +145,9 @@ namespace CalamityMod.NPCs { NPCID.GolemFistLeft, 250000 }, { NPCID.GolemFistRight, 250000 }, - { NPCID.EaterofWorldsHead, 150000 }, // 30 seconds - { NPCID.EaterofWorldsBody, 225000 }, - { NPCID.EaterofWorldsTail, 300000 }, + { NPCID.EaterofWorldsHead, 2500000 }, // 30 seconds + { NPCID.EaterofWorldsBody, 2500000 }, + { NPCID.EaterofWorldsTail, 2500000 }, // Tier 2 { NPCID.TheDestroyer, 2500000 }, // 30 seconds + immunity timer at start diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index c5684e6b8c..cbcfa97cbb 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -447,7 +447,8 @@ namespace CalamityMod.NPCs.Leviathan if (isNotOcean) num1074 *= 2; - Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f); + float ai0 = ((!leviAlive && num1075 == mod.ProjectileType("FrostMist")) ? 1f : 0f); + Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, ai0, 0f); } } diff --git a/Projectiles/Boss/DeusMine.cs b/Projectiles/Boss/DeusMine.cs index da8acded07..4995c6cb40 100644 --- a/Projectiles/Boss/DeusMine.cs +++ b/Projectiles/Boss/DeusMine.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.alpha = 100; projectile.penetrate = -1; projectile.tileCollide = false; - projectile.timeLeft = 1200; + projectile.timeLeft = 1020; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index bc0ff1515b..2005dffbcc 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -105,22 +105,25 @@ namespace CalamityMod.Projectiles.Boss projectile.localAI[0] = 0f; } } - int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); - projectile.ai[1] += 1f; - if (projectile.ai[1] < 110f && projectile.ai[1] > 30f) - { - float scaleFactor2 = projectile.velocity.Length(); - Vector2 vector11 = Main.player[num103].Center - projectile.Center; - vector11.Normalize(); - vector11 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 24f + vector11) / 25f; - projectile.velocity.Normalize(); - projectile.velocity *= scaleFactor2; - } - if (projectile.velocity.Length() < 12f) - { - projectile.velocity *= 1.02f; - } + if (projectile.ai[0] == 1f) + { + int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); + projectile.ai[1] += 1f; + if (projectile.ai[1] < 110f && projectile.ai[1] > 30f) + { + float scaleFactor2 = projectile.velocity.Length(); + Vector2 vector11 = Main.player[num103].Center - projectile.Center; + vector11.Normalize(); + vector11 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 24f + vector11) / 25f; + projectile.velocity.Normalize(); + projectile.velocity *= scaleFactor2; + } + if (projectile.velocity.Length() < 12f) + { + projectile.velocity *= 1.02f; + } + } projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.35f / 255f); } diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 0ad1a91ad5..5aff47cb19 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -734,29 +734,40 @@ namespace CalamityMod.World #region PostUpdate public override void PostUpdate() { + // Sunken Sea Location...duh SunkenSeaLocation = new Rectangle(WorldGen.UndergroundDesertLocation.Left, WorldGen.UndergroundDesertLocation.Bottom, WorldGen.UndergroundDesertLocation.Width, WorldGen.UndergroundDesertLocation.Height / 2); + + // Player variable, always finds the closest player relative to the center of the map int closestPlayer = (int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0); + // Force boss rush to off if (!deactivateStupidFuckingBullshit) { deactivateStupidFuckingBullshit = true; bossRushActive = false; CalamityMod.UpdateServerBoolean(); } + + // Boss Rush shit if (bossRushActive) { + // Prevent Moon Lord from spawning naturally if (NPC.MoonLordCountdown > 0) { NPC.MoonLordCountdown = 0; } + + // Do boss rush countdown and shit if no boss is alive if (!CalamityPlayer.areThereAnyDamnBosses) { + // Stage text if (bossRushSpawnCountdown > 0) { bossRushSpawnCountdown--; if (bossRushSpawnCountdown == 180) { + // After Fishron is dead if (bossRushStage == 28) { string key = "Mods.CalamityMod.BossRushTierThreeEndText2"; @@ -770,6 +781,8 @@ namespace CalamityMod.World NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } + + // After Providence is dead else if (bossRushStage == 36) { string key = "Mods.CalamityMod.BossRushTierFourEndText2"; @@ -785,30 +798,42 @@ namespace CalamityMod.World } } } + + // Cooldown and boss spawn if (bossRushSpawnCountdown <= 0) { + // Cooldown before next boss spawns bossRushSpawnCountdown = 60; - if (bossRushStage > 27) + + // Increase cooldown post-Fishron + if (bossRushStage >= 27) { bossRushSpawnCountdown += 300; } + + // Change cooldown based on stage switch (bossRushStage) { + // When Destroyer or Cultist dies, increase time to show text case 9: - bossRushSpawnCountdown = 240; - break; case 18: bossRushSpawnCountdown = 300; break; + + // When Signus dies, increase time to give players a moment to get in a good spot for Ravager case 25: bossRushSpawnCountdown = 360; break; + + // When Calamitas Clone dies, increase time to give players a moment to relax case 32: bossRushSpawnCountdown = 420; break; default: break; } + + // Post-Wall of Flesh teleport back to spawn if (bossRushStage == 13) { for (int playerIndex = 0; playerIndex < 255; playerIndex++) @@ -820,6 +845,8 @@ namespace CalamityMod.World } } } + + // Remove Providence debuff for next boss fight else if (bossRushStage == 36) { for (int playerIndex = 0; playerIndex < 255; playerIndex++) @@ -834,6 +861,8 @@ namespace CalamityMod.World } } } + + // Spawn bosses if (Main.netMode != NetmodeID.MultiplayerClient) { Main.PlaySound(SoundID.Roar, Main.player[closestPlayer].position, 0);