Merge pull request #3883 from Nostrademous/Mageblood_FlaskMod

Add support for Mageblood
This commit is contained in:
Trevor Lund
2022-01-21 00:59:31 -06:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View File

@@ -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")

View File

@@ -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" } ) },