From 4fc6533f047a7d4e285de51b680b4c85e7160de3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 5 Feb 2024 23:11:22 -0500 Subject: [PATCH] Mage Hat and Robe nerfs Wizard Hat: Set bonus magic crit chance 10% -> 4% Magic Hat: No magic damage, magic crit chance 5% -> 6% (vanilla value), set bonus max mana 60 -> 40 Amethyst: Mana cost 5% -> 4% Topaz: Max mana 40 -> 20, mana cost 7% -> 5% Sapphire: Mana cost 9% -> 6% Emerald: Max mana 60 -> 40, mana cost 11% -> 7% Ruby/Amber: Mana cost 13% -> 8% Diamond: Max mana 80 -> 60, mana cost 15% -> 9% --- Items/CalamityGlobalItem.cs | 45 ++++++++++++++++++- Items/CalamityGlobalItemTooltip.cs | 25 ++++++++++- .../JungleArmorSetChange.cs | 2 +- .../Mods.CalamityMod.Vanilla.Armor.hjson | 2 + 4 files changed, 70 insertions(+), 4 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 4cdcdf7210..81c8f3fb74 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -935,6 +935,10 @@ namespace CalamityMod.Items if (!string.IsNullOrEmpty(managedArmorSetName)) return managedArmorSetName; + if (head.type == ItemID.WizardHat && (body.type == ItemID.AmethystRobe || body.type == ItemID.TopazRobe || body.type == ItemID.SapphireRobe || body.type == ItemID.EmeraldRobe || body.type == ItemID.RubyRobe || body.type == ItemID.DiamondRobe || body.type == ItemID.AmberRobe)) + return "WizardHat"; + if (head.type == ItemID.MagicHat && (body.type == ItemID.AmethystRobe || body.type == ItemID.TopazRobe || body.type == ItemID.SapphireRobe || body.type == ItemID.EmeraldRobe || body.type == ItemID.RubyRobe || body.type == ItemID.DiamondRobe || body.type == ItemID.AmberRobe)) + return "MagicHat"; if (head.type == ItemID.CrystalNinjaHelmet && body.type == ItemID.CrystalNinjaChestplate && legs.type == ItemID.CrystalNinjaLeggings) return "CrystalAssassin"; if (head.type == ItemID.SquireGreatHelm && body.type == ItemID.SquirePlating && legs.type == ItemID.SquireGreaves) @@ -964,6 +968,16 @@ namespace CalamityMod.Items VanillaArmorChangeManager.CreateTooltipManuallyAsNecessary(player); VanillaArmorChangeManager.ApplyPotentialEffectsTo(player); + if (set == "WizardHat") + { + player.GetCritChance() -= 6; + player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.Wizard"); + } + if (set == "MagicHat") + { + player.statManaMax2 -= 20; + player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.MagicHat"); + } if (set == "CrystalAssassin") { player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.CrystalAssassin"); @@ -1034,8 +1048,35 @@ namespace CalamityMod.Items switch (item.type) { case ItemID.MagicHat: - player.GetDamage() -= 0.01f; - player.GetCritChance() -= 1; + player.GetDamage() -= 0.06f; + break; + + case ItemID.AmethystRobe: + player.manaCost += 0.01f; // 5% to 4% + break; + + case ItemID.TopazRobe: + player.statManaMax2 -= 20; + player.manaCost += 0.02f ; // 7% to 5% + break; + + case ItemID.SapphireRobe: + player.manaCost += 0.03f; // 9% to 6% + break; + + case ItemID.EmeraldRobe: + player.statManaMax2 -= 20; + player.manaCost += 0.04f; // 11% to 7% + break; + + case ItemID.RubyRobe: + case ItemID.AmberRobe: + player.manaCost += 0.05f; // 13% to 8% + break; + + case ItemID.DiamondRobe: + player.statManaMax2 -= 20; + player.manaCost += 0.06f; // 15% to 9% break; case ItemID.Gi: diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 30dbdb254b..abc9ae40cf 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -664,7 +664,30 @@ namespace CalamityMod.Items // Magic Hat nerf if (item.type == ItemID.MagicHat) - EditTooltipByNum(0, (line) => line.Text = "5% increased magic damage and critical strike chance"); + EditTooltipByNum(0, (line) => line.Text = "6% increased magic critical strike chance"); + + // Gem Robe nerfs + if (item.type == ItemID.AmethystRobe) + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("5%", "4%")); + if (item.type == ItemID.TopazRobe) + { + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40", "20")); + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("7%", "5%")); + } + if (item.type == ItemID.SapphireRobe) + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("9%", "6%")); + if (item.type == ItemID.EmeraldRobe) + { + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("60", "40")); + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("11%", "7%")); + } + if (item.type == ItemID.RubyRobe || item.type == ItemID.AmberRobe) + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("13%", "8%")); + if (item.type == ItemID.DiamondRobe) + { + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("80", "60")); + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("15%", "9%")); + } // Worm Scarf only gives 10% DR instead of 17% if (item.type == ItemID.WormScarf) diff --git a/Items/VanillaArmorChanges/JungleArmorSetChange.cs b/Items/VanillaArmorChanges/JungleArmorSetChange.cs index 3952c3415f..984f95c349 100644 --- a/Items/VanillaArmorChanges/JungleArmorSetChange.cs +++ b/Items/VanillaArmorChanges/JungleArmorSetChange.cs @@ -36,6 +36,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyLegPieceEffect(Player player) => player.GetCritChance() -= 3; - public override void ApplyArmorSetBonus(Player player) => player.manaCost *= 1.0714f; // Reduces to -10% mana cost + public override void ApplyArmorSetBonus(Player player) => player.manaCost += 0.06f; // Reduces to -10% mana cost } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 3e3504c607..51e2c3c33b 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -111,6 +111,8 @@ SetBonus: { Increases all knockback by 33%, this counts for the above boost Current bonus: {0}% critical strike chance from {1} knockback ''' + MagicHat: Increases maximum mana by 40 + Wizard: 4% increased magic critical strike chance CrystalAssassin: ''' Allows the ability to dash