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

fix???

git-svn-id: http://svn.net-core.org/repos/t-engine4@5675 51575b47-30f0-44d4-a5cc-537603b46e54
parent 12018cfc
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,11 @@
local lpeg = require "lpeg"
function math.decimals(v, nb)
nb = 10 ^ nb
return math.floor(v * nb) / nb
end
function lpeg.anywhere (p)
return lpeg.P{ p + 1 * lpeg.V(1) }
end
......
......@@ -25,7 +25,7 @@ newTalent{
points = 5,
getWoundReduction = function(self, t) return self:getTalentLevel(t)/10 end,
getHealMod = function(self, t) return self:combatTalentStatDamage(t, "con", 10, 50) end,
getLifeRegen = function(self, t) return self:combatTalentStatDamage(t, "con", 2, 20) end,
getLifeRegen = function(self, t) return math.decimals(self:combatTalentStatDamage(t, "con", 2, 20), 2) end,
getDuration = function(self, t) return 2 + math.ceil(self:getTalentLevel(t)) end,
do_vitality_recovery = function(self, t)
self:setEffect(self.EFF_RECOVERY, t.getDuration(self, t), {heal_mod = t.getHealMod(self, t), regen = t.getLifeRegen(self, t)})
......
......@@ -87,7 +87,7 @@ floorEffect{
local tid = rng.table{self.EFF_ROTTING_DISEASE, self.EFF_DECREPITUDE_DISEASE, self.EFF_DECREPITUDE_DISEASE}
if not self:hasEffect(tid) then
local l = game.zone:level_adjust_level(game.level, game.zone, "object")
local p = 4 + l / 2
local p = math.ceil(4 + l / 2)
self:setEffect(tid, 8, {str=p, con=p, dex=p, dam=5 + l / 2, src=self})
end
end
......
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