Skip to content

Commit 558b3f8

Browse files
committed
changes to fix issue where CI wasn't correctly overriding life before conversions (like conversion to ES from GhostWrithe) occur
1 parent 96d2d7b commit 558b3f8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Modules/CalcDefence.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,10 @@ function calcs.defence(env, actor)
12631263
end
12641264
for _, source in ipairs(resourceList) do
12651265
local globalBase = modDB:Sum("BASE", nil, unpack(source.mods)) + source.globalBase
1266+
local globalOverride = modDB:Override(nil, unpack(source.mods))
1267+
if globalOverride then
1268+
globalBase = globalOverride
1269+
end
12661270
for _, target in ipairs(resourceList) do
12671271
if source.name ~= target.name then
12681272
if source.defence then
@@ -1293,7 +1297,7 @@ function calcs.defence(env, actor)
12931297
local gainRate = modDB:Sum("BASE", nil, source.name .. "GainAs" .. target.name)
12941298
local rate = source.conversionRate[target.name] + gainRate
12951299
if rate > 0 then
1296-
local targetBase = globalBase * rate / 100
1300+
local targetBase = math.ceil(globalBase * rate / 100)
12971301
target.globalBase = target.globalBase + targetBase
12981302
if breakdown then
12991303
breakdown.slot("Conversion", source.name .. " to " .. target.name, nil, targetBase, nil, unpack(target.mods))

0 commit comments

Comments
 (0)