@@ -3262,10 +3262,14 @@ function calcs.offence(env, actor, activeSkill)
32623262 pen = skillModList :Sum (" BASE" , cfg , " ChaosPenetration" )
32633263 end
32643264 end
3265- local invertChance = m_max (m_min (skillModList :Sum (" CHANCE" , cfg , " HitsInvertEleResChance" ), 1 ), 0 )
3266- if isElemental [damageType ] and invertChance > 0 then
3267- -- resist = (1 - invertChance) * resist + invertChance * (-1 * resist)
3268- resist = resist - 2 * invertChance * resist
3265+ local invertChanceEle = m_max (m_min (skillModList :Sum (" CHANCE" , cfg , " HitsInvertEleResChance" ), 1 ), 0 )
3266+ if isElemental [damageType ] and invertChanceEle > 0 then
3267+ -- resist = (1 - invertChanceEle) * resist + invertChanceEle * (-1 * resist)
3268+ resist = resist - 2 * invertChanceEle * resist
3269+ end
3270+ local invertChanceChaos = m_max (m_min (skillModList :Sum (" CHANCE" , cfg , " HitsInvertChaosResChance" ), 1 ), 0 )
3271+ if damageType == " Chaos" and invertChanceChaos > 0 then
3272+ resist = resist - 2 * invertChanceChaos * resist
32693273 end
32703274 sourceRes = env .modDB :Flag (nil , " Enemy" .. sourceRes .. " ResistEqualToYours" ) and " Your " .. sourceRes .. " Resistance" or (env .partyMembers .modDB :Flag (nil , " Enemy" .. sourceRes .. " ResistEqualToYours" ) and " Party Member " .. sourceRes .. " Resistance" or sourceRes )
32713275 if skillFlags .projectile then
@@ -3290,6 +3294,7 @@ function calcs.offence(env, actor, activeSkill)
32903294 if env .mode == " CALCS" then
32913295 output [damageType .. " EffMult" ] = effMult
32923296 end
3297+ local invertChance = (isElemental [damageType ] and invertChanceEle ) or (damageType == " Chaos" and invertChanceChaos ) or 0
32933298 if pass == 2 and breakdown and (effMult ~= 1 or sourceRes ~= damageType ) and skillModList :Flag (cfg , isElemental [damageType ] and " CannotElePenIgnore" or nil ) then
32943299 t_insert (breakdown [damageType ], s_format (" x %.3f ^8(effective DPS modifier)" , effMult ))
32953300 breakdown [damageType .. " EffMult" ] = breakdown .effMult (damageType , resist , 0 , takenInc , effMult , takenMore , sourceRes , useRes , invertChance )
0 commit comments