Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions spec/System/TestItemMods_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 3 additions & 1 deletion src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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`",
Expand Down
4 changes: 4 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down