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.
This commit is contained in:
Paliak
2025-03-05 13:21:44 +01:00
committed by GitHub
parent 945ad4825d
commit f9da201f86
2 changed files with 7 additions and 2 deletions

View File

@@ -463,7 +463,9 @@ function calcs.buildActiveSkillModList(env, activeSkill)
skillModList:NewMod("Speed", "MORE", 100 * activeSkill.actor.minionData.damageFixup, "Damage Fixup", ModFlag.Attack)
end
if skillModList:Flag(activeSkill.skillCfg, "DisableSkill") and not skillModList:Flag(activeSkill.skillCfg, "EnableSkill") then
-- Mods which apply curses are not disabled by Gruthkul's Pelt
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
if skillModList:Flag(activeSkill.skillCfg, "DisableSkill") and not (skillModList:Flag(activeSkill.skillCfg, "EnableSkill") or (curseApplicationSkill and skillModList:Flag(nil, "ForceEnableCurseApplication"))) then
skillFlags.disable = true
activeSkill.disableReason = "Skills of this type are disabled"
end

View File

@@ -4718,7 +4718,10 @@ local specialModList = {
["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,
["your aura skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Aura }) },
["your blessing skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Blessing }) },
["your spells are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }) },
["your spells are disabled"] = {
flag("DisableSkill", { type = "SkillType", skillType = SkillType.Spell }),
flag("ForceEnableCurseApplication")
},
["your travel skills are disabled"] = { flag("DisableSkill", { type = "SkillType", skillType = SkillType.Travel }) },
["aura skills other than ([%a%s]+) are disabled"] = function(_, name) return {
flag("DisableSkill", { type = "SkillType", skillType = SkillType.Aura }, { type = "SkillType", skillType = SkillType.RemoteMined, neg = true }),