diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index cca45879..efc2dc7c 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1300,6 +1300,25 @@ function calcs.perform(env, avoidCache) end end + -- Special handling of Mageblood + local maxActiveMagicUtilityCount = modDB:Sum("BASE", nil, "ActiveMagicUtilityFlasks") + if maxActiveMagicUtilityCount > 0 then + local curActiveMagicUtilityCount = 0 + for _, slot in pairs(env.build.itemsTab.orderedSlots) do + local slotName = slot.slotName + local item = env.build.itemsTab.items[slot.selItemId] + if item and item.type == "Flask" then + local mageblood_applies = item.rarity == "MAGIC" and not (item.baseName:match("Life Flask") or + item.baseName:match("Mana Flask") or item.baseName:match("Hybrid Flask")) and + curActiveMagicUtilityCount < maxActiveMagicUtilityCount + if mageblood_applies then + env.flasks[item] = true + curActiveMagicUtilityCount = curActiveMagicUtilityCount + 1 + end + end + end + end + -- Merge flask modifiers if env.mode_combat then local effectInc = modDB:Sum("INC", nil, "FlaskEffect") diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 5e14398d..920dc403 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2902,6 +2902,7 @@ local specialModList = { ["added small passive skills have (%d+)%% increased effect"] = function(num) return { mod("JewelData", "LIST", { key = "clusterJewelIncEffect", value = num }) } end, ["this jewel's socket has (%d+)%% increased effect per allocated passive skill between it and your class' starting location"] = function(num) return { mod("JewelData", "LIST", { key = "jewelIncEffectFromClassStart", value = num }) } end, -- Misc + ["leftmost (%d+) magic utility flasks constantly apply their flask effects to you"] = function(num) return { mod("ActiveMagicUtilityFlasks", "BASE", num) } end, ["marauder: melee skills have (%d+)%% increased area of effect"] = function(num) return { mod("AreaOfEffect", "INC", num, { type = "Condition", var = "ConnectedToMarauderStart" }, { type = "SkillType", skillType = SkillType.Melee }) } end, ["intelligence provides no inherent bonus to energy shield"] = { flag("NoIntBonusToES") }, ["intelligence is added to accuracy rating with wands"] = { mod("Accuracy", "BASE", 1, nil, ModFlag.Wand, { type = "PerStat", stat = "Int" } ) },