Fix Might of the Meek not working with Light of Meaning (#9220)

* Fix interaction caused by string parsing not parsing to

There's a type check when calculating Increased Effect that needs the value to be "number".

* regex instead of hardcode

* Fix missing tonumber values

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
NL
2025-11-17 23:06:47 -05:00
committed by GitHub
parent 15876b736c
commit 3c50e8ae14

View File

@@ -5718,7 +5718,7 @@ local jewelOtherFuncs = {
["(%d+)%% increased Effect of non%-Keystone Passive Skills in Radius"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "ClassStart" then
out:NewMod("PassiveSkillEffect", "INC", num, data.modSource)
out:NewMod("PassiveSkillEffect", "INC", tonumber(num), data.modSource)
end
end
end,
@@ -5730,7 +5730,7 @@ local jewelOtherFuncs = {
["(%d+)%% increased effect of Tattoos in Radius"] = function(num)
return function(node, out, data)
if node and node.isTattoo then
out:NewMod("PassiveSkillEffect", "INC", num, data.modSource)
out:NewMod("PassiveSkillEffect", "INC", tonumber(num), data.modSource)
end
end
end,
@@ -5742,15 +5742,15 @@ local jewelOtherFuncs = {
["Passive Skills in Radius also grant: Traps and Mines deal (%d+) to (%d+) added Physical Damage"] = function(min, max)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "ClassStart" then
out:NewMod("PhysicalMin", "BASE", min, data.modSource, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine))
out:NewMod("PhysicalMax", "BASE", max, data.modSource, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine))
out:NewMod("PhysicalMin", "BASE", tonumber(min), data.modSource, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine))
out:NewMod("PhysicalMax", "BASE", tonumber(max), data.modSource, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine))
end
end
end,
["Passive Skills in Radius also grant: (%d+)%% increased Unarmed Attack Speed with Melee Skills"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "ClassStart" then
out:NewMod("Speed", "INC", num, data.modSource, bor(ModFlag.Unarmed, ModFlag.Attack, ModFlag.Melee))
out:NewMod("Speed", "INC", tonumber(num), data.modSource, bor(ModFlag.Unarmed, ModFlag.Attack, ModFlag.Melee))
end
end
end,
@@ -5764,59 +5764,59 @@ local jewelOtherFuncs = {
["Passive Skills in Radius also grant %+(%d+) to Maximum Life"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("Life", "BASE", num, data.modSource)
out:NewMod("Life", "BASE", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant %+(%d+) to Maximum Mana"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("Mana", "BASE", num, data.modSource)
out:NewMod("Mana", "BASE", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant (%d+)%% increased Energy Shield"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("EnergyShield", "INC", num, data.modSource)
out:NewMod("EnergyShield", "INC", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant (%d+)%% increased Armour"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("Armour", "INC", num, data.modSource)
out:NewMod("Armour", "INC", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant (%d+)%% increased Evasion Rating"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("Evasion", "INC", num, data.modSource)
out:NewMod("Evasion", "INC", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant %+(%d+) to all Attributes"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("Str", "BASE", num, data.modSource)
out:NewMod("Dex", "BASE", num, data.modSource)
out:NewMod("Int", "BASE", num, data.modSource)
out:NewMod("All", "BASE", num, data.modSource)
out:NewMod("Str", "BASE", tonumber(num), data.modSource)
out:NewMod("Dex", "BASE", tonumber(num), data.modSource)
out:NewMod("Int", "BASE", tonumber(num), data.modSource)
out:NewMod("All", "BASE", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant %+(%d+)%% to Chaos Resistance"] = function(num)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod("ChaosResist", "BASE", num, data.modSource)
out:NewMod("ChaosResist", "BASE", tonumber(num), data.modSource)
end
end
end,
["Passive Skills in Radius also grant (%d+)%% increased (%w+) Damage"] = function(num, type)
return function(node, out, data)
if node and node.type ~= "Keystone" and node.type ~= "Socket" and node.type ~= "ClassStart" then
out:NewMod(firstToUpper(type).."Damage", "INC", num, data.modSource)
out:NewMod(firstToUpper(type).."Damage", "INC", tonumber(num), data.modSource)
end
end
end,
@@ -5841,7 +5841,7 @@ local jewelOtherFuncs = {
return function(node, out, data)
if node and node.type == "Notable" then
out:NewMod("PassiveSkillHasOtherEffect", "FLAG", true, data.modSource)
out:NewMod("NodeModifier", "LIST", { mod = mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", -num, data.modSource) }) }, data.modSource)
out:NewMod("NodeModifier", "LIST", { mod = mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", -tonumber(num), data.modSource) }) }, data.modSource)
end
end
end,