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

Fix more Eldritch mods #4507

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
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
19 changes: 18 additions & 1 deletion src/Classes/ModStore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,24 @@ function ModStoreClass:EvalMod(mod, cfg)
return
end
elseif tag.type == "SlotName" then
if not cfg or tag.slotName ~= cfg.slotName then
if not cfg then
return
end
local match = false
if tag.slotNameList then
for _, slot in ipairs(tag.slotNameList) do
if slot == cfg.slotName then
match = true
break
end
end
else
match = (tag.slotName == cfg.slotName)
end
if tag.neg then
match = not match
end
if not match then
return
end
elseif tag.type == "ModFlagOr" then
Expand Down
7 changes: 7 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ local modFlagList = {
-- Other
["global"] = { tag = { type = "Global" } },
["from equipped shield"] = { tag = { type = "SlotName", slotName = "Weapon 2" } },
["from equipped gloves and boots"] = { tag = { type = "SlotName", slotNameList = { "Gloves", "Boots" } } },
["from equipped helmet and gloves"] = { tag = { type = "SlotName", slotNameList = { "Helmet", "Gloves" } } },
["from equipped helmet and boots"] = { tag = { type = "SlotName", slotNameList = { "Helmet", "Boots" } } },
["from body armour"] = { tag = { type = "SlotName", slotName = "Body Armour" } },
["from your body armour"] = { tag = { type = "SlotName", slotName = "Body Armour" } },
}
Expand Down Expand Up @@ -2666,6 +2669,7 @@ local specialModList = {
["(%d+)%% increased effect of shrine buffs on you"] = function(num) return { mod("ShrineBuffEffect", "INC", num)} end,
["left ring slot: cover enemies in ash for 5 seconds when you ignite them"] = { mod("CoveredInAshEffect", "BASE", 20, { type = "SlotNumber", num = 1 }, { type = "ActorCondition", actor = "enemy", var = "Ignited" }) },
["right ring slot: cover enemies in frost for 5 seconds when you freeze them"] = { mod("CoveredInFrostEffect", "BASE", 20, { type = "SlotNumber", num = 2 }, { type = "ActorCondition", actor = "enemy", var = "Frozen" }) },
["([%a%s]+) has (%d+)%% increased effect"] = function(_, skill, num) return { mod("BuffEffect", "INC", num, { type = "SkillId", skillId = gemIdLookup[skill]}) } end,
-- Traps, Mines and Totems
["traps and mines deal (%d+)%-(%d+) additional physical damage"] = function(_, min, max) return { mod("PhysicalMin", "BASE", tonumber(min), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)), mod("PhysicalMax", "BASE", tonumber(max), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,
["traps and mines deal (%d+) to (%d+) additional physical damage"] = function(_, min, max) return { mod("PhysicalMin", "BASE", tonumber(min), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)), mod("PhysicalMax", "BASE", tonumber(max), nil, 0, bor(KeywordFlag.Trap, KeywordFlag.Mine)) } end,
Expand Down Expand Up @@ -3041,6 +3045,9 @@ local specialModList = {
["flasks gain (%d+) charges? every (%d+) seconds"] = function(num, _, div) return {
mod("FlaskChargesGenerated", "BASE", num / div)
} end,
["flasks gain a charge every (%d+) seconds"] = function(_, div) return {
mod("FlaskChargesGenerated", "BASE", 1 / div)
} end,
["utility flasks gain (%d+) charges? every (%d+) seconds"] = function(num, _, div) return {
mod("UtilityFlaskChargesGenerated", "BASE", num / div)
} end,
Expand Down