Skip to content

Commit f9da201

Browse files
authored
FIX: disabling spells preventing curse application (#8522)
The 'Your Spells are disabled' mod found on the Gruthkul's Pelt unique chest armor currently prevents curse on hit mods from applying. This is due to the 'chance to Curse Enemies with X on Hit' being implemented in POB as a simple granted skill without making the distinction between generic granted skills and on hit (application) skills (curses). This solution isn't the prettiest but i'd argue it's the most sane given what information is available to the ModStore.
1 parent 945ad48 commit f9da201

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Modules/CalcActiveSkill.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,9 @@ function calcs.buildActiveSkillModList(env, activeSkill)
463463
skillModList:NewMod("Speed", "MORE", 100 * activeSkill.actor.minionData.damageFixup, "Damage Fixup", ModFlag.Attack)
464464
end
465465

466-
if skillModList:Flag(activeSkill.skillCfg, "DisableSkill") and not skillModList:Flag(activeSkill.skillCfg, "EnableSkill") then
466+
-- Mods which apply curses are not disabled by Gruthkul's Pelt
467+
local curseApplicationSkill = activeSkill.socketGroup and activeSkill.socketGroup.sourceItem ~= nil and activeSkill.skillFlags.curse and activeSkill.activeEffect.srcInstance and activeSkill.activeEffect.srcInstance.noSupports and activeSkill.activeEffect.srcInstance.triggered
468+
if skillModList:Flag(activeSkill.skillCfg, "DisableSkill") and not (skillModList:Flag(activeSkill.skillCfg, "EnableSkill") or (curseApplicationSkill and skillModList:Flag(nil, "ForceEnableCurseApplication"))) then
467469
skillFlags.disable = true
468470
activeSkill.disableReason = "Skills of this type are disabled"
469471
end

src/Modules/ModParser.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4718,7 +4718,10 @@ local specialModList = {
47184718
["dread banner grants an additional %+(%d+) to maximum fortification when placing the banner"] = function(num) return { mod("ExtraSkillMod", "LIST", { mod = mod("MaximumFortification", "BASE", num, { type = "GlobalEffect", effectType = "Buff" }) }, { type = "Condition", var = "BannerPlanted" }, { type = "SkillName", skillName = "Dread Banner" }) } end,
47194719
["your aura skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Aura }) },
47204720
["your blessing skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Blessing }) },
4721-
["your spells are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }) },
4721+
["your spells are disabled"] = {
4722+
flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }),
4723+
flag("ForceEnableCurseApplication")
4724+
},
47224725
["your travel skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Travel }) },
47234726
["aura skills other than ([%a%s]+) are disabled"] = function(_, name) return {
47244727
flag("DisableSkill", { type = "SkillType", skillType = SkillType.Aura }, { type = "SkillType", skillType = SkillType.RemoteMined, neg = true }),

0 commit comments

Comments
 (0)