From d7d2edb649975b3c7fc99144a20df02b91971b8e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 23 May 2024 12:02:34 -0400 Subject: [PATCH] Internally renamed King Slime's jewels --- CalamityLists.cs | 12 ++++++------ DataStructures/NPCStats.cs | 4 ++-- Events/BossRushEvent.cs | 4 ++-- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 4 ++++ ModSupport/WeakReferenceSupport.cs | 6 +++--- NPCs/CalamityGlobalNPC.cs | 2 +- ...ngSlimeJewel3.cs => KingSlimeJewelEmerald.cs} | 2 +- .../{KingSlimeJewel.cs => KingSlimeJewelRuby.cs} | 4 +++- ...gSlimeJewel2.cs => KingSlimeJewelSapphire.cs} | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs | 16 ++++++++-------- Utilities/NPCDebuffs.cs | 6 +++--- 11 files changed, 34 insertions(+), 28 deletions(-) rename NPCs/NormalNPCs/{KingSlimeJewel3.cs => KingSlimeJewelEmerald.cs} (99%) rename NPCs/NormalNPCs/{KingSlimeJewel.cs => KingSlimeJewelRuby.cs} (98%) rename NPCs/NormalNPCs/{KingSlimeJewel2.cs => KingSlimeJewelSapphire.cs} (99%) diff --git a/CalamityLists.cs b/CalamityLists.cs index 0e29515d35..b8ebd102e5 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -901,9 +901,9 @@ namespace CalamityMod enemyImmunityList = new List() { NPCID.KingSlime, - NPCType(), - NPCType(), - NPCType(), + NPCType(), + NPCType(), + NPCType(), NPCID.EaterofWorldsHead, NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, @@ -2428,9 +2428,9 @@ namespace CalamityMod { NPCID.UmbrellaSlime, 5400 }, { NPCID.RainbowSlime, 30000 }, { NPCID.Pinky, 15000 }, - { NPCType(), 21000 }, - { NPCType(), 18000 }, - { NPCType(), 24000 }, + { NPCType(), 21000 }, + { NPCType(), 18000 }, + { NPCType(), 24000 }, { NPCID.EyeofCthulhu, 450000 }, // 30 seconds { NPCID.ServantofCthulhu, 6000 }, diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 70bc44c14e..0aec9726b2 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -295,7 +295,7 @@ namespace CalamityMod EnemyStats.ContactDamageValues = new SortedDictionary { { NPCID.KingSlime, new int[] { 40, 64, 80, 96, 144 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, { ModContent.NPCType(), new int[] { 45, 66, 88, 110, 165 } }, { ModContent.NPCType(), new int[] { 24, 32, 40, 48, 72 } }, @@ -561,7 +561,7 @@ namespace CalamityMod EnemyStats.ProjectileDamageValues = new SortedDictionary, int[]> { - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 6da1815a4d..5c8491e682 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -150,8 +150,8 @@ namespace CalamityMod.Events DownedBossSystem.startedBossRushAtLeastOnce = true; }, permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime, - NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType(), - ModContent.NPCType(), ModContent.NPCType() }), + NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType(), + ModContent.NPCType(), ModContent.NPCType() }), new Boss(ModContent.NPCType(), spawnContext: type => { diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 1d7421b644..42d943f37f 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -623,3 +623,7 @@ WITCH: { Princess_LovesNPC: "{NPCName} is always lonely, it's why I want to hang out with her, no one should be left alone like that!" } } + +KingSlimeJewelEmerald.DisplayName: King Slime Jewel Emerald +KingSlimeJewelRuby.DisplayName: King Slime Jewel Ruby +KingSlimeJewelSapphire.DisplayName: King Slime Jewel Sapphire diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 086ae693e4..16293e26d9 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -296,9 +296,9 @@ namespace CalamityMod // Enemies EnemyRedirect(NPCType(), "Hive (enemy)"); - EnemyRedirect(NPCType(), "Ruby Jewel (enemy)"); - EnemyRedirect(NPCType(), "Sapphire Jewel (enemy)"); - EnemyRedirect(NPCType(), "Emerald Jewel (enemy)"); + EnemyRedirect(NPCType(), "Crown Jewels"); + EnemyRedirect(NPCType(), "Crown Jewels"); + EnemyRedirect(NPCType(), "Crown Jewels"); EnemyRedirect(NPCType(), "Tooth Ball (Old Duke)"); EnemyRedirect(NPCType(), "Enchantment"); EnemyRedirect(NPCType(), "%3F%3F%3F"); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5cb59af057..3ae1aabefa 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6474,7 +6474,7 @@ namespace CalamityMod.NPCs return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR); if (npc.type == NPCID.KingSlime && Main.masterMode && CalamityWorld.revenge) - return NPC.AnyNPCs(ModContent.NPCType()) ? Color.Lerp(new Color(0, 0, 150, npc.alpha), new Color(125, 125, 255, npc.alpha), (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 0.5f) : null; + return NPC.AnyNPCs(ModContent.NPCType()) ? Color.Lerp(new Color(0, 0, 150, npc.alpha), new Color(125, 125, 255, npc.alpha), (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 0.5f) : null; if (npc.type == NPCID.QueenBee && Main.zenithWorld) { diff --git a/NPCs/NormalNPCs/KingSlimeJewel3.cs b/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs similarity index 99% rename from NPCs/NormalNPCs/KingSlimeJewel3.cs rename to NPCs/NormalNPCs/KingSlimeJewelEmerald.cs index 531da13e74..5d5160792f 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel3.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelEmerald.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class KingSlimeJewel3 : ModNPC + public class KingSlimeJewelEmerald : ModNPC { public override string Texture => "CalamityMod/NPCs/NormalNPCs/KingSlimeJewel"; diff --git a/NPCs/NormalNPCs/KingSlimeJewel.cs b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs similarity index 98% rename from NPCs/NormalNPCs/KingSlimeJewel.cs rename to NPCs/NormalNPCs/KingSlimeJewelRuby.cs index c9eb84f9d6..327d1d0054 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs @@ -10,8 +10,10 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class KingSlimeJewel : ModNPC + public class KingSlimeJewelRuby : ModNPC { + public override string Texture => "CalamityMod/NPCs/NormalNPCs/KingSlimeJewel"; + private const int BoltShootGateValue = 60; private const int BoltShootGateValue_Death = 75; private const int BoltShootGateValue_BossRush = 45; diff --git a/NPCs/NormalNPCs/KingSlimeJewel2.cs b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs similarity index 99% rename from NPCs/NormalNPCs/KingSlimeJewel2.cs rename to NPCs/NormalNPCs/KingSlimeJewelSapphire.cs index 254ef1471e..a41db05782 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel2.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs @@ -11,7 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class KingSlimeJewel2 : ModNPC + public class KingSlimeJewelSapphire : ModNPC { public override string Texture => "CalamityMod/NPCs/NormalNPCs/KingSlimeJewel"; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index c0555e7cae..15bd1a8e83 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -61,16 +61,16 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (spawnGreenCrystal) { if (masterMode) - greenCrystalAlive = NPC.AnyNPCs(ModContent.NPCType()); + greenCrystalAlive = NPC.AnyNPCs(ModContent.NPCType()); } if (phase3) - crystalAlive = NPC.AnyNPCs(ModContent.NPCType()); + crystalAlive = NPC.AnyNPCs(ModContent.NPCType()); if (spawnBlueCrystal) { if (masterMode) - blueCrystalAlive = NPC.AnyNPCs(ModContent.NPCType()); + blueCrystalAlive = NPC.AnyNPCs(ModContent.NPCType()); } // Sapphire Crystal buffs @@ -109,7 +109,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.Item38, vector); if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); + NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); } if (phase3 && npc.Calamity().newAI[0] == 1f) @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.Item38, vector); if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); + NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); } if (spawnBlueCrystal && npc.Calamity().newAI[0] == 2f) @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.Item38, vector); if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); + NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); } } else @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.Item38, vector); if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); + NPC.NewNPC(npc.GetSource_FromAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); } } @@ -340,7 +340,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses for (int i = 0; i < Main.maxNPCs; i++) { NPC blueCrystal = Main.npc[i]; - if (blueCrystal.active && blueCrystal.type == ModContent.NPCType()) + if (blueCrystal.active && blueCrystal.type == ModContent.NPCType()) { blueCrystal.position.X = npc.position.X; blueCrystal.position.Y = npc.position.Y - 200f; diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index c66dbc74d2..ff965a1105 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -168,9 +168,9 @@ namespace CalamityMod // Is this sorted... like... at all?? EnemyStats.DebuffImmunities = new SortedDictionary> { - { ModContent.NPCType(), immuneToEverything }, - { ModContent.NPCType(), immuneToEverything }, - { ModContent.NPCType(), immuneToEverything }, + { ModContent.NPCType(), immuneToEverything }, + { ModContent.NPCType(), immuneToEverything }, + { ModContent.NPCType(), immuneToEverything }, { NPCID.Deerclops, ice },