Skip to content
Snippets Groups Projects
Commit 7e0782d5 authored by dg's avatar dg
Browse files

Malslek the Accursed's Hat now has a talent on mindpower effect too

git-svn-id: http://svn.net-core.org/repos/t-engine4@5994 51575b47-30f0-44d4-a5cc-537603b46e54
parent 71b6708c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment