From 2733503114b624808ee19e5e72008961e228be0b Mon Sep 17 00:00:00 2001 From: emptywalls Date: Mon, 13 Jul 2026 12:32:49 +0100 Subject: [PATCH] Fix an interaction between Rakiatas Flow and sources of "ignore non-negative elemental resistances" Support for "ignore non-negative elemental resistances" was raised as [2] and implemented with [3], however the implementation did not address resistances inversion. As shown in [1], Rakiatas inversion is done before ignoring. [1] https://youtu.be/2d646c8_m0k?t=428 [2] https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/issues/498 [3] https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/pull/690 --- src/Modules/CalcOffence.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index b6de2bf85d..ee5130f088 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -4093,6 +4093,7 @@ function calcs.offence(env, actor, activeSkill) if (damageTypeHitMin ~= 0 or damageTypeHitMax ~= 0) and env.mode_effective then -- Apply enemy resistances and damage taken modifiers local resist = 0 + local resistBeforeIgnoreNonNegative = 0 local pen = 0 local minPen = 0 local sourceRes = damageType @@ -4165,6 +4166,7 @@ function calcs.offence(env, actor, activeSkill) end sourceRes = elementUsed elseif isElemental[damageType] then + resistBeforeIgnoreNonNegative = resist if resist > 0 and modDB:Flag(cfg, "IgnoreNonNegativeEleRes") then resist = 0 end @@ -4194,11 +4196,11 @@ function calcs.offence(env, actor, activeSkill) return resist > minPen and m_max(resist - pen, minPen) or resist end if skillModList:Flag(cfg, isElemental[damageType] and "CannotElePenIgnore" or nil) then - effectiveResist = (isElemental[damageType] and invertChance > 0) and (resist - 2 * invertChance * resist) or resist + effectiveResist = (isElemental[damageType] and invertChance > 0) and (resistBeforeIgnoreNonNegative - 2 * invertChance * resistBeforeIgnoreNonNegative) or resist effMult = effMult * (1 - effectiveResist / 100) elseif useRes then if isElemental[damageType] and invertChance > 0 then - effectiveResist = calcPenResist(resist) * (1 - invertChance) + calcPenResist(-resist) * invertChance + effectiveResist = calcPenResist(resist) * (1 - invertChance) + calcPenResist(-resistBeforeIgnoreNonNegative) * invertChance else effectiveResist = calcPenResist(resist) end