You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Modules/ModParser.lua
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,18 @@ local m_huge = math.huge
13
13
local function firstToUpper(str)
14
14
return (str:gsub("^%l", string.upper))
15
15
end
16
-
16
+
-- Remove spaces from strings with multiple words and convert first letter to upper case, returns recombined string
17
+
---@param str string @string that is to be split and combined
18
+
---@param sepPattern? string @[optional]pattern that is used for separating the string "%S+" as default for "space"
19
+
---@return string
20
+
local function combineToUpper(str, sepPattern)
21
+
sepPattern = sepPattern or "%S+" -- assume "space" as default separator
22
+
local outStr = ""
23
+
for word in string.gmatch(str, sepPattern) do
24
+
outStr = outStr .. firstToUpper(word)
25
+
end
26
+
return outStr
27
+
end
17
28
-- Radius jewels that modify other nodes
18
29
local function getSimpleConv(srcList, dst, type, remove, factor)
19
30
return function(node, out, data)
@@ -2764,6 +2775,8 @@ local specialModList = {
2764
2775
["(%d+)%% increased magnitude of unholy might buffs you grant per (%d+) maximum mana"] = function(num, _, num2) return { mod("ExtraAura", "LIST", { mod = mod("Multiplier:UnholyMightMagnitude", "BASE", num, { type = "PerStat", stat = "Mana", div = tonumber(num2), actor = "parent"}), { type = "GlobalEffect", effectName = "BlackenedHeart", effectType = "Aura", unscaleable = true}}) } end,
2765
2776
["non%-channelling spells cost an additional (%d+)%% of maximum energy shield"] = function(num) return { mod("ESCostBase", "BASE", 1, nil, 0, KeywordFlag.Spell, { type = "PercentStat", percent = num, stat = "EnergyShield" }, { type = "SkillType", skillType = SkillType.Channel, neg = true } )} end,
2766
2777
["non%-channelling spells consume power charges to deal (%d+)%% more damage"] = function(num) return { mod("Damage", "MORE", num, nil, 0,KeywordFlag.Spell, { type = "SkillType", skillType = SkillType.Channel, neg = true }, { type = "MultiplierThreshold", var = "RemovablePowerCharge", threshold = 1 })} end,
2778
+
["no inherent mana regeneration"] = { flag("Condition:NoInherentManaRegen") },
2779
+
["regenerate (%D+) equal to (%d+)%% of maximum (%D+) per second"] = function(_, resource1, num, resource2) return { mod( combineToUpper(resource1) .. "Regen", "BASE", 1, { type = "PercentStat", stat = combineToUpper(resource2), percent = num } )} end,
0 commit comments