diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 321eaf30d8..c046eb754a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4003,16 +4003,19 @@ namespace CalamityMod.CalPlayer sCalDeathCount++; } } - deathCount++; + + if (CalamityWorld.ironHeart) + { + KillPlayer(); + return false; + } + + deathCount++; if (player.whoAmI == Main.myPlayer && Main.netMode == NetmodeID.MultiplayerClient) { DeathPacket(false); } - if (CalamityWorld.ironHeart) - { - KillPlayer(); - return false; - } + return true; } #endregion @@ -5812,7 +5815,7 @@ namespace CalamityMod.CalPlayer } else { - float amount = npc.velocity.Length() / (npc.Calamity().maxVelocity * 0.5f); + float amount = npc.velocity.Length() / (npc.Calamity().maxVelocity * 0.4f); if (amount > 1f) amount = 1f; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3803891113..486d3c5eb8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3305,7 +3305,7 @@ namespace CalamityMod.CalPlayer } // Brimstone Elemental lore inferno potion boost - if (modPlayer.brimstoneElementalLore && player.inferno) + if ((modPlayer.brimstoneElementalLore || modPlayer.ataxiaBlaze) && player.inferno) { const int FramesPerHit = 30; diff --git a/CalamityMod.cs b/CalamityMod.cs index 63cef57cae..82d5a2af85 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -132,7 +132,7 @@ namespace CalamityMod // Boss velocity scaling data structure public static SortedDictionary bossVelocityDamageScaleValues; - public const float velocityScaleMin = 0.75f; + public const float velocityScaleMin = 0.6f; public const float bitingEnemeyVelocityScale = 0.9f; // Lists diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 874788ea71..c6ddf6d2aa 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -1389,7 +1389,7 @@ namespace CalamityMod.NPCs float totalSegments = GetEaterOfWorldsSegmentsCountRevDeath(); // Count segments remaining - float segmentCount = NPC.CountNPCS(NPCID.EaterofWorldsHead) + NPC.CountNPCS(NPCID.EaterofWorldsBody) + NPC.CountNPCS(NPCID.EaterofWorldsTail); // 2f to 65f + float segmentCount = NPC.CountNPCS(NPCID.EaterofWorldsHead) + NPC.CountNPCS(NPCID.EaterofWorldsBody) + NPC.CountNPCS(NPCID.EaterofWorldsTail); // Percent segments remaining, add two to total for head and tail float lifeRatio = segmentCount / (totalSegments + 2); @@ -1866,7 +1866,7 @@ namespace CalamityMod.NPCs public static int GetEaterOfWorldsSegmentsCountRevDeath() { - return CalamityWorld.death ? 80 : 75; + return (CalamityWorld.death || CalamityWorld.bossRushActive) ? 80 : 75; } #endregion @@ -2522,7 +2522,7 @@ namespace CalamityMod.NPCs public static int GetBrainOfCthuluCreepersCountRevDeath() { - return CalamityWorld.death ? 30 : 25; + return (CalamityWorld.death || CalamityWorld.bossRushActive) ? 30 : 25; } private static float GetCrimsonBossKnockBack(NPC npc, int numPlayers, float lifeScale, float baseKnockBackResist) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 23a68cfdde..612f2d4b7b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -793,7 +793,7 @@ namespace CalamityMod.NPCs npc.buffImmune[BuffID.Slow] = true; } - if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) + if (DestroyerIDs.Contains(npc.type) || (EaterofWorldsIDs.Contains(npc.type) && CalamityWorld.bossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) { for (int k = 0; k < npc.buffImmune.Length; k++) { diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 831c712dcc..14735a2027 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -751,7 +751,7 @@ namespace CalamityMod.NPCs.DevourerofGods public override void NPCLoot() { // Skip the sentinel phase entirely if DoG has already been killed - CalamityWorld.DoGSecondStageCountdown = CalamityWorld.downedDoG ? 600 : 21600; + CalamityWorld.DoGSecondStageCountdown = (CalamityWorld.downedDoG || CalamityWorld.downedSecondSentinels) ? 600 : 21600; if (Main.netMode == NetmodeID.Server) { diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index afad42a2a8..e276f62f9f 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -782,7 +782,11 @@ namespace CalamityMod.NPCs.Signus netMessage.Write(CalamityWorld.DoGSecondStageCountdown); netMessage.Send(); } - } + + // Mark DoG fight sentinels as dead + CalamityWorld.downedSecondSentinels = true; + CalamityMod.UpdateServerBoolean(); + } // Mark Signus as dead CalamityWorld.downedSentinel3 = true; diff --git a/Projectiles/Boss/PlagueExplosion.cs b/Projectiles/Boss/PlagueExplosion.cs index d96878a30d..96a616128f 100644 --- a/Projectiles/Boss/PlagueExplosion.cs +++ b/Projectiles/Boss/PlagueExplosion.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Projectiles.Boss { projectile.width = 20; projectile.height = 20; - projectile.hostile = true; + projectile.scale = 1.5f; + projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; projectile.penetrate = -1; @@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.01f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.05f / 255f); + Lighting.AddLight(projectile.Center, 0f, 0.15f, 0f); bool flag15 = false; bool flag16 = false; if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) @@ -61,12 +62,12 @@ namespace CalamityMod.Projectiles.Boss num461 *= 0.7f; projectile.ai[0] += 4f; int num462 = 0; - while ((float)num462 < num461) + while (num462 < num461) { - float num463 = (float)Main.rand.Next(-10, 11); - float num464 = (float)Main.rand.Next(-10, 11); - float num465 = (float)Main.rand.Next(3, 9); - float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464)); + float num463 = Main.rand.Next(-10, 11); + float num464 = Main.rand.Next(-10, 11); + float num465 = Main.rand.Next(3, 9); + float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464); num466 = num465 / num466; num463 *= num466; num464 *= num466; @@ -75,9 +76,9 @@ namespace CalamityMod.Projectiles.Boss Main.dust[num467].position.X = projectile.Center.X; Main.dust[num467].position.Y = projectile.Center.Y; Dust expr_149DF_cp_0 = Main.dust[num467]; - expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11); + expr_149DF_cp_0.position.X += Main.rand.Next(-10, 11); Dust expr_14A09_cp_0 = Main.dust[num467]; - expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11); + expr_14A09_cp_0.position.Y += Main.rand.Next(-10, 11); Main.dust[num467].velocity.X = num463; Main.dust[num467].velocity.Y = num464; num462++; diff --git a/Projectiles/Boss/PlagueStingerGoliath.cs b/Projectiles/Boss/PlagueStingerGoliath.cs index b7a4a8a5d7..9355b50714 100644 --- a/Projectiles/Boss/PlagueStingerGoliath.cs +++ b/Projectiles/Boss/PlagueStingerGoliath.cs @@ -17,7 +17,8 @@ namespace CalamityMod.Projectiles.Boss { projectile.width = 10; projectile.height = 10; - projectile.hostile = true; + projectile.scale = 1.5f; + projectile.hostile = true; projectile.penetrate = -1; projectile.tileCollide = false; projectile.timeLeft = 300; @@ -28,9 +29,9 @@ namespace CalamityMod.Projectiles.Boss if (projectile.position.Y > projectile.ai[1]) projectile.tileCollide = true; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; - int num123 = (int)Player.FindClosest(projectile.Center, 1, 1); + int num123 = Player.FindClosest(projectile.Center, 1, 1); projectile.ai[0] += 1f; if (projectile.ai[0] < 110f && projectile.ai[0] > 30f) { @@ -61,13 +62,13 @@ namespace CalamityMod.Projectiles.Boss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(projectile.Center.X, projectile.Center.Y); - Vector2 vector11 = new Vector2((float)(Main.projectileTexture[projectile.type].Width / 2), (float)(Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2)); + Vector2 vector11 = new Vector2(Main.projectileTexture[projectile.type].Width / 2, Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Width, (float)(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Height / Main.projFrames[projectile.type])) * 1f / 2f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Width, ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Height / Main.projFrames[projectile.type]) * 1f / 2f; vector += vector11 * 1f + new Vector2(0f, 0f + 4f + projectile.gfxOffY); - Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red); + Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Color.Red); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow"), vector, - null, color, projectile.rotation, vector11, 1f, spriteEffects, 0f); + null, color, projectile.rotation, vector11, projectile.scale, spriteEffects, 0f); } } } diff --git a/Projectiles/Boss/PlagueStingerGoliath.png b/Projectiles/Boss/PlagueStingerGoliath.png index 1d5914c74b..0c8fd55607 100644 Binary files a/Projectiles/Boss/PlagueStingerGoliath.png and b/Projectiles/Boss/PlagueStingerGoliath.png differ diff --git a/Projectiles/Boss/PlagueStingerGoliathV2.cs b/Projectiles/Boss/PlagueStingerGoliathV2.cs index 46be68fdc6..dd2f44e3bc 100644 --- a/Projectiles/Boss/PlagueStingerGoliathV2.cs +++ b/Projectiles/Boss/PlagueStingerGoliathV2.cs @@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.width = 10; projectile.height = 10; + projectile.scale = 1.5f; projectile.hostile = true; projectile.penetrate = -1; projectile.extraUpdates = 2; @@ -30,7 +31,7 @@ namespace CalamityMod.Projectiles.Boss if (projectile.position.Y > projectile.ai[1]) projectile.tileCollide = true; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -46,13 +47,13 @@ namespace CalamityMod.Projectiles.Boss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(projectile.Center.X, projectile.Center.Y); - Vector2 vector11 = new Vector2((float)(Main.projectileTexture[projectile.type].Width / 2), (float)(Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2)); + Vector2 vector11 = new Vector2(Main.projectileTexture[projectile.type].Width / 2, Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type] / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2((float)ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Width, (float)(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Height / Main.projFrames[projectile.type])) * 1f / 2f; + vector -= new Vector2(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Width, ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow").Height / Main.projFrames[projectile.type]) * 1f / 2f; vector += vector11 * 1f + new Vector2(0f, 0f + 4f + projectile.gfxOffY); - Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red); + Color color = new Color(127 - projectile.alpha, 127 - projectile.alpha, 127 - projectile.alpha, 0).MultiplyRGBA(Color.Red); Main.spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Boss/PlagueStingerGoliathV2Glow"), vector, - null, color, projectile.rotation, vector11, 1f, spriteEffects, 0f); + null, color, projectile.rotation, vector11, projectile.scale, spriteEffects, 0f); } public override void Kill(int timeLeft) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 25b4b76068..d57efe19ac 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1008,13 +1008,15 @@ namespace CalamityMod.Projectiles if (defCrit == 0 && !projectile.npcProj && !projectile.trap) { if (projectile.melee) - defCrit = player.meleeCrit; + defCrit = modPlayer.critStats[0]; else if (projectile.ranged) - defCrit = player.rangedCrit; + defCrit = modPlayer.critStats[1]; else if (projectile.magic) - defCrit = player.magicCrit; + defCrit = modPlayer.critStats[2]; else if (rogue) - defCrit = modPlayer.throwingCrit; + defCrit = modPlayer.critStats[3]; + else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]) + defCrit = 4; } int x = (int)(projectile.Center.X / 16f); @@ -1054,7 +1056,7 @@ namespace CalamityMod.Projectiles if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap) { int critChance = (int)MathHelper.Clamp(1, 100, 100 - defCrit); - crit = Main.rand.NextBool(critChance + 1); + crit = Main.rand.NextBool(critChance); if ((uint)(projectile.type - ProjectileID.DD2LightningAuraT1) <= 2u) { diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ccb0c8ee0b..78b91179df 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -160,7 +160,8 @@ namespace CalamityMod.World public static bool downedSentinel1 = false; // Ceaseless Void public static bool downedSentinel2 = false; // Storm Weaver public static bool downedSentinel3 = false; // Signus, Envoy of the Devourer - public static bool downedPolterghast = false; + public static bool downedSecondSentinels = false; + public static bool downedPolterghast = false; public static bool downedDoG = false; public static bool downedBumble = false; public static bool buffedEclipse = false; @@ -250,6 +251,7 @@ namespace CalamityMod.World downedGSS = false; downedBuffedMothron = false; downedBoomerDuke = false; + downedSecondSentinels = false; death = false; defiled = false; armageddon = false; @@ -298,6 +300,8 @@ namespace CalamityMod.World downed.Add("stormWeaver"); if (downedSentinel3) downed.Add("signus"); + if (downedSecondSentinels) + downed.Add("secondSentinels"); if (downedYharon) downed.Add("yharon"); if (buffedEclipse) @@ -404,6 +408,7 @@ namespace CalamityMod.World downedSentinel1 = downed.Contains("ceaselessVoid"); downedSentinel2 = downed.Contains("stormWeaver"); downedSentinel3 = downed.Contains("signus"); + downedSecondSentinels = downed.Contains("secondSentinels"); downedYharon = downed.Contains("yharon"); buffedEclipse = downed.Contains("eclipse"); downedSCal = downed.Contains("supremeCalamitas"); @@ -528,7 +533,7 @@ namespace CalamityMod.World BitsByte flags8 = reader.ReadByte(); forcedRainAlready = flags8[0]; forcedDownpourWithTear = flags8[1]; - _ = flags8[2]; + downedSecondSentinels = flags8[2]; _ = flags8[3]; _ = flags8[4]; _ = flags8[5]; @@ -619,7 +624,7 @@ namespace CalamityMod.World BitsByte flags8 = new BitsByte(); flags8[0] = forcedRainAlready; flags8[1] = forcedDownpourWithTear; - flags8[2] = false; + flags8[2] = downedSecondSentinels; flags8[3] = false; flags8[4] = false; flags8[5] = false; @@ -716,7 +721,7 @@ namespace CalamityMod.World BitsByte flags8 = reader.ReadByte(); forcedRainAlready = flags8[0]; forcedDownpourWithTear = flags8[1]; - _ = flags8[2]; + downedSecondSentinels = flags8[2]; _ = flags8[3]; _ = flags8[4]; _ = flags8[5];