Skip to content

Commit 1aa95bf

Browse files
authored
Add support for "Soulless Form" (Lich Ascendancy Notable) (#877)
Co-authored-by: majochem <majochem@users.noreply.github.com>
1 parent 6ba1be4 commit 1aa95bf

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Modules/CalcSetup.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ function calcs.initEnv(build, mode, override, specEnv)
554554
calcs.initModDB(env, modDB)
555555
modDB:NewMod("Life", "BASE", 12, "Base", { type = "Multiplier", var = "Level", base = 16 })
556556
modDB:NewMod("Mana", "BASE", 4, "Base", { type = "Multiplier", var = "Level", base = 30 })
557-
modDB:NewMod("ManaRegen", "BASE", 0.04, "Base", { type = "PerStat", stat = "Mana", div = 1 })
557+
modDB:NewMod("ManaRegen", "BASE", 0.04, "Base", { type = "PerStat", stat = "Mana", div = 1 }, { type = "Condition", var = "NoInherentManaRegen", neg = true })
558558
modDB:NewMod("Spirit", "BASE", 0, "Base")
559559
modDB:NewMod("Devotion", "BASE", 0, "Base")
560560
modDB:NewMod("Evasion", "BASE", 3, "Base", { type = "Multiplier", var = "Level", base = 27 })

src/Modules/ModParser.lua

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ local m_huge = math.huge
1313
local function firstToUpper(str)
1414
return (str:gsub("^%l", string.upper))
1515
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
1728
-- Radius jewels that modify other nodes
1829
local function getSimpleConv(srcList, dst, type, remove, factor)
1930
return function(node, out, data)
@@ -2764,6 +2775,8 @@ local specialModList = {
27642775
["(%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,
27652776
["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,
27662777
["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,
27672780
-- Mercenary
27682781
-- +2 Weapon Set Passive Skill Points
27692782
["%+(%d) weapon set passive skill points"] = function(num) return { mod("WeaponSetPassivePoints", "BASE", num) } end,
@@ -5501,6 +5514,7 @@ local flagTypes = {
55015514
["chilled"] = "Condition:Chilled",
55025515
["blinded"] = "Condition:Blinded",
55035516
["no life regeneration"] = "NoLifeRegen",
5517+
["no inherent mana regeneration"] = "Condition:NoInherentManaRegen",
55045518
["hexproof"] = { name = "CurseEffectOnSelf", value = -100, type = "MORE" },
55055519
["hindered,? with (%d+)%% reduced movement speed"] = "Condition:Hindered",
55065520
["unnerved"] = "Condition:Unnerved",

0 commit comments

Comments
 (0)