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

aspects

git-svn-id: http://svn.net-core.org/repos/t-engine4@328 51575b47-30f0-44d4-a5cc-537603b46e54
parent b5505087
No related branches found
No related tags found
No related merge requests found
......@@ -248,7 +248,11 @@ function _M:canLearnTalent(t)
end
if req.talent then
for _, tid in ipairs(req.talent) do
if not self:knowTalent(tid) then return nil, "missing dependency" end
if type(tid) == "table" then
if self:getTalentLevelRaw(tid[1]) < tid[2] then return nil, "missing dependency" end
else
if not self:knowTalent(tid) then return nil, "missing dependency" end
end
end
end
end
......@@ -297,8 +301,13 @@ function _M:getTalentReqDesc(t_id, levmod)
end
if req.talent then
for _, tid in ipairs(req.talent) do
local c = self:knowTalent(tid) and "#00ff00#" or "#ff0000#"
str = str .. ("- %sTalent %s\n"):format(c, self:getTalentFromId(tid).name)
if type(tid) == "table" then
local c = (self:getTalentLevelRaw(tid[1]) >= tid[2]) and "#00ff00#" or "#ff0000#"
str = str .. ("- %sTalent %s (%d)\n"):format(c, self:getTalentFromId(tid[1]).name, tid[2])
else
local c = self:knowTalent(tid) and "#00ff00#" or "#ff0000#"
str = str .. ("- %sTalent %s\n"):format(c, self:getTalentFromId(tid).name)
end
end
end
......
-- Wild Gifts
newTalentType{ type="gift/slime", name = "slime powers", description = "Through dedicated consumption of slime mold juice you have gained an affinity with slime molds." }
newTalentType{ type="gift/sand", name = "sand powers", description = "After consuming the heart of the Sandworm Queen you begin to gain command over the sand." }
newTalentType{ type="gift/slime", name = "slime aspect", description = "Through dedicated consumption of slime mold juice you have gained an affinity with slime molds." }
newTalentType{ type="gift/sand", name = "sand aspect", description = "After consuming the heart of the Sandworm Queen you begin to gain command over the sand." }
-- Generic requires for gifts based on talent level
gifts_req1 = {
......
......@@ -15,6 +15,11 @@ newEntity{
who.unused_talents = who.unused_talents + 2
game.logPlayer(who, "You have %d stat point(s) to spend. Press G to use them.", who.unused_stats)
game.logPlayer(who, "You have %d talent point(s) to spend. Press G to use them.", who.unused_talents)
who:learnTalentType("gift/sand", true)
game.logPlayer(who, "You are transformed by the heart of the Queen!.")
game.logPlayer(who, "#00FF00#You gain an affinity for sand. You can now learn new sand talents (press G).")
return "destroy", true
end}
}
No preview for this file type
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