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

color

git-svn-id: http://svn.net-core.org/repos/t-engine4@96 51575b47-30f0-44d4-a5cc-537603b46e54
parent fdb9d13d
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@ end
function _M:defineHotkey(id)
self.actor.hotkey[id] = self.list[self.talentsel].talent
self:simplePopup("Hotkey "..id.." assigned", self.actor:getTalentFromId(self.list[self.talentsel].talent).name:capitalize().." assigned to hotkey "..id)
self.actor.changed = true
end
function _M:use()
......
......@@ -137,6 +137,16 @@ function _M:learnTalent(t_id, force)
if not ok and err then return nil, err end
end
-- Auto assign to hotkey
if t.mode ~= "passive" then
for i = 1, 12 do
if not self.hotkey[i] then
self.hotkey[i] = t_id
break
end
end
end
self.talents[t_id] = true
self.changed = true
return true
......@@ -146,6 +156,9 @@ end
-- @param t_id the id of the talent to learn
-- @return true if the talent was unlearnt, nil and an error message otherwise
function _M:unlearnTalent(t_id)
for i, known_t_id in pairs(self.hotkey) do
if known_t_id == t_id then self.hotkey[i] = nil end
end
self.talents[t_id] = nil
self.changed = true
return true
......
......@@ -100,7 +100,7 @@ newBirthDescriptor{
Fallohide = "allow",
},
},
stats = { str=-2, cun=2, dex=3, con=2, },
stats = { str=-3, dex=3, con=2, lck=5, },
experience = 1.1,
talents = {
ActorTalents.T_IMPROVED_HEALTH_I,
......
......@@ -44,7 +44,15 @@ function _M:generateList()
local typename = "talent"
if t.type[1]:find("^spell/") then typename = "spell" end
list[#list+1] = { name=" "..t.name.." ("..typename..")", talent=t.id }
if self.actor:knowTalent(t.id) then known[#known+1] = "#00FF00#known" else known[#known+1] = t.points.." point(s)" end
if self.actor:knowTalent(t.id) then
known[#known+1] = "#00FF00#known"
else
if not self.actor:canLearnTalent(t) then
known[#known+1] = "#FF0000#"..t.points.." point(s)"
else
known[#known+1] = t.points.." point(s)"
end
end
end
end
else
......
......@@ -20,6 +20,8 @@ ActorStats:defineStat("Magic", "mag", 10, 1, 100, "Magic defines your character
ActorStats:defineStat("Willpower", "wil", 10, 1, 100, "Willpower defines your character's ability to concentrate. It increases your mana and stamina capacity, and your chance to resist mental attacks.")
ActorStats:defineStat("Cunning", "cun", 10, 1, 100, "Cunning defines your character's ability to learn and think. It allows you to learn many wordly abilities, increases your mental resistance and armor penetration.")
ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximun life and physical resistance.")
-- Luck is hidden and start at half max value (50) which is considered the standard
ActorStats:defineStat("Luck", "lck", 50, 1, 100, "Luck defines your character's chance when dealing with unknown events. It increases yoru critical strike chances, your chance for random encounters, ...")
-- Actor autolevel schemes
dofile("/data/autolevel_schemes.lua")
-- Actor AIs
......
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