Skip to content

Commit 82768b0

Browse files
committed
remove normalisation
1 parent 955c4fa commit 82768b0

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

src/Modules/CalcDefence.lua

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,23 +1416,9 @@ function calcs.buildDefenceEstimations(env, actor)
14161416
destTotal = destTotal + shiftTable[destType]
14171417
end
14181418
end
1419-
if dotDestinationTotal > 100 then
1420-
local factor = 100 / dotDestinationTotal
1421-
for destType, portion in pairs(dotShiftTable) do
1422-
dotShiftTable[destType] = portion * factor
1423-
end
1424-
dotDestinationTotal = 100
1425-
end
1426-
dotShiftTable[damageType] = 100 - dotDestinationTotal
1419+
dotShiftTable[damageType] = m_max(100 - dotDestinationTotal, 0)
14271420
actor.damageOverTimeShiftTable[damageType] = dotShiftTable
1428-
if destTotal > 100 then
1429-
local factor = 100 / destTotal
1430-
for destType, portion in pairs(shiftTable) do
1431-
shiftTable[destType] = portion * factor
1432-
end
1433-
destTotal = 100
1434-
end
1435-
shiftTable[damageType] = 100 - destTotal
1421+
shiftTable[damageType] = m_max(100 - destTotal, 0)
14361422
actor.damageShiftTable[damageType] = shiftTable
14371423

14381424
--add same type damage

0 commit comments

Comments
 (0)