From 744036b397ad8c882b614ef317be64fe3ebb90f9 Mon Sep 17 00:00:00 2001 From: unrealdreamz <132005717+unrealdreamz@users.noreply.github.com> Date: Mon, 18 May 2026 19:45:01 -0400 Subject: [PATCH] Scale Force of Will by missing mana --- spec/System/TestItemMods_spec.lua | 19 +++++++++++++++++++ src/Data/ModCache.lua | 2 +- src/Modules/ConfigOptions.lua | 4 +++- src/Modules/ModParser.lua | 4 ++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/spec/System/TestItemMods_spec.lua b/spec/System/TestItemMods_spec.lua index b15074c41..a27c2d600 100644 --- a/spec/System/TestItemMods_spec.lua +++ b/spec/System/TestItemMods_spec.lua @@ -221,6 +221,25 @@ describe("TetsItemMods", function() runCallback("OnFrame") end) + it("Arcane Surge effect per ten percent missing mana", function() + build.configTab.input.customMods = [[ + 20% increased Effect of Arcane Surge on you per ten percent missing Mana + ]] + build.configTab.input.multiplierCurrentManaPercentage = 100 + build.configTab:BuildModList() + runCallback("OnFrame") + + assert.equals(0, build.calcsTab.mainEnv.modDB:GetMultiplier("MissingManaPercentage")) + assert.equals(0, build.calcsTab.mainEnv.modDB:Sum("INC", nil, "ArcaneSurgeEffect")) + + build.configTab.input.multiplierCurrentManaPercentage = 50 + build.configTab:BuildModList() + runCallback("OnFrame") + + assert.equals(50, build.calcsTab.mainEnv.modDB:GetMultiplier("MissingManaPercentage")) + assert.equals(100, build.calcsTab.mainEnv.modDB:Sum("INC", nil, "ArcaneSurgeEffect")) + end) + it("Jarngreipr - strength satisfies melee weapons and skills", function() build.configTab.input.customMods = "+1000 Strength" build.configTab:BuildModList() diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index ad786db07..437b9b1a0 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -1833,7 +1833,7 @@ c["20% increased Deflection Rating"]={{[1]={flags=0,keywordFlags=0,name="Deflect c["20% increased Duration"]={{[1]={flags=0,keywordFlags=0,name="Duration",type="INC",value=20}},nil} c["20% increased Duration of Damaging Ailments on Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyIgniteDuration",type="INC",value=20},[2]={flags=0,keywordFlags=0,name="EnemyBleedDuration",type="INC",value=20},[3]={flags=0,keywordFlags=0,name="EnemyPoisonDuration",type="INC",value=20}},nil} c["20% increased Duration of Elemental Ailments on Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyElementalAilmentDuration",type="INC",value=20}},nil} -c["20% increased Effect of Arcane Surge on you per ten percent missing Mana"]={{[1]={flags=0,keywordFlags=0,name="ArcaneSurgeEffect",type="INC",value=20}}," per ten percent missing Mana "} +c["20% increased Effect of Arcane Surge on you per ten percent missing Mana"]={{[1]={[1]={div=10,type="Multiplier",var="MissingManaPercentage"},flags=0,keywordFlags=0,name="ArcaneSurgeEffect",type="INC",value=20},[2]={flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="currentManaPercentage",value=true}}},nil} c["20% increased Effect of your Mark Skills"]={{[1]={[1]={skillType=99,type="SkillType"},flags=0,keywordFlags=0,name="LocalEffect",type="INC",value=20}},nil} c["20% increased Elemental Ailment Threshold"]={{[1]={flags=0,keywordFlags=0,name="AilmentThreshold",type="INC",value=20}},nil} c["20% increased Elemental Damage"]={{[1]={flags=0,keywordFlags=0,name="ElementalDamage",type="INC",value=20}},nil} diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index b148d9a4a..f61c8d329 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -115,7 +115,9 @@ local configSettings = { modList:NewMod("SkillData", "LIST", { key = "corpseLife", value = val }, "Config") end }, { var = "multiplierCurrentManaPercentage", type = "count", label = "Current ^x7070FFMana^7 %:", ifSkillData = "currentManaPercentage", defaultState = 100, apply = function(val, modList, enemyModList) - modList:NewMod("Multiplier:CurrentManaPercentage", "BASE", m_max(m_min(val,100), 0), "Config") + local currentManaPercentage = m_max(m_min(val, 100), 0) + modList:NewMod("Multiplier:CurrentManaPercentage", "BASE", currentManaPercentage, "Config") + modList:NewMod("Multiplier:MissingManaPercentage", "BASE", 100 - currentManaPercentage, "Config") end }, { var = "conditionStationary", type = "count", label = "Time spent stationary", ifCond = "Stationary", tooltip = "Applies mods that use `while stationary` and `per / every second while stationary`", diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index cc20d66c3..8c0ecb637 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -4151,6 +4151,10 @@ local specialModList = { ["(%d+)%% increased effect of arcane surge on you per hypnotic eye jewel affecting you, up to a maximum of (%d+)%%"] = function(num, _, limit) return { mod("ArcaneSurgeEffect", "INC", num, { type = "Multiplier", var = "HypnoticEyeJewel", globalLimit = tonumber(limit), globalLimitKey = "KurgalGaze" }) } end, + ["(%d+)%% increased effect of arcane surge on you per ten percent missing mana"] = function(num) return { + mod("ArcaneSurgeEffect", "INC", num, { type = "Multiplier", var = "MissingManaPercentage", div = 10 }), + mod("SkillData", "LIST", { key = "currentManaPercentage", value = true }), + } end, ["(%d+)%% increased main hand critical hit chance per murderous eye jewel affecting you, up to a maximum of (%d+)%%"] = function(num, _, limit) return { mod("CritChance", "INC", num, { type = "Multiplier", var = "MurderousEyeJewel", globalLimit = tonumber(limit), globalLimitKey = "TecrodGazeMainHand" }, { type = "Condition", var = "MainHandAttack" }) } end,