Skip to content
Snippets Groups Projects
Commit ea9e0dab authored by DarkGod's avatar DarkGod
Browse files

Prevent getting prodigies you do not qualify for

parent 20a388b6
No related branches found
No related tags found
No related merge requests found
......@@ -200,7 +200,15 @@ function _M:finish()
-- Prodigies
if self.on_finish_prodigies then
for tid, ok in pairs(self.on_finish_prodigies) do if ok then self.actor:learnTalent(tid, true, nil, {no_unlearn=true}) end end
for tid, ok in pairs(self.on_finish_prodigies) do if ok then
local t = self.actor:getTalentFromId(tid)
if self.actor:canLearnTalent(t) or config.settings.cheat then
self.actor:learnTalent(tid, true, nil, {no_unlearn=true})
else
game.log("#LIGHT_RED#Requirements for %s not met, prodigy not learnt.", t.name)
self.actor.unused_prodigies = self.actor.unused_prodigies + 1
end
end end
end
if not self.on_birth then
......
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