diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 70f4dccb5a0232f754c6c88243deb0cf7d305623..78d44b3d1c850b237a7ddcf01007cfc6a32503d1 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2828,6 +2828,9 @@ function _M:onWear(o, bypass_set) if o.power_source and o.power_source.antimagic then self:attr("spellpower_reduction", 1) self:attr("spell_failure", (o.material_level or 1) * 10) + if self:attr("has_arcane_knowledge") then + self:setEffect(self.EFF_ANTIMAGIC_DISRUPTION, 1, {}) + end end -- Apply Psychometry diff --git a/game/modules/tome/data/gfx/effects/antimagic_disruption.png b/game/modules/tome/data/gfx/effects/antimagic_disruption.png new file mode 100644 index 0000000000000000000000000000000000000000..474a8f3a67d2549652a3adac3a1cbdc876f7bef4 Binary files /dev/null and b/game/modules/tome/data/gfx/effects/antimagic_disruption.png differ diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua index 25a5753a36f43c2d9a89af9b661e623c2d12d19b..396199213c529fc3a1f3fda0fdeb450aba184dd5 100644 --- a/game/modules/tome/data/timed_effects/other.lua +++ b/game/modules/tome/data/timed_effects/other.lua @@ -2229,3 +2229,19 @@ newEffect{ self.onTakeHit = old end, } + +newEffect{ + name = "ANTIMAGIC_DISRUPTION", + desc = "Antimagic Disruption", + long_desc = function(self, eff) return ("Your arcane powers are disrupted by your antimagic equipment."):format() end, + type = "other", + subtype = { antimagic=true }, + status = "detrimental", + decrease = 0, no_remove = true, + parameters = { }, + on_timeout = function(self, eff) + if not self:attr("has_arcane_knowledge") or not self:attr("spellpower_reduction") then + self:removeEffect(self.EFF_ANTIMAGIC_DISRUPTION, true, true) + end + end, +}