From 1dace3327cb40946ea774668186bd4d10b07449f Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 29 Jul 2023 21:37:40 -0700 Subject: [PATCH] Vanilla Armor melee speed balancing Gi - 10% MS replaced with 10% jump speed Cobalt Set Bonus - Reduced to 10% MS Adamantite Set Bonus - reduced MS to 15% Titanium Helm - Buffed MS to 14% Beetle Armor - Removed melee speed from the stacking beetles buff entirely --- Buffs/CalamityGlobalBuff.cs | 16 +++++++++-- CalPlayer/CalamityPlayer.cs | 2 +- Items/CalamityGlobalItem.cs | 9 ++++++ Items/CalamityGlobalItemTooltip.cs | 28 +++++++++++++------ .../AdamantiteArmorSetChange.cs | 2 ++ .../CobaltArmorSetChange.cs | 2 ++ 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index f36f450428..c85fc50ea3 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -81,6 +81,18 @@ namespace CalamityMod.Buffs { player.GetDamage() -= 0.2f; } + else if (type == BuffID.BeetleMight1) + { + player.GetAttackSpeed() -= 0.1f; + } + else if (type == BuffID.BeetleMight2) + { + player.GetAttackSpeed() -= 0.2f; + } + else if (type == BuffID.BeetleMight3) + { + player.GetAttackSpeed() -= 0.3f; + } } public override void Update(int type, NPC npc, ref int buffIndex) @@ -157,7 +169,7 @@ namespace CalamityMod.Buffs tip = "22.5% increased damage"; break; - /*case BuffID.BeetleMight1: + case BuffID.BeetleMight1: tip = "Melee damage increased by 10%"; break; @@ -167,7 +179,7 @@ namespace CalamityMod.Buffs case BuffID.BeetleMight3: tip = "Melee damage increased by 30%"; - break;*/ + break; case BuffID.BeetleEndurance1: tip = "Damage taken reduced by 10%"; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 200d40d815..bba1dc1e39 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -3203,7 +3203,7 @@ namespace CalamityMod.CalPlayer // Nerfs the effectiveness of Beetle Scale Mail. if (Player.beetleOffense && Player.beetleOrbs > 0) - meleeSpeedMult -= 0.1f * Player.beetleOrbs; + Player.GetAttackSpeed() -= 0.1f * Player.beetleOrbs; if (GemTechSet && GemTechState.IsYellowGemActive) meleeSpeedMult += GemTechHeadgear.MeleeSpeedBoost; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index e2f64d663e..30ba5a652a 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1021,6 +1021,15 @@ namespace CalamityMod.Items player.GetCritChance() -= 1; break; + case ItemID.Gi: + player.GetAttackSpeed() -= 0.1f; + player.jumpSpeedBoost += 0.5f; + break; + + case ItemID.TitaniumMask: + player.GetAttackSpeed() += 0.05f; + break; + case ItemID.SquireGreatHelm: player.lifeRegen -= 3; break; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 4ace5a4bdb..10da4fb617 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -344,7 +344,7 @@ namespace CalamityMod.Items // Aerial Bane is no longer the real bane of aerial enemies (50% dmg bonus removed) if (item.type == ItemID.DD2BetsyBow) EditTooltipByNum(0, (line) => line.Text = "Shoots splitting arrows"); - + // Modify item speed tooltips to use a new scale designed to more accurately reflect practical distributions of item speeds. // Due to the higher complexity of the action, the actual logic is delegated to its own method. // I think this fits the miscellaneous category? Not seeing anything like this elsewhere. - Tomat @@ -393,7 +393,7 @@ namespace CalamityMod.Items { EditTooltipByNum(0, (line) => line.Text += " to summon the Golem\n"); EditTooltipByNum(0, (line) => line.Text += "Enrages outside the Jungle Temple"); - + } if (item.type == ItemID.MechanicalEye || item.type == ItemID.MechanicalSkull || item.type == ItemID.MechanicalWorm || item.type == ItemID.SuspiciousLookingEye) @@ -672,24 +672,24 @@ namespace CalamityMod.Items // Feral Claws line melee speed and true melee damage changes if (item.type == ItemID.FeralClaws) EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("12%", "10%")); - + if (item.type == ItemID.TitanGlove) EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage"); - + if (item.type == ItemID.PowerGlove) { EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("12%", "10%")); EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage"); } - + if (item.type == ItemID.BerserkerGlove) { EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("12% increased melee speed", "10% increased true melee damage")); } if (item.type == ItemID.MechanicalGlove) - EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage"); - + EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage"); + if (item.type == ItemID.FireGauntlet) { EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("fire damage", "Hellfire")); @@ -718,6 +718,10 @@ namespace CalamityMod.Items // Falcon Blade +20% move speed while holding if (item.type == ItemID.FalconBlade) EditTooltipByName("Knockback", (line) => line.Text += "\nHolding this item grants +20% increased movement speed"); + + //Gi 10% melee speed into 10% jump speed replacement + if (item.type == ItemID.Gi) + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("melee", "jump")); #endregion // Pre-Hardmode ore armor tooltip edits @@ -816,6 +820,10 @@ namespace CalamityMod.Items // Adamantite if (item.type == ItemID.AdamantiteHeadgear) EditTooltipByNum(0, (line) => line.Text = $"Increases maximum mana by {AdamantiteArmorSetChange.MaxManaBoost + 80}"); + + // Titanium + if (item.type == ItemID.TitaniumMask) + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("9", "14")); #endregion // DD2 armor tooltip edits @@ -878,7 +886,7 @@ namespace CalamityMod.Items if (item.type == ItemID.SlimeCrown || item.type == ItemID.SuspiciousLookingEye || item.type == ItemID.BloodMoonStarter || item.type == ItemID.GoblinBattleStandard || item.type == ItemID.WormFood || item.type == ItemID.BloodySpine || item.type == ItemID.Abeemination || item.type == ItemID.DeerThing || item.type == ItemID.QueenSlimeCrystal || item.type == ItemID.PirateMap || item.type == ItemID.SnowGlobe || item.type == ItemID.MechanicalEye || item.type == ItemID.MechanicalWorm || item.type == ItemID.MechanicalSkull || - item.type == ItemID.NaughtyPresent ||item.type == ItemID.PumpkinMoonMedallion || item.type == ItemID.SolarTablet ||item.type == ItemID.SolarTablet || item.type == ItemID.CelestialSigil) + item.type == ItemID.NaughtyPresent || item.type == ItemID.PumpkinMoonMedallion || item.type == ItemID.SolarTablet || item.type == ItemID.SolarTablet || item.type == ItemID.CelestialSigil) EditTooltipByNum(0, (line) => line.Text += "\nNot consumable"); #endregion @@ -913,6 +921,10 @@ namespace CalamityMod.Items if ((item.type == ItemID.AncientBattleArmorHat || item.type == ItemID.AncientBattleArmorShirt || item.type == ItemID.AncientBattleArmorPants) && !Main.LocalPlayer.Calamity().forbiddenCirclet) EditTooltipByName("SetBonus", (line) => line.Text += "\nMinions no longer deal less damage while wielding magic weapons"); + + //Beetle Armor melee speed removal + if (item.type == ItemID.BeetleHelmet || item.type == ItemID.BeetleScaleMail || item.type == ItemID.BeetleLeggings) + EditTooltipByName("SetBonus", (line) => line.Text = line.Text.Replace("and speed", "by 10% per beetle")); #endregion // Provide the full stats of every vanilla set of wings diff --git a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs index cd726e457a..0cfc87bd60 100644 --- a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs +++ b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void UpdateSetBonusText(ref string setBonusText) { + setBonusText = setBonusText.Replace("20% increased melee and movement speed", "15% increased melee speed and 20% increased movement speed"); setBonusText += "\nHalf of your current DR is added to your critical strike chance\n" + $"Continuously doing damage makes you gradually gain more and more defense, up to a maximum of {DefenseBoostMax}\n" + "When not doing damage, this bonus gradually decays\n" + @@ -46,6 +47,7 @@ namespace CalamityMod.Items.VanillaArmorChanges break; case ItemID.AdamantiteHelmet: player.GetCritChance() += critBoost; + player.GetAttackSpeed() -= 0.05f; break; case ItemID.AdamantiteMask: player.GetCritChance() += critBoost; diff --git a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs index 87bf0c8f78..786170ac37 100644 --- a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void UpdateSetBonusText(ref string setBonusText) { + setBonusText = setBonusText.Replace("15", "10"); setBonusText += $"\n{SpeedBoostSetBonusPercentage}% increased max speed and acceleration\n" + $"You gain a damage and critical strike chance boost relative to your current movement speed, up to {SpeedBoostSetBonusPercentage}%"; } @@ -51,6 +52,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyArmorSetBonus(Player player) { + player.GetAttackSpeed() -= 0.05f; player.Calamity().CobaltSet = true; } }