@@ -3135,6 +3135,7 @@ function calcs.offence(env, actor, activeSkill)
31353135 local totalHitMin , totalHitMax , totalHitAvg = 0 , 0 , 0
31363136 local totalCritMin , totalCritMax , totalCritAvg = 0 , 0 , 0
31373137 local ghostReaver = skillModList :Flag (nil , " GhostReaver" )
3138+ local ghostReaverLifeLeech = 0
31383139 output .LifeLeech = 0
31393140 output .LifeLeechInstant = 0
31403141 output .EnergyShieldLeech = 0
@@ -3376,11 +3377,6 @@ function calcs.offence(env, actor, activeSkill)
33763377 manaLeech = skillModList :Sum (" BASE" , cfg , " DamageLeech" , " DamageManaLeech" , damageType .. " DamageManaLeech" , isElemental [damageType ] and " ElementalDamageManaLeech" or nil ) + enemyDB :Sum (" BASE" , cfg , " SelfDamageManaLeech" ) / 100
33773378 end
33783379
3379- if ghostReaver and not noLifeLeech then
3380- energyShieldLeech = energyShieldLeech + lifeLeech
3381- lifeLeech = 0
3382- end
3383-
33843380 if lifeLeech > 0 and not noLifeLeech then
33853381 lifeLeechTotal = lifeLeechTotal + damageTypeHitAvg * lifeLeech / 100
33863382 end
@@ -3413,20 +3409,31 @@ function calcs.offence(env, actor, activeSkill)
34133409 totalHitMax = totalHitMax + damageTypeHitMax
34143410 end
34153411 end
3416- if skillData .lifeLeechPerUse then
3412+ if skillData .lifeLeechPerUse and not noLifeLeech then
34173413 lifeLeechTotal = lifeLeechTotal + skillData .lifeLeechPerUse
34183414 end
34193415 if skillData .manaLeechPerUse then
34203416 manaLeechTotal = manaLeechTotal + skillData .manaLeechPerUse
34213417 end
34223418
34233419 -- leech caps per instance
3424- lifeLeechTotal = m_min (lifeLeechTotal , globalOutput .MaxLifeLeechInstance )
3420+ if ghostReaver then
3421+ lifeLeechTotal = m_min (lifeLeechTotal , globalOutput .MaxEnergyShieldLeechInstance )
3422+ else
3423+ lifeLeechTotal = m_min (lifeLeechTotal , globalOutput .MaxLifeLeechInstance )
3424+ end
34253425 energyShieldLeechTotal = m_min (energyShieldLeechTotal , globalOutput .MaxEnergyShieldLeechInstance )
34263426 manaLeechTotal = m_min (manaLeechTotal , globalOutput .MaxManaLeechInstance )
3427+ if ghostReaver and noEnergyShieldLeech then
3428+ lifeLeechTotal = 0
3429+ end
34273430
34283431 local portion = (pass == 1 ) and (output .CritChance / 100 ) or (1 - output .CritChance / 100 )
3429- output .LifeLeech = output .LifeLeech + lifeLeechTotal * portion
3432+ if ghostReaver then
3433+ ghostReaverLifeLeech = ghostReaverLifeLeech + lifeLeechTotal * portion
3434+ else
3435+ output .LifeLeech = output .LifeLeech + lifeLeechTotal * portion
3436+ end
34303437 output .EnergyShieldLeech = output .EnergyShieldLeech + energyShieldLeechTotal * portion
34313438 output .ManaLeech = output .ManaLeech + manaLeechTotal * portion
34323439 end
@@ -3474,6 +3481,11 @@ function calcs.offence(env, actor, activeSkill)
34743481 output .LifeLeechInstant = output .LifeLeech * output .LifeLeechInstantProportion
34753482 output .LifeLeech = output .LifeLeech * (1 - output .LifeLeechInstantProportion )
34763483 end
3484+ if ghostReaver and ghostReaverLifeLeech > 0 then
3485+ output .EnergyShieldLeech = output .EnergyShieldLeech + ghostReaverLifeLeech
3486+ output .LifeLeech = 0
3487+ output .LifeLeechInstant = 0
3488+ end
34773489 output .EnergyShieldLeechInstantProportion = m_max (m_min (skillModList :Sum (" BASE" , cfg , " InstantEnergyShieldLeech" ) or 0 , 100 ), 0 ) / 100
34783490 if output .EnergyShieldLeechInstantProportion > 0 then
34793491 output .EnergyShieldLeechInstant = output .EnergyShieldLeech * output .EnergyShieldLeechInstantProportion
0 commit comments