diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 9e48ee81284e94a62b25b4308e7520cd8757395d..a4030a73f047f554e2dd42462cf6879b93807c2b 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -1179,6 +1179,26 @@ function _M:getTextualDesc(compare_with) desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) end + local talents = {} + if self.talent_on_mind then + for _, data in ipairs(self.talent_on_mind) do + talents[data.talent] = {data.chance, data.level} + end + end + for i, v in ipairs(compare_with or {}) do + for _, data in ipairs(v[field] and (v[field].talent_on_mind or {})or {}) do + local tid = data.talent + if not talents[tid] or talents[tid][1]~=data.chance or talents[tid][2]~=data.level then + desc:add({"color","RED"}, ("Talent on hit(nature): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, data.chance, data.level), {"color","LAST"}, true) + else + talents[tid][3] = true + end + end + end + for tid, data in pairs(talents) do + desc:add(talents[tid][3] and {"color","GREEN"} or {"color","WHITE"}, ("Talent on hit(mindpower): %s (%d%% chance level %d)."):format(self:getTalentFromId(tid).name, talents[tid][1], talents[tid][2]), {"color","LAST"}, true) + end + if self.curse then local t = game.player:getTalentFromId(game.player.T_DEFILING_TOUCH) if t and t.canCurseItem(game.player, t, self) then diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index acff26d442f268aca044872010320d00b1350c69..92f31ae388b4e781229371e2f34d87181deb3924 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -5354,6 +5354,7 @@ newEntity{ base = "BASE_WIZARD_HAT", --Thanks SageAcrin! }, }, talent_on_spell = { {chance=10, talent=Talents.T_AGONY, level=2} }, + talent_on_mind = { {chance=10, talent=Talents.T_HATEFUL_WHISPER, level=2} }, } newEntity{ base = "BASE_TOOL_MISC", --And finally, Thank you, Darkgod, for making such a wonderful game!