diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index cbb79dd72efc7327b22e766ef65e945476fa5861..4f7336698286644cbd5f7f62928a3be121b094d1 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -4939,7 +4939,6 @@ end -- @param ab the talent (not the id, the table) -- @return true to continue, false to stop function _M:preUseTalent(ab, silent, fake) - if ab._ai_parsed == nil then -- add some AI info to the talent if needed print("[Actor:preUseTalent] PARSING TALENT for AI info", ab.id, self.name) mod.class.interface.ActorAI.aiParseTalent(ab, self) @@ -4950,7 +4949,8 @@ function _M:preUseTalent(ab, silent, fake) return false end - if not self:attr("no_talent_fail") then + if self:attr("no_talent_fail") then return true end + if not ab.never_fail and self:attr("feared") and (ab.mode ~= "sustained" or not self:isTalentActive(ab.id)) then if not silent then game.logSeen(self, "%s is too afraid to use %s.", self.name:capitalize(), ab.name) end return false @@ -5169,8 +5169,6 @@ function _M:preUseTalent(ab, silent, fake) if ab.is_heal and (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) then return false end if ab.is_teleport and self:attr("encased_in_ice") then return false end - end - return true end diff --git a/game/modules/tome/data/talents/uber/cun.lua b/game/modules/tome/data/talents/uber/cun.lua index e5c86fbd5d5a3450be79bd4f3385a8f4362fb5df..8ec4a86da0f3218864ad088e95f5f9a9d1e8a991 100644 --- a/game/modules/tome/data/talents/uber/cun.lua +++ b/game/modules/tome/data/talents/uber/cun.lua @@ -273,7 +273,9 @@ uberTalent{ name = "Worldly Knowledge", mode = "passive", cant_steal = true, + no_npc_use = true, on_learn = function(self, t, kind) + if not game.party:hasMember(self) then return end local Chat = require "engine.Chat" local chat = Chat.new("worldly-knowledge", {name="Worldly Knowledge"}, self) chat:invoke()