Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect rounding for reservation #725

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
local baseFlatVal = values.baseFlat
values.reservedFlat = 0
if values.more > 0 and values.inc > -100 and baseFlatVal ~= 0 then
values.reservedFlat = m_max(round(baseFlatVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 0), 0)
values.reservedFlat = m_max(m_ceil(baseFlatVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 0), 0)
end
end
if activeSkill.skillData[name.."ReservationPercentForced"] then
Expand All @@ -176,7 +176,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
local basePercentVal = values.basePercent * mult
values.reservedPercent = 0
if values.more > 0 and values.inc > -100 and basePercentVal ~= 0 then
values.reservedPercent = m_max(round(basePercentVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 2), 0)
values.reservedPercent = m_max(m_ceil(basePercentVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 2), 0)
end
end
if activeSkill.activeMineCount then
Expand Down
Loading