From da2bae33f33d67ff2baa7794fd4ef6d43eb3963e Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Mon, 31 Mar 2025 21:15:22 -0500 Subject: [PATCH] Necklace of Vexation adjustments Acid Venom is now always inflicted Damage scales linearly from 0 - 30% based on health lost. This is dynamically reflected in the tooltip --- CalPlayer/CalamityPlayerMiscEffects.cs | 3 +-- CalPlayer/CalamityPlayerOnHit.cs | 5 ----- Items/Accessories/NecklaceofVexation.cs | 10 +++++++++- .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 5 +++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 61765a47e5..1fe9360d8e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3707,8 +3707,7 @@ namespace CalamityMod.CalPlayer if (vexation) { - if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) - Player.GetDamage() += 0.2f; + Player.GetDamage() += 0.3f* (1 - Player.statLife / (float)Player.statLifeMax2); } if (ataxiaBlaze) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index ce4ec856c6..0a0d1df195 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1256,12 +1256,7 @@ namespace CalamityMod.CalPlayer } if (vexation) { - if ((Player.armor[0].type == ItemType() || Player.armor[0].type == ItemType() || - Player.armor[0].type == ItemType()) && Player.armor[1].type == ItemType() && - Player.armor[2].type == ItemType()) - { target.AddBuff(BuffID.Venom, 120, false); - } } } #endregion diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 8b0b948c8a..39d4b09ccd 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -32,5 +33,12 @@ namespace CalamityMod.Items.Accessories AddTile(TileID.MythrilAnvil). Register(); } + + public override void ModifyTooltips(List list) + { + var player = Main.LocalPlayer; + if (player != null) + list.FindAndReplace("[DAMAGE]", (0.3f * (1 - player.statLife / (float)player.statLifeMax2)).ToPercent()); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 7a5feca3d2..7ffe09885a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1155,8 +1155,9 @@ NecklaceofVexation: { DisplayName: Necklace of Vexation Tooltip: ''' - 20% increased damage when under 50% life - All attacks inflict acid venom while wearing Reaver armor + Up to 30% increased damage the lower your life is + Current boost: [DAMAGE]% + All attacks inflict acid venom Revenge ''' }