Skip to content

Commit

Permalink
remove normalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Dec 1, 2023
1 parent 955c4fa commit 82768b0
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1416,23 +1416,9 @@ function calcs.buildDefenceEstimations(env, actor)
destTotal = destTotal + shiftTable[destType]
end
end
if dotDestinationTotal > 100 then
local factor = 100 / dotDestinationTotal
for destType, portion in pairs(dotShiftTable) do
dotShiftTable[destType] = portion * factor
end
dotDestinationTotal = 100
end
dotShiftTable[damageType] = 100 - dotDestinationTotal
dotShiftTable[damageType] = m_max(100 - dotDestinationTotal, 0)
actor.damageOverTimeShiftTable[damageType] = dotShiftTable
if destTotal > 100 then
local factor = 100 / destTotal
for destType, portion in pairs(shiftTable) do
shiftTable[destType] = portion * factor
end
destTotal = 100
end
shiftTable[damageType] = 100 - destTotal
shiftTable[damageType] = m_max(100 - destTotal, 0)
actor.damageShiftTable[damageType] = shiftTable

--add same type damage
Expand Down

0 comments on commit 82768b0

Please sign in to comment.