diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 39b1151c66..b7f421f08c 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -282,7 +282,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index e08fe0ecea..39a070170d 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 5d0426a607..37f7762972 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -449,7 +449,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeAcceleration *= accelerationMultiplier; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { scourgeMaxSpeed *= 1.15f; scourgeAcceleration *= 1.15f; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 96c890b5b0..2b49366863 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index fe3a35f073..1dff906636 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.AstrumAureus walkingVelocity += 1.5f * (1f - lifeRatio); if (revenge) walkingVelocity += Math.Abs(NPC.Center.X - player.Center.X) * 0.0025f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) walkingVelocity *= 1.15f; float walkingProjectileVelocity = walkingVelocity * 0.8f; @@ -653,7 +653,7 @@ namespace CalamityMod.NPCs.AstrumAureus velocity += 6f * enrageScale; if (expertMode) velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.15f; NPC.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - NPC.Center).SafeNormalize(Vector2.Zero) * velocity; @@ -1072,7 +1072,7 @@ namespace CalamityMod.NPCs.AstrumAureus if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed) maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f; - if (Main.getGoodWorld && !reduceFallSpeed) + if (CalamityWorld.LegendaryMode && !reduceFallSpeed) { gravity *= 1.15f; maxFallSpeed *= 1.15f; diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 1870a9c39c..06ee233b40 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 4d78a2c84f..7c6cdb8e61 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) @@ -343,7 +343,7 @@ namespace CalamityMod.NPCs.AstrumDeus int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1; int headTwoID = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPC.type, startIndexHeadTwo); Main.npc[headTwoID].Calamity().newAI[0] = 2f; - Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f; + Main.npc[headTwoID].Calamity().newAI[3] = CalamityWorld.LegendaryMode ? 300f : 600f; Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f; Main.npc[headTwoID].timeLeft *= 20; Main.npc[headTwoID].ForceNetUpdate(); @@ -580,7 +580,7 @@ namespace CalamityMod.NPCs.AstrumDeus speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.15f; turnSpeed *= 1.15f; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 36acea7e26..bb252b80ae 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 82f36a3842..4034b028a6 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.chaseable = true; NPC.ai[3] += 1f; NPC.alpha = 0; - if (NPC.ai[3] >= 2f || phase2 || Main.getGoodWorld) + if (NPC.ai[3] >= 2f || phase2 || CalamityWorld.LegendaryMode) { NPC.ai[0] = -1f; NPC.ai[1] = 0f; @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; int numProj = death ? 8 : 4; int spread = death ? 90 : 45; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { numProj *= 3; spread *= 2; @@ -582,7 +582,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.chaseable = false; NPC.localAI[0] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.localAI[0] += 2f; if (expertMode) NPC.localAI[0] += 1f - lifeRatio; @@ -753,7 +753,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental int damage = NPC.GetProjectileDamage(type); Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); if (Main.zenithWorld) @@ -794,7 +794,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); if (Main.zenithWorld) @@ -816,7 +816,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, NPC.localAI[0], NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, -NPC.localAI[0], -NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); if (Main.zenithWorld) diff --git a/NPCs/Bumblebirb/DraconicSwarmer.cs b/NPCs/Bumblebirb/DraconicSwarmer.cs index 803380b88f..f486b0a453 100644 --- a/NPCs/Bumblebirb/DraconicSwarmer.cs +++ b/NPCs/Bumblebirb/DraconicSwarmer.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerIdleTargetDist.Normalize(); swarmerIdleTargetDist *= swarmerIdleSpeed; NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; } else if (NPC.velocity.Length() > 2f) @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerChargeTargetDist.Normalize(); swarmerChargeTargetDist *= swarmerChargeSpeed; NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; NPC.ForceNetUpdate(); @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerDecelerateTargetDist.Normalize(); swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.damage = NPC.defDamage; NPC.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs index 268fadb66a..e7953a25ee 100644 --- a/NPCs/Bumblebirb/Dragonfolly.cs +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb if (NPC.localAI[2] > 0f || bossRush) enrageScale += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) enrageScale += 0.5f; if (enrageScale > 3f) @@ -469,7 +469,7 @@ namespace CalamityMod.NPCs.Bumblebirb bool spawnRight = player.velocity.X > 0f; for (int i = 0; i < totalProjectiles; i++) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) { @@ -536,13 +536,13 @@ namespace CalamityMod.NPCs.Bumblebirb { int totalProjectiles = phase2 ? 40 : 48; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) totalProjectiles *= 2; float radians = MathHelper.TwoPi / totalProjectiles; int distance = phase2 ? 1200 : 1320; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) distance *= 2; bool spawnRight = player.velocity.X > 0f; diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index e4571acd7a..8804fae061 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -398,7 +398,7 @@ namespace CalamityMod.NPCs.CalClone baseVelocity += 1.5f * (1f - lifeRatio); baseAcceleration += 0.03f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { baseVelocity *= 1.15f; baseAcceleration *= 1.15f; @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.CalClone if (Main.zenithWorld) type = ModContent.ProjectileType(); - float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; + float gigaBlastFrequency = (CalamityWorld.LegendaryMode ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; float projSpeed = bossRush ? 6.25f : 5f; if (calamityGlobalNPC.newAI[3] <= 300f) { diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index a5cc956364..0645bfce1f 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -233,7 +233,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.06f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -360,7 +360,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = NPC.Center; diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index 73e07ab8e3..09bd00a219 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.1f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -351,7 +351,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index cc077b9f94..fafff6489f 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.CeaselessVoid if (phase4) darkEnergyAmt += 1; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) darkEnergyAmt *= 2; // Spawn a few Dark Energies as soon as the fight starts @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.CeaselessVoid float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); // Decides whether Ceaseless moves closer to its target or not - float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; + float distanceRequiredToMove = (CalamityWorld.LegendaryMode || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; bool move = Vector2.Distance(NPC.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(NPC.Center, 1, 1, player.Center, 1, 1); // Succ attack @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.CeaselessVoid acceleration *= 2f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -550,8 +550,8 @@ namespace CalamityMod.NPCs.CeaselessVoid // Move between 8 different positions around the player, in order float maxDistance = 320f; - Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero; - if (!succ && Main.getGoodWorld) + Vector2 moveToOffset = succ ? Vector2.Zero : CalamityWorld.LegendaryMode ? new Vector2(0f, -maxDistance) : Vector2.Zero; + if (!succ && CalamityWorld.LegendaryMode) { // Move to a new location every few seconds calamityGlobalNPC.newAI[2] += 1f; @@ -603,7 +603,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Vector2 distanceFromDestination = destination - NPC.Center; // Movement - if (NPC.Distance(destination) > maxDistance || succ || !Main.getGoodWorld) + if (NPC.Distance(destination) > maxDistance || succ || !CalamityWorld.LegendaryMode) CalamityUtils.SmoothMovement(NPC, 0f, distanceFromDestination, velocity, acceleration, true); } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index d7b8c63f86..4e6a2a0bc7 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -982,7 +982,7 @@ namespace CalamityMod.NPCs.Crabulon { if (Main.netMode != NetmodeID.MultiplayerClient) { - int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.01 : CalamityWorld.LegendaryMode ? 0.02 : 0.05)); + int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.02 : 0.05)); if ((NPC.life + crabShroomSpawnFreq) < NPC.localAI[0]) { NPC.localAI[0] = NPC.life; diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs index ea49eba333..963e8d7f0f 100644 --- a/NPCs/NormalNPCs/Foveanator.cs +++ b/NPCs/NormalNPCs/Foveanator.cs @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.NormalNPCs chargeSpeed += 1f * enrageScale; if (CalamityWorld.LegendaryMode) chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 1f; NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; diff --git a/NPCs/NormalNPCs/WildBumblebirb.cs b/NPCs/NormalNPCs/WildBumblebirb.cs index 360d470790..7bd9d5b4b3 100644 --- a/NPCs/NormalNPCs/WildBumblebirb.cs +++ b/NPCs/NormalNPCs/WildBumblebirb.cs @@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerIdleTargetDist.Normalize(); swarmerIdleTargetDist *= swarmerIdleSpeed; NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; } else if (NPC.velocity.Length() > 2f) @@ -206,7 +206,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerChargeTargetDist.Normalize(); swarmerChargeTargetDist *= swarmerChargeSpeed; NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; NPC.ForceNetUpdate(); @@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerDecelerateTargetDist.Normalize(); swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.damage = NPC.defDamage; NPC.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 1d6b35bf42..622e9dd92c 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.OldDuke bool death = CalamityWorld.death || bossRush; float exhaustionGateValue = 360f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) exhaustionGateValue *= 0.5f; float numberOfAttacksBeforeExhaustion = 12f; @@ -931,7 +931,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); @@ -978,7 +978,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -1291,13 +1291,13 @@ namespace CalamityMod.NPCs.OldDuke Vector2 phase2GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1361,7 +1361,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -1667,13 +1667,13 @@ namespace CalamityMod.NPCs.OldDuke Vector2 phase3GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1696,7 +1696,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);