From 82c723b0354ce7b278b83d15c5b7b9bdd0f12a85 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Thu, 16 Jun 2022 00:04:11 -0400 Subject: [PATCH] Use gsub for Void stat increase {1} --- eid_modifiers.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eid_modifiers.lua b/eid_modifiers.lua index 4ddf508d..da5a57a4 100644 --- a/eid_modifiers.lua +++ b/eid_modifiers.lua @@ -125,7 +125,11 @@ local function VoidCallback(descObj, isRune) EID:appendToDescription(descObj, "#" .. prefix .. voidIntro .. "#") for i,v in ipairs(increases) do if v > 0 then - EID:appendToDescription(descObj, "↑ " .. voidStatIcons[i] .. " +" .. string.format("%.4g",v*voidStatUps[i]) .. " " .. voidNames[i] .. "#") + local statIncreaseStr = "↑ " .. voidStatIcons[i] .. " " .. voidNames[i] .. "#" + local replaceCount = 0 + statIncreaseStr, replaceCount = string.gsub(statIncreaseStr, "{1}", "+" .. string.format("%.4g",v*voidStatUps[i])) + if replaceCount == 0 then statIncreaseStr = "↑ " .. voidStatIcons[i] .. " +" .. string.format("%.4g",v*voidStatUps[i]) .. " " .. voidNames[i] .. "#" end + EID:appendToDescription(descObj, statIncreaseStr) end end -- Print unique synergies with Void and Active Items