From 88c4d26622437fd848cbf9c908a6608a689c1bb7 Mon Sep 17 00:00:00 2001 From: slaren Date: Sat, 27 Jun 2026 16:15:55 +0200 Subject: [PATCH 1/2] add support for atziri's splendour cost conversion for corrupted gems --- src/Data/ModCache.lua | 2 +- src/Modules/BuildDisplayStats.lua | 2 +- src/Modules/CalcActiveSkill.lua | 3 +++ src/Modules/ModParser.lua | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 3abe158a2b..55f4dc6852 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -6672,7 +6672,7 @@ c["Skills deal 8% increased Damage per Combo consumed, up to 40%"]={{[1]={[1]={l c["Skills fire an additional Projectile"]={{[1]={flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=1}},nil} c["Skills from Corrupted Gems have 25% increased Cost Efficiency during any Flask Effect"]={nil,"Skills from Corrupted Gems have 25% increased Cost Efficiency during any Flask Effect "} c["Skills from Corrupted Gems have 25% increased Cost Efficiency during any Flask Effect Corrupted Blood cannot be inflicted on you"]={nil,"Skills from Corrupted Gems have 25% increased Cost Efficiency during any Flask Effect Corrupted Blood cannot be inflicted on you "} -c["Skills from Corrupted Gems have 50% of Mana Costs Converted to Life Costs"]={nil,"Skills from Corrupted Gems have 50% of Mana Costs Converted to Life Costs "} +c["Skills from Corrupted Gems have 50% of Mana Costs Converted to Life Costs"]={{[1]={[1]={type="Condition",var="GemCorrupted"},flags=0,keywordFlags=0,name="HybridManaAndLifeCost_Life",type="BASE",value=50}},nil} c["Skills gain 1 Glory every 2 seconds for each Rare or Unique monster in your Presence"]={{}," Glory every 2 seconds for each Rare or Unique monster in your Presence "} c["Skills gain 1% of Damage as Chaos Damage per 3 Life Cost"]={{[1]={[1]={div=3,stat="LifeCost",type="PerStat"},flags=0,keywordFlags=0,name="DamageAsChaos",type="BASE",value=1}},nil} c["Skills gain a Base Life Cost equal to Base Mana Cost"]={{[1]={flags=0,keywordFlags=0,name="BaseManaCostAsLifeCost",type="BASE",value=100}},nil} diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 538efd46ca..0a51dc5893 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -77,7 +77,7 @@ local displayStats = { { stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm" }, { stat = "BrandAttachmentRangeMetre", label = "Attachment Range", fmt = ".1fm", flag = "brand" }, { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" }, - { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end }, + { stat = "ManaCost", label = "Mana Cost", fmt = ".0f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end }, { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end }, { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end }, { stat = "ManaPercentPerSecondCost", label = "Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end }, diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 01e3ea95c9..69031b13f0 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -694,6 +694,9 @@ function calcs.buildActiveSkillModList(env, activeSkill) activeSkill.weapon2Cfg.skillCond = setmetatable({ ["OffHandAttack"] = true }, { __index = activeSkill.skillCfg.skillCond }) activeSkill.weapon2Cfg.flags = bor(skillModFlags, activeSkill.weapon2Flags) end + if activeEffect.srcInstance and activeEffect.srcInstance.corrupted then + activeSkill.skillCfg.skillCond["GemCorrupted"] = true + end -- The damage fixup stat applies x% less base Attack Damage and x% more base Attack Speed as confirmed by Openarl Jan 4th 2024 -- Implemented in this manner as the stat exists on the minion not the skills diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 99b558e609..427d5cd4db 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -6005,6 +6005,9 @@ local specialModList = { ["attack skills cost life instead of (%d+)%% of mana cost"] = function(num) return { mod("HybridManaAndLifeCost_Life", "BASE", num, nil, ModFlag.Attack) } end, + ["skills from corrupted gems have (%d+)%% of mana costs converted to life costs"] = function(num) return { + mod("HybridManaAndLifeCost_Life", "BASE", num, { type = "Condition", var = "GemCorrupted" }), + } end, ["non%-channelling spells cost an additional (%d+)%% of your maximum life"] = function(num) return { mod("LifeCostBase", "BASE", 1, nil, 0, KeywordFlag.Spell, { type = "PercentStat", percent = num, stat = "Life", floor = true }, { type = "SkillType", skillType = SkillType.Channel, neg = true }) } end, From a465876ca7a53817b50743477904846350913246 Mon Sep 17 00:00:00 2001 From: slaren Date: Sun, 28 Jun 2026 14:19:24 +0200 Subject: [PATCH 2/2] move GemCorrupted condition to already existing check --- src/Modules/CalcActiveSkill.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 69031b13f0..10fae849f9 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -694,9 +694,6 @@ function calcs.buildActiveSkillModList(env, activeSkill) activeSkill.weapon2Cfg.skillCond = setmetatable({ ["OffHandAttack"] = true }, { __index = activeSkill.skillCfg.skillCond }) activeSkill.weapon2Cfg.flags = bor(skillModFlags, activeSkill.weapon2Flags) end - if activeEffect.srcInstance and activeEffect.srcInstance.corrupted then - activeSkill.skillCfg.skillCond["GemCorrupted"] = true - end -- The damage fixup stat applies x% less base Attack Damage and x% more base Attack Speed as confirmed by Openarl Jan 4th 2024 -- Implemented in this manner as the stat exists on the minion not the skills @@ -772,6 +769,7 @@ function calcs.buildActiveSkillModList(env, activeSkill) skillModList:NewMod("GemLevel", "BASE", activeSkill.activeEffect.srcInstance and activeSkill.activeEffect.srcInstance.level or activeSkill.activeEffect.level, "Max Level") if activeSkill.activeEffect.srcInstance and activeSkill.activeEffect.srcInstance.corrupted and not (activeSkill.activeEffect.srcInstance.fromItem or activeSkill.activeEffect.srcInstance.fromTree or activeSkill.activeEffect.grantedEffect.fromItem or activeSkill.activeEffect.grantedEffect.fromTree) then skillModList:NewMod("GemCorruptionLevel", "BASE", activeSkill.activeEffect.srcInstance.corruptLevel, "Corruption") + activeSkill.skillCfg.skillCond["GemCorrupted"] = true end for _, supportProperty in ipairs(getSourceGemPropertyInfo(env, activeSkill)) do local value = supportProperty.value