Skip to content

Commit 4d5f815

Browse files
PeecheyLocalIdentity
andauthored
Fix Poisonous Concoction Added Damage from Disabled Life Flasks (#9339)
* set LifeFlaskRecovery for PConc if life flask is in a disabled slot * update for multiple disabled life flasks and refactor into function * indent fix * Simplify code Handle it all in the ordered slot loop so it doesn't need to be called on again --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 6fed99f commit 4d5f815

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Modules/CalcSetup.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,10 @@ function calcs.initEnv(build, mode, override, specEnv)
812812
end
813813
end
814814
end
815+
if item and item.type == "Flask" and item.base.subType == "Life" and item.flaskData then
816+
-- Keep highest life flask recovery even if this slot is later disabled (e.g. Poisonous Concoction).
817+
env.itemModDB.multipliers["LifeFlaskRecovery"] = m_max(env.itemModDB.multipliers["LifeFlaskRecovery"] or 0, item.flaskData.lifeTotal or 0)
818+
end
815819
items[slotName] = item
816820
::continue::
817821
end
@@ -912,11 +916,7 @@ function calcs.initEnv(build, mode, override, specEnv)
912916
env.flaskSlotOccupied[flaskNum] = true
913917
end
914918
if item.base.subType == "Life" then
915-
local highestLifeRecovery = env.itemModDB.multipliers["LifeFlaskRecovery"] or 0
916919
local highestCharges = env.itemModDB.multipliers["LifeFlaskCharges"] or 0
917-
if item.flaskData.lifeTotal > highestLifeRecovery then
918-
env.itemModDB.multipliers["LifeFlaskRecovery"] = item.flaskData.lifeTotal
919-
end
920920
if item.flaskData.chargesMax > highestCharges then
921921
env.itemModDB.multipliers["LifeFlaskCharges"] = item.flaskData.chargesMax
922922
end

0 commit comments

Comments
 (0)