diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 534e9aa71a..1071e18803 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5958,20 +5958,7 @@ namespace CalamityMod.CalPlayer if (CalamityWorld.armageddon || (BossRushEvent.BossRushActive && bossRushImmunityFrameCurseTimer > 0)) { if (areThereAnyDamnBosses || (BossRushEvent.BossRushActive && bossRushImmunityFrameCurseTimer > 0)) - { - if (CalamityWorld.DoGSecondStageCountdown > 0) - { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } KillPlayer(); - } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ef9bdf453f..a309209c16 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -398,11 +398,8 @@ namespace CalamityMod.CalPlayer { // If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly. // EXCEPTION: Wall of Flesh is alive and you are not in hell. Then you don't get anything. - if ((areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) && - !wofAndNotHell) - { + if ((areThereAnyDamnBosses || BossRushEvent.BossRushActive) && !wofAndNotHell) adrenalineDiff += adrenalineMax / AdrenalineChargeTime; - } // If you aren't actively in a boss fight, adrenaline rapidly fades away. else diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs index 6fbce35c38..5b9c7a9e0c 100644 --- a/CalamityNetcode.cs +++ b/CalamityNetcode.cs @@ -124,10 +124,6 @@ namespace CalamityMod byte playerIndex2 = reader.ReadByte(); CalamityUtils.SpawnOldDuke(playerIndex2); break; - case CalamityModMessageType.DoGCountdownSync: - int countdown = reader.ReadInt32(); - CalamityWorld.DoGSecondStageCountdown = countdown; - break; case CalamityModMessageType.ArmoredDiggerCountdownSync: int countdown5 = reader.ReadInt32(); CalamityWorld.ArmoredDiggerSpawnCooldown = countdown5; @@ -349,7 +345,6 @@ namespace CalamityMod SpawnSuperDummy, DeleteAllSuperDummies, ServersideSpawnOldDuke, - DoGCountdownSync, // TODO -- this gets written in about six thousand places which all need to be individually evaluated ArmoredDiggerCountdownSync, // TODO -- remove this mechanic entirely ProvidenceDyeConditionSync, // TODO -- this packetstorms if you hit Provi with spam weapons. It should ONLY send a packet if the status changes. PSCChallengeSync, // TODO -- once you've failed the PSC challenge this packetstorms diff --git a/Items/DifficultyItems/Death.cs b/Items/DifficultyItems/Death.cs index 793f2d7c5a..31c9f46e3c 100644 --- a/Items/DifficultyItems/Death.cs +++ b/Items/DifficultyItems/Death.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.DifficultyItems if (Main.netMode == NetmodeID.MultiplayerClient) return true; - if (CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) + if (CalamityPlayer.areThereAnyDamnBosses || BossRushEvent.BossRushActive) { string key = "Mods.CalamityMod.ChangingTheRules"; Color messageColor = Color.Crimson; @@ -88,7 +88,6 @@ namespace CalamityMod.Items.DifficultyItems CalamityUtils.DisplayLocalizedText(key, messageColor); } } - CalamityWorld.DoGSecondStageCountdown = 0; CalamityNetcode.SyncWorld(); return true; diff --git a/Items/DifficultyItems/Malice.cs b/Items/DifficultyItems/Malice.cs index e84fa5ece3..65427980b1 100644 --- a/Items/DifficultyItems/Malice.cs +++ b/Items/DifficultyItems/Malice.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Items.DifficultyItems if (Main.netMode == NetmodeID.MultiplayerClient) return true; - if (CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) + if (CalamityPlayer.areThereAnyDamnBosses || BossRushEvent.BossRushActive) { string key = "Mods.CalamityMod.ChangingTheRules"; Color messageColor = Color.Crimson; @@ -95,7 +95,6 @@ namespace CalamityMod.Items.DifficultyItems Color messageColor = Color.Crimson; CalamityUtils.DisplayLocalizedText(key, messageColor); } - CalamityWorld.DoGSecondStageCountdown = 0; CalamityNetcode.SyncWorld(); return true; diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index ed29905269..3c303c3da4 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Items.DifficultyItems if (Main.netMode == NetmodeID.MultiplayerClient) return true; - if (CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) + if (CalamityPlayer.areThereAnyDamnBosses || BossRushEvent.BossRushActive) { string key = "Mods.CalamityMod.ChangingTheRules"; Color messageColor = Color.Crimson; @@ -113,7 +113,6 @@ namespace CalamityMod.Items.DifficultyItems messageColor = Color.Crimson; CalamityUtils.DisplayLocalizedText(key, messageColor); } - CalamityWorld.DoGSecondStageCountdown = 0; CalamityNetcode.SyncWorld(); } return true; diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 8601a609e3..07358adc48 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Items.SummonItems SacrificeTotal = 1; DisplayName.SetDefault("Cosmic Worm"); Tooltip.SetDefault("Summons the Devourer of Gods\n" + - "SENTINEL WARNING TOOLTIP LINE HERE\n" + "Not consumable"); } @@ -35,18 +34,9 @@ namespace CalamityMod.Items.SummonItems Item.Calamity().customRarity = CalamityRarity.Turquoise; } - public override void ModifyTooltips(List list) - { - TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1"); - bool sentinelsNotDefeated = !DownedBossSystem.downedCeaselessVoid || !DownedBossSystem.downedStormWeaver || !DownedBossSystem.downedSignus; - - if (line != null) - line.Text = sentinelsNotDefeated ? "WARNING! Some sentinels have not been truly defeated yet and will spawn at full power during this fight!" : ""; - } - public override bool CanUseItem(Player player) { - return !NPC.AnyNPCs(ModContent.NPCType()) && CalamityWorld.DoGSecondStageCountdown <= 0 && !BossRushEvent.BossRushActive; + return !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; } public override bool? UseItem(Player player) diff --git a/Items/SummonItems/RuneofCos.cs b/Items/SummonItems/RuneofCos.cs index bb581487b5..8cf17feaa8 100644 --- a/Items/SummonItems/RuneofCos.cs +++ b/Items/SummonItems/RuneofCos.cs @@ -39,8 +39,7 @@ namespace CalamityMod.Items.SummonItems public override bool CanUseItem(Player player) { return (player.ZoneSkyHeight || player.ZoneUnderworldHeight || player.ZoneDungeon) && - !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && - CalamityWorld.DoGSecondStageCountdown <= 0 && !BossRushEvent.BossRushActive; + !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; } public override bool? UseItem(Player player) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 98052c0104..fbad3cce1a 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1660,11 +1660,6 @@ namespace CalamityMod Item itemToSet = (Item)args[1]; return SetCalamityRarity(itemToSet, rarity); - case "GetDoGCountdown": - case "GetDoGFightCountdown": - case "GetDoGStage2Countdown": - return CalamityWorld.DoGSecondStageCountdown; - case "AcidRainActive": case "IsAcidRainActive": case "GetAcidRainActive": diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 4d4b668a6a..f91f8f4cf9 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -4020,18 +4020,6 @@ namespace CalamityMod.NPCs if (npc.velocity.Y < -12f) npc.velocity.Y = -12f; - if (npc.timeLeft < 10) - { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - if (npc.timeLeft > 60) npc.timeLeft = 60; @@ -4285,7 +4273,7 @@ namespace CalamityMod.NPCs } // Destroy all Dark Energies if their total HP is below 20% - int darkEnergyMaxHP = BossRushEvent.BossRushActive ? 44000 : (CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedCeaselessVoid) ? 12000 : 3000; + int darkEnergyMaxHP = BossRushEvent.BossRushActive ? 44000 : 12000; int totalDarkEnergiesSpawned = darkEnergyAmt * 3 + 2; int totalDarkEnergyMaxHP = darkEnergyMaxHP * totalDarkEnergiesSpawned; int succPhaseGateValue = (int)(totalDarkEnergyMaxHP * 0.2); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e485813dab..91b030cf8f 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4563,7 +4563,7 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 2.5); maxSpawns = (int)(maxSpawns * 0.3f); } - if ((player.Calamity().bossZen || CalamityWorld.DoGSecondStageCountdown > 0) && CalamityConfig.Instance.BossZen) + if (player.Calamity().bossZen && CalamityConfig.Instance.BossZen) { spawnRate *= 5; maxSpawns = (int)(maxSpawns * 0.001f); diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 3b347e189b..25565e17cc 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -47,20 +47,9 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.defense = 80; CalamityGlobalNPC global = NPC.Calamity(); global.DR = 0.5f; - - bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedCeaselessVoid; - NPC.LifeMaxNERB(notDoGFight ? 64400 : 16100, notDoGFight ? 77280 : 19320, 72000); - - // If fought alone, Ceaseless Void plays its own theme - if (notDoGFight) - { - NPC.value = Item.buyPrice(2, 0, 0, 0); - Music = CalamityMod.Instance.GetMusicFromMusicMod("Void") ?? MusicID.Boss3; - } - // If fought as a DoG interlude, keep the DoG music playing - else - Music = CalamityMod.Instance.GetMusicFromMusicMod("ScourgeofTheUniverse") ?? MusicID.Boss3; - + NPC.LifeMaxNERB(64400, 77280, 72000); + NPC.value = Item.buyPrice(2, 0, 0, 0); + Music = CalamityMod.Instance.GetMusicFromMusicMod("Void") ?? MusicID.Boss3; double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.aiStyle = -1; @@ -184,46 +173,22 @@ namespace CalamityMod.NPCs.CeaselessVoid return false; } - // Ceaseless Void is "at full strength" if the DoG fight is not active, or if he has not been killed yet and the DoG fight IS active. - public static bool AtFullStrength() => CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedCeaselessVoid; - public static bool LastSentinelKilled() => !DownedBossSystem.downedCeaselessVoid && DownedBossSystem.downedStormWeaver && DownedBossSystem.downedSignus; public override void OnKill() { - bool fullStrength = AtFullStrength(); - if (fullStrength) - CalamityGlobalNPC.SetNewBossJustDowned(NPC); - - // If DoG's fight is active, set the timer for the remaining two sentinels - if (CalamityWorld.DoGSecondStageCountdown > 14460) - { - CalamityWorld.DoGSecondStageCountdown = 14460; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - - // Mark Ceaseless Void as dead - if (fullStrength) - { - DownedBossSystem.downedCeaselessVoid = true; - CalamityNetcode.SyncWorld(); - } + CalamityGlobalNPC.SetNewBossJustDowned(NPC); + DownedBossSystem.downedCeaselessVoid = true; + CalamityNetcode.SyncWorld(); } public override void ModifyNPCLoot(NPCLoot npcLoot) { - var fullStrengthDrops = npcLoot.DefineConditionalDropSet(AtFullStrength); - fullStrengthDrops.Add(ItemDropRule.BossBag(ModContent.ItemType())); + npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); // Normal drops: Everything that would otherwise be in the bag LeadingConditionRule normalOnly = new LeadingConditionRule(new Conditions.NotExpert()); - fullStrengthDrops.Add(normalOnly); + npcLoot.Add(normalOnly); { // Weapons int[] weapons = new int[] @@ -246,7 +211,7 @@ namespace CalamityMod.NPCs.CeaselessVoid OnSuccess(ItemDropRule.Common(ModContent.ItemType()))); } - fullStrengthDrops.Add(ModContent.ItemType(), 10); + npcLoot.Add(ModContent.ItemType(), 10); // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 479b953544..21aed14d02 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -37,15 +37,7 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.width = 80; NPC.height = 80; NPC.defense = 50; - NPC.lifeMax = 3000; - if (CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedCeaselessVoid) - { - NPC.lifeMax = 12000; - } - if (BossRushEvent.BossRushActive) - { - NPC.lifeMax = 4400; - } + NPC.lifeMax = BossRushEvent.BossRushActive ? 4400 : 12000; double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index d9bc722b78..72a3b52c48 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -144,11 +144,11 @@ namespace CalamityMod.NPCs.DevourerofGods phase2Started = true; // Play music after the transiton BS - if (CalamityWorld.DoGSecondStageCountdown == 530) + if (Main.npc[(int)NPC.ai[2]].localAI[2] == 530f) Music = CalamityMod.Instance.GetMusicFromMusicMod("DevourerOfGodsP2") ?? MusicID.LunarBoss; // Once before DoG spawns, set new size - if (CalamityWorld.DoGSecondStageCountdown == 60) + if (Main.npc[(int)NPC.ai[2]].localAI[2] == 60f) { NPC.position = NPC.Center; NPC.width = 70; @@ -259,7 +259,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } - if (Main.npc[(int)NPC.ai[1]].Opacity >= 0.5f && (!setOpacity || (CalamityWorld.DoGSecondStageCountdown <= 60 && CalamityWorld.DoGSecondStageCountdown > 0))) + if (Main.npc[(int)NPC.ai[1]].Opacity >= 0.5f && (!setOpacity || (Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f && Main.npc[(int)NPC.ai[2]].localAI[2] > 0f))) { NPC.Opacity += 0.165f; if (NPC.Opacity >= 1f && invinceTime <= 0) @@ -367,7 +367,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - bool useOtherTextures = phase2Started && CalamityWorld.DoGSecondStageCountdown <= 60; + bool useOtherTextures = phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f; Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index e2707dc4ca..593ea154c2 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.DevourerofGods public override void BossHeadSlot(ref int index) { - if (Phase2Started && (CalamityWorld.DoGSecondStageCountdown > 60 || AwaitingPhase2Teleport)) + if (Phase2Started && (NPC.localAI[2] > 60f || AwaitingPhase2Teleport)) index = -1; else if (Phase2Started && !AwaitingPhase2Teleport) index = phase2IconIndex; @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.DevourerofGods public override void BossHeadRotation(ref float rotation) { - if (Phase2Started && CalamityWorld.DoGSecondStageCountdown <= 60) + if (Phase2Started && NPC.localAI[2] <= 60f) rotation = NPC.rotation; } @@ -211,6 +211,7 @@ namespace CalamityMod.NPCs.DevourerofGods writer.Write(NPC.Calamity().newAI[i]); // Phase 2 syncs + writer.Write(NPC.localAI[2]); writer.Write(shotSpacing_Phase2[0]); writer.Write(shotSpacing_Phase2[1]); writer.Write(shotSpacing_Phase2[2]); @@ -263,6 +264,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.Calamity().newAI[i] = reader.ReadSingle(); // Phase 2 syncs + NPC.localAI[2] = reader.ReadSingle(); shotSpacing_Phase2[0] = reader.ReadInt32(); shotSpacing_Phase2[1] = reader.ReadInt32(); shotSpacing_Phase2[2] = reader.ReadInt32(); @@ -411,18 +413,21 @@ namespace CalamityMod.NPCs.DevourerofGods else NPC.takenDamageMultiplier = 1.1f; - // Close DoG's HP bar if busy with sentinels or a P2 transition. - if (CalamityWorld.DoGSecondStageCountdown > 0) + // Close DoG's HP bar if busy with sentinels or a P2 transition and decrement the countdown. + if (NPC.localAI[2] > 0f) + { + NPC.localAI[2] -= 1f; NPC.Calamity().ShouldCloseHPBar = true; + } // Teleport after the Phase 2 animation. - if (CalamityWorld.DoGSecondStageCountdown == 61) + if (NPC.localAI[2] == 61f) Teleport(player, malice, death, revenge, expertMode, phase5, true); // Be invincibile until the phase 2 teleport happens. // This is done to prevent DoG from suddenly and weirdly re-appearing after entering the phase 1 portal. // Once the teleport happens he will be in position and this effect stops. - if (Phase2Started && AwaitingPhase2Teleport && CalamityWorld.DoGSecondStageCountdown < 60) + if (Phase2Started && AwaitingPhase2Teleport && NPC.localAI[2] < 60f) { NPC.Opacity = 0f; NPC.dontTakeDamage = true; @@ -445,23 +450,16 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.netUpdate = true; } - // Skip the sentinel phase entirely if DoG has already been killed - CalamityWorld.DoGSecondStageCountdown = (DownedBossSystem.downedDoG || DownedBossSystem.downedSecondSentinels || BossRushEvent.BossRushActive) ? 600 : 21600; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } + // Phase 2 countdown + NPC.localAI[2] = 600f; } // Play music after the transiton BS - if (CalamityWorld.DoGSecondStageCountdown == 530) + if (NPC.localAI[2] == 530f) Music = CalamityMod.Instance.GetMusicFromMusicMod("DevourerOfGodsP2") ?? MusicID.LunarBoss; // Once before DoG spawns, set new size and become visible again. - if (CalamityWorld.DoGSecondStageCountdown == 60) + if (NPC.localAI[2] == 60f) { preventBullshitHitsAtStartofFinalPhaseTimer = 180; NPC.position = NPC.Center; @@ -473,7 +471,7 @@ namespace CalamityMod.NPCs.DevourerofGods } // Dialogue the moment the second phase starts - if (CalamityWorld.DoGSecondStageCountdown == 60) + if (NPC.localAI[2] == 60f) { string key = "Mods.CalamityMod.EdgyBossText10"; Color messageColor = Color.Cyan; @@ -484,8 +482,8 @@ namespace CalamityMod.NPCs.DevourerofGods // Begin phase 2 once all sentinels are down if (Phase2Started) { - // Go immune and invisible if sentinels are alive - if (CalamityWorld.DoGSecondStageCountdown > 5) + // Go immune and invisible + if (NPC.localAI[2] > 5f) { // Don't take damage NPC.dontTakeDamage = true; @@ -515,7 +513,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.Opacity = 0f; // Ensure the portal is pointing in the direction of the head at first, to prevent direction offsets. - if (CalamityWorld.DoGSecondStageCountdown > 360) + if (NPC.localAI[2] > 360f) Main.projectile[PortalIndex].Center = NPC.Center + NPC.SafeDirectionTo(Main.projectile[PortalIndex].Center) * NPC.Distance(Main.projectile[PortalIndex].Center); } @@ -2266,7 +2264,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - bool useOtherTextures = (Phase2Started && CalamityWorld.DoGSecondStageCountdown <= 60) || NPC.IsABestiaryIconDummy; + bool useOtherTextures = (Phase2Started && NPC.localAI[2] <= 60f) || NPC.IsABestiaryIconDummy; Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsHeadS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); if (NPC.IsABestiaryIconDummy) @@ -2303,9 +2301,6 @@ namespace CalamityMod.NPCs.DevourerofGods public override void OnKill() { - // Stop the countdown -- if you kill DoG in less than 60 frames, this will stop another one from spawning. - CalamityWorld.DoGSecondStageCountdown = 0; - CalamityGlobalNPC.SetNewBossJustDowned(NPC); CalamityGlobalNPC.SetNewShopVariable(new int[] { ModContent.NPCType() }, DownedBossSystem.downedDoG); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 167479d89a..e81a9ad6f7 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -147,11 +147,11 @@ namespace CalamityMod.NPCs.DevourerofGods phase2Started = true; // Play music after the transiton BS - if (CalamityWorld.DoGSecondStageCountdown == 530) + if (Main.npc[(int)NPC.ai[2]].localAI[2] == 530f) Music = CalamityMod.Instance.GetMusicFromMusicMod("DevourerOfGodsP2") ?? MusicID.LunarBoss; // Once before DoG spawns, set new size - if (CalamityWorld.DoGSecondStageCountdown == 60) + if (Main.npc[(int)NPC.ai[2]].localAI[2] == 60f) { NPC.position = NPC.Center; NPC.width = 80; @@ -216,7 +216,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.active = false; } - if (Main.npc[(int)NPC.ai[1]].Opacity >= 0.5f && (!setOpacity || (CalamityWorld.DoGSecondStageCountdown <= 60 && CalamityWorld.DoGSecondStageCountdown > 0))) + if (Main.npc[(int)NPC.ai[1]].Opacity >= 0.5f && (!setOpacity || (Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f && Main.npc[(int)NPC.ai[2]].localAI[2] > 0f))) { NPC.Opacity += 0.165f; if (NPC.Opacity >= 1f && invinceTime <= 0) @@ -313,7 +313,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - bool useOtherTextures = phase2Started && CalamityWorld.DoGSecondStageCountdown <= 60; + bool useOtherTextures = phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f; Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); diff --git a/NPCs/DevourerofGods/DoGSky.cs b/NPCs/DevourerofGods/DoGSky.cs index 8cd485e164..c71d453ff2 100644 --- a/NPCs/DevourerofGods/DoGSky.cs +++ b/NPCs/DevourerofGods/DoGSky.cs @@ -42,8 +42,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (DoGIndex != -1) x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[DoGIndex].Center); - bool sentinelsPhase = Main.npc[DoGIndex].life / (float)Main.npc[DoGIndex].lifeMax < 0.6f && CalamityWorld.DoGSecondStageCountdown > 720; - float intensityScalar = sentinelsPhase ? 0f : 0.5f; + float intensityScalar = 0.5f; return (1f - Utils.SmoothStep(3000f, 6000f, x)) * intensityScalar; } return 0f; @@ -82,7 +81,7 @@ namespace CalamityMod.NPCs.DevourerofGods { float intensity = GetIntensity(); float lifeRatio = Main.npc[DoGIndex].life / (float)Main.npc[DoGIndex].lifeMax; - double blackScreenLife_GateValue = lifeRatio < 0.6f && CalamityWorld.DoGSecondStageCountdown <= 2 ? 0.09 : 0.66; + double blackScreenLife_GateValue = (lifeRatio < 0.6f && Main.npc[DoGIndex].localAI[2] <= 2f) ? 0.09 : 0.66; if (Main.npc[DoGIndex].life < Main.npc[DoGIndex].lifeMax * blackScreenLife_GateValue || CalamityWorld.death || BossRushEvent.BossRushActive) { spriteBatch.Draw(TextureAssets.BlackTile.Value, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 7bf2b8ef99..f9385eaff5 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -52,20 +52,9 @@ namespace CalamityMod.NPCs.Signus NPC.width = 130; NPC.height = 130; NPC.defense = 60; - - bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedSignus; - NPC.LifeMaxNERB(notDoGFight ? 297000 : 73000, notDoGFight ? 356400 : 87600, 240000); - - // If fought alone, Signus plays his own theme - if (notDoGFight) - { - NPC.value = Item.buyPrice(2, 0, 0, 0); - Music = CalamityMod.Instance.GetMusicFromMusicMod("Signus") ?? MusicID.Boss4; - } - // If fought as a DoG interlude, keep the DoG music playing - else - Music = CalamityMod.Instance.GetMusicFromMusicMod("ScourgeofTheUniverse") ?? MusicID.Boss3; - + NPC.LifeMaxNERB(297000, 356400, 240000); + NPC.value = Item.buyPrice(2, 0, 0, 0); + Music = CalamityMod.Instance.GetMusicFromMusicMod("Signus") ?? MusicID.Boss4; double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; NPC.lifeMax += (int)(NPC.lifeMax * HPBoost); NPC.knockBackResist = 0f; @@ -142,18 +131,6 @@ namespace CalamityMod.NPCs.Signus player = Main.player[NPC.target]; if (!player.active || player.dead || Vector2.Distance(player.Center, vectorCenter) > 6400f) { - if (NPC.timeLeft < 10) - { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - NPC.rotation = NPC.velocity.X * 0.04f; if (NPC.velocity.Y > 3f) @@ -760,45 +737,22 @@ namespace CalamityMod.NPCs.Signus potionType = ModContent.ItemType(); } - public static bool AtFullStrength() => !DownedBossSystem.downedSignus || CalamityWorld.DoGSecondStageCountdown <= 0; - public static bool LastSentinelKilled() => !DownedBossSystem.downedSignus && DownedBossSystem.downedStormWeaver && DownedBossSystem.downedCeaselessVoid; public override void OnKill() { - bool fullStrength = AtFullStrength(); - if (fullStrength) - CalamityGlobalNPC.SetNewBossJustDowned(NPC); - - // If DoG's fight is active, set the timer precisely for DoG phase 2 to spawn - if (CalamityWorld.DoGSecondStageCountdown > 600) - { - CalamityWorld.DoGSecondStageCountdown = 600; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - - // Mark Ceaseless Void as dead - if (fullStrength) - { - DownedBossSystem.downedSignus = true; - CalamityNetcode.SyncWorld(); - } + CalamityGlobalNPC.SetNewBossJustDowned(NPC); + DownedBossSystem.downedSignus = true; + CalamityNetcode.SyncWorld(); } public override void ModifyNPCLoot(NPCLoot npcLoot) { - var fullStrengthDrops = npcLoot.DefineConditionalDropSet(AtFullStrength); - fullStrengthDrops.Add(ItemDropRule.BossBag(ModContent.ItemType())); + npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); // Normal drops: Everything that would otherwise be in the bag LeadingConditionRule normalOnly = new LeadingConditionRule(new Conditions.NotExpert()); - fullStrengthDrops.Add(normalOnly); + npcLoot.Add(normalOnly); { // Weapons int[] weapons = new int[] @@ -821,7 +775,7 @@ namespace CalamityMod.NPCs.Signus OnSuccess(ItemDropRule.Common(ModContent.ItemType()))); } - fullStrengthDrops.Add(ModContent.ItemType(), 10); + npcLoot.Add(ModContent.ItemType(), 10); // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 998b19e3d5..ab9baeabee 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -27,18 +27,9 @@ namespace CalamityMod.NPCs.StormWeaver NPC.npcSlots = 5f; NPC.width = 40; NPC.height = 40; - - // 10% of HP is phase one - bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedStormWeaver; - NPC.lifeMax = notDoGFight ? 825500 : 139750; + NPC.lifeMax = 825500; NPC.LifeMaxNERB(NPC.lifeMax, NPC.lifeMax, 475000); - - // If fought alone, Storm Weaver plays its own theme - if (notDoGFight) - Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; - // If fought as a DoG interlude, keep the DoG music playing - else - Music = CalamityMod.Instance.GetMusicFromMusicMod("ScourgeofTheUniverse") ?? MusicID.Boss3; + Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; // Phase one settings CalamityGlobalNPC global = NPC.Calamity(); diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 0d6dafc993..87a2fa4895 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -63,21 +63,10 @@ namespace CalamityMod.NPCs.StormWeaver NPC.npcSlots = 5f; NPC.width = 74; NPC.height = 74; - - // 10% of HP is phase one - bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedStormWeaver; - NPC.lifeMax = notDoGFight ? 825500 : 139750; + NPC.lifeMax = 825500; NPC.LifeMaxNERB(NPC.lifeMax, NPC.lifeMax, 475000); - - // If fought alone, Storm Weaver plays its own theme - if (notDoGFight) - { - NPC.value = Item.buyPrice(2, 0, 0, 0); - Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; - } - // If fought as a DoG interlude, keep the DoG music playing - else - Music = CalamityMod.Instance.GetMusicFromMusicMod("ScourgeofTheUniverse") ?? MusicID.Boss3; + NPC.value = Item.buyPrice(2, 0, 0, 0); + Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; // Phase one settings CalamityGlobalNPC global = NPC.Calamity(); @@ -262,15 +251,6 @@ namespace CalamityMod.NPCs.StormWeaver if ((double)NPC.position.Y < Main.topWorld + 16f) { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - for (int num957 = 0; num957 < Main.maxNPCs; num957++) { if (Main.npc[num957].active && (Main.npc[num957].type == ModContent.NPCType() @@ -285,15 +265,6 @@ namespace CalamityMod.NPCs.StormWeaver if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 10000f && NPC.life > 0) { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - for (int num957 = 0; num957 < Main.maxNPCs; num957++) { if (Main.npc[num957].type == ModContent.NPCType() @@ -933,45 +904,22 @@ namespace CalamityMod.NPCs.StormWeaver return false; } - public static bool AtFullStrength() => !DownedBossSystem.downedSignus || CalamityWorld.DoGSecondStageCountdown <= 0; - public static bool LastSentinelKilled() => !DownedBossSystem.downedSignus && DownedBossSystem.downedStormWeaver && DownedBossSystem.downedCeaselessVoid; public override void OnKill() { - bool fullStrength = AtFullStrength(); - if (fullStrength) - CalamityGlobalNPC.SetNewBossJustDowned(NPC); - - // If DoG's fight is active, set the timer for Signus' phase - if (CalamityWorld.DoGSecondStageCountdown > 7260) - { - CalamityWorld.DoGSecondStageCountdown = 7260; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = Mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - - // Mark Ceaseless Void as dead - if (fullStrength) - { - DownedBossSystem.downedStormWeaver = true; - CalamityNetcode.SyncWorld(); - } + CalamityGlobalNPC.SetNewBossJustDowned(NPC); + DownedBossSystem.downedStormWeaver = true; + CalamityNetcode.SyncWorld(); } public override void ModifyNPCLoot(NPCLoot npcLoot) { - var fullStrengthDrops = npcLoot.DefineConditionalDropSet(AtFullStrength); - fullStrengthDrops.Add(ItemDropRule.BossBag(ModContent.ItemType())); + npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); // Normal drops: Everything that would otherwise be in the bag LeadingConditionRule normalOnly = new LeadingConditionRule(new Conditions.NotExpert()); - fullStrengthDrops.Add(normalOnly); + npcLoot.Add(normalOnly); { // Weapons int[] weapons = new int[] @@ -993,7 +941,7 @@ namespace CalamityMod.NPCs.StormWeaver OnSuccess(ItemDropRule.Common(ModContent.ItemType()))); } - fullStrengthDrops.Add(ModContent.ItemType(), 10); + npcLoot.Add(ModContent.ItemType(), 10); // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 29d68e1921..493aa48334 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -28,18 +28,9 @@ namespace CalamityMod.NPCs.StormWeaver NPC.npcSlots = 5f; NPC.width = 48; NPC.height = 80; - - // 10% of HP is phase one - bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !DownedBossSystem.downedStormWeaver; - NPC.lifeMax = notDoGFight ? 825500 : 139750; + NPC.lifeMax = 825500; NPC.LifeMaxNERB(NPC.lifeMax, NPC.lifeMax, 475000); - - // If fought alone, Storm Weaver plays its own theme - if (notDoGFight) - Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; - // If fought as a DoG interlude, keep the DoG music playing - else - Music = CalamityMod.Instance.GetMusicFromMusicMod("ScourgeofTheUniverse") ?? MusicID.Boss3; + Music = CalamityMod.Instance.GetMusicFromMusicMod("Weaver") ?? MusicID.Boss3; // Phase one settings NPC.takenDamageMultiplier = 2f; diff --git a/Projectiles/Boss/DoGP1EndPortal.cs b/Projectiles/Boss/DoGP1EndPortal.cs index 40ed95a21e..2039c65d9b 100644 --- a/Projectiles/Boss/DoGP1EndPortal.cs +++ b/Projectiles/Boss/DoGP1EndPortal.cs @@ -1,4 +1,5 @@ -using CalamityMod.World; +using CalamityMod.NPCs; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.Collections.Generic; @@ -32,6 +33,13 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + if (CalamityGlobalNPC.DoGHead < 0 || !Main.npc[CalamityGlobalNPC.DoGHead].active) + { + Projectile.active = false; + Projectile.netUpdate = true; + return; + } + if (TimeCountdown > 0f) { if (TimeCountdown > 120f) @@ -41,9 +49,9 @@ namespace CalamityMod.Projectiles.Boss TimeCountdown--; } else - Projectile.scale = Utils.GetLerpValue(60000f, 59945f, Projectile.timeLeft, true) * Utils.GetLerpValue(60f, 115f, CalamityWorld.DoGSecondStageCountdown, true); + Projectile.scale = Utils.GetLerpValue(60000f, 59945f, Projectile.timeLeft, true) * Utils.GetLerpValue(60f, 115f, Main.npc[CalamityGlobalNPC.DoGHead].localAI[2], true); - if ((CalamityWorld.DoGSecondStageCountdown < 60f && TimeCountdown == 0f) || NPCs.CalamityGlobalNPC.DoGHead == -1 || TimeCountdown == 1f) + if ((Main.npc[CalamityGlobalNPC.DoGHead].localAI[2] < 60f && TimeCountdown == 0f) || CalamityGlobalNPC.DoGHead == -1 || TimeCountdown == 1f) Projectile.Kill(); } diff --git a/Projectiles/Enemy/TornadoHostile.cs b/Projectiles/Enemy/TornadoHostile.cs index d81043ed09..c622a04700 100644 --- a/Projectiles/Enemy/TornadoHostile.cs +++ b/Projectiles/Enemy/TornadoHostile.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Enemy Vector2 vector146 = Vector2.Lerp(value72, value73, 0.5f); Vector2 value74 = new Vector2(0f, value73.Y - value72.Y); value74.X = value74.Y * 0.2f; - Projectile.width = (int)(value74.X * 0.65f); + Projectile.width = (int)(value74.X * (Projectile.ai[1] == 1f ? 0.325f : 0.65f)); Projectile.height = (int)value74.Y; Projectile.Center = vector146; if (Projectile.owner == Main.myPlayer) diff --git a/Scenes/DoGPhase2DelayScene.cs b/Scenes/DoGPhase2DelayScene.cs index e201850903..4bb1489e48 100644 --- a/Scenes/DoGPhase2DelayScene.cs +++ b/Scenes/DoGPhase2DelayScene.cs @@ -1,4 +1,4 @@ -using CalamityMod.World; +using CalamityMod.NPCs; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,6 +10,12 @@ namespace CalamityMod.Systems public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("DevourerOfGodsP2") ?? MusicID.LunarBoss; public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; - public override bool IsSceneEffectActive(Player player) => CalamityWorld.DoGSecondStageCountdown <= 530 && CalamityWorld.DoGSecondStageCountdown > 50; + public override bool IsSceneEffectActive(Player player) + { + if (CalamityGlobalNPC.DoGHead < 0 || !Main.npc[CalamityGlobalNPC.DoGHead].active) + return false; + + return Main.npc[CalamityGlobalNPC.DoGHead].localAI[2] <= 530f && Main.npc[CalamityGlobalNPC.DoGHead].localAI[2] > 50f; + } } } diff --git a/Systems/MiscWorldStateSystem.cs b/Systems/MiscWorldStateSystem.cs index 3bca53d6a1..bdb87b87c0 100644 --- a/Systems/MiscWorldStateSystem.cs +++ b/Systems/MiscWorldStateSystem.cs @@ -45,7 +45,6 @@ namespace CalamityMod CalamityGlobalNPC.draedonExoMechWorm = -1; CalamityGlobalNPC.adultEidolonWyrmHead = -1; BossRushEvent.BossRushStage = 0; - DoGSecondStageCountdown = 0; ArmoredDiggerSpawnCooldown = 0; BossRushEvent.BossRushActive = false; BossRushEvent.BossRushSpawnCountdown = 180; diff --git a/Systems/WorldMiscUpdateSystem.cs b/Systems/WorldMiscUpdateSystem.cs index 479a68dccd..e63ff0e210 100644 --- a/Systems/WorldMiscUpdateSystem.cs +++ b/Systems/WorldMiscUpdateSystem.cs @@ -79,9 +79,6 @@ namespace CalamityMod.Systems // Update Boss Rush. BossRushEvent.Update(); - // Handle Phase 2 DoG's summon-code, for his sentinels. - HandleDoGP2Countdown(player); - // Handle conditional summons. TrySpawnArmoredDigger(player, modPlayer); TrySpawnDungeonGuardian(player); @@ -347,36 +344,6 @@ namespace CalamityMod.Systems } #endregion - #region Handle Phase 2 DoG's Summoning - public static void HandleDoGP2Countdown(Player player) - { - // Reset the DoG P2 transition countdown if DoG is not present. - if (CalamityGlobalNPC.DoGHead == -1) - DoGSecondStageCountdown = 0; - - if (DoGSecondStageCountdown <= 0) - return; - - DoGSecondStageCountdown--; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (DoGSecondStageCountdown == 21540) - CalamityUtils.SpawnBossBetter(player.Center, ModContent.NPCType(), new OffscreenBossSpawnContext()); - if (DoGSecondStageCountdown == 14340) - CalamityUtils.SpawnBossBetter(player.Center, ModContent.NPCType(), new OffscreenBossSpawnContext()); - if (DoGSecondStageCountdown == 7140) - CalamityUtils.SpawnBossBetter(player.Center, ModContent.NPCType(), new OffscreenBossSpawnContext()); - } - if (Main.netMode == NetmodeID.Server) - { - var netMessage = CalamityMod.Instance.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(DoGSecondStageCountdown); - netMessage.Send(); - } - } - #endregion - #region Handle Armored Digger Random Spawns public static void TrySpawnArmoredDigger(Player player, CalamityPlayer modPlayer) { @@ -400,7 +367,7 @@ namespace CalamityMod.Systems if (Main.SceneMetrics.WaterCandleCount > 0) spawnRate *= 0.8D; - if (modPlayer.bossZen || DoGSecondStageCountdown > 0) + if (modPlayer.bossZen) spawnRate *= 50D; if (modPlayer.zen || (CalamityConfig.Instance.DisableExpertTownSpawns && player.townNPCs > 1f && Main.expertMode)) spawnRate *= 2D; @@ -411,12 +378,6 @@ namespace CalamityMod.Systems if (Main.SceneMetrics.PeaceCandleCount > 0) spawnRate *= 1.25D; - // TODO -- Draedon's remote appears to not exist as of 1.4 porting. Is this intentional or did something go wrong? - /* - if (player.HasItem(ModContent.ItemType())) - spawnRate *= 5D; - */ - int chance = (int)spawnRate; if (Main.rand.NextBool(chance)) { diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index df2cf8bc22..45c8fbf920 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -15,7 +15,6 @@ namespace CalamityMod.World public static class CalamityWorld { #region Vars - public static int DoGSecondStageCountdown = 0; private const int saveVersion = 0; public static int ArmoredDiggerSpawnCooldown = 0; public static int MoneyStolenByBandit = 0;