From f40d550fd81c00fe099909cbc3518fd105eba2b9 Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Wed, 3 Jun 2026 22:20:37 +1000 Subject: [PATCH] Fix some bonded Rune affects applying without the needed Ascendancy The logic for combining Rune stats on gear wasn't check to see if a mod was bonded before merging the stat We now use a separate key so they no longer merge with each other but will merge correctly with other rune mods of the same type --- spec/System/TestItemParse_spec.lua | 16 ++++++++++++++++ src/Classes/Item.lua | 7 ++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/spec/System/TestItemParse_spec.lua b/spec/System/TestItemParse_spec.lua index 4bb78fd15..ea1222641 100644 --- a/spec/System/TestItemParse_spec.lua +++ b/spec/System/TestItemParse_spec.lua @@ -460,6 +460,22 @@ describe("TestItemParse", function() end end) + it("keeps bonded rune stats separate from normal rune stats", function() + local item = new("Item", [[ + Rarity: Rare + Test Body + Rusted Cuirass + ]]) + item.itemSocketCount = 1 + item.runes = { "Lesser Body Rune" } + item:UpdateRunes() + + assert.are.equals(3, #item.runeModLines) + assert.are.equals("+30 to maximum Life", item.runeModLines[1].line) + assert.are.equals("Bonded: +20 to maximum Life", item.runeModLines[2].line) + assert.are.equals("Bonded: +20 to maximum Mana", item.runeModLines[3].line) + end) + it("multi-line rune mod", function() -- Thruldana is Bow-only as well local item = new("Item", [[ diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index 764d2afc5..1d93ba112 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -1519,10 +1519,11 @@ function ItemClass:UpdateRunes() for _, mod in ipairs(gatheredMods) do for i, modLine in ipairs(mod) do local order = mod.statOrder[i] - if statOrder[order] then + local orderKey = modLine:match("^Bonded:") and "Bonded:"..order or order + if statOrder[orderKey] then -- Combine stats local start = 1 - statOrder[order].line = statOrder[order].line:gsub("(%d%.?%d*)", function(num) + statOrder[orderKey].line = statOrder[orderKey].line:gsub("(%d%.?%d*)", function(num) local s, e, other = mod[i]:find("(%d%.?%d*)", start) start = e + 1 return tonumber(num) + tonumber(other) @@ -1535,7 +1536,7 @@ function ItemClass:UpdateRunes() break end end - statOrder[order] = modLine + statOrder[orderKey] = modLine end end end