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

* flying damage text is never a float

* nature 3rd spell: Restoration, cures poisons and diseases


git-svn-id: http://svn.net-core.org/repos/t-engine4@442 51575b47-30f0-44d4-a5cc-537603b46e54
parent a44e0c2d
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,9 @@ setDefaultProjector(function(src, x, y, type, dam)
end
else
if src == game.player then
game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, tostring(-dam), {0,255,0})
game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, tostring(-math.ceil(dam)), {0,255,0})
elseif target == game.player then
game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, tostring(-dam), {255,0,0})
game.flyers:add(sx, sy, 30, (rng.range(0,2)-1) * 0.5, -3, tostring(-math.ceil(dam)), {255,0,0})
end
end
end
......
......@@ -39,10 +39,45 @@ newTalent{
}
newTalent{
name = "Nature's Call",
name = "Restoration",
type = {"spell/nature", 3},
require = spells_req3,
points = 5,
mana = 30,
cooldown = 15,
action = function(self, t)
local target = self
local effs = {}
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "poison" or e.type == "disease" then
effs[#effs+1] = {"effect", eff_id}
end
end
for i = 1, math.floor(self:getTalentLevel(t)) do
if #effs == 0 then break end
local eff = rng.tableRemove(effs)
if eff[1] == "effect" then
target:removeEffect(eff[2])
end
end
return true
end,
info = function(self, t)
return ([[Call upon the forces of nature to cure your body of %d poisons and diseases(at level 3).]]):format(math.floor(self:getTalentLevel(t)))
end,
}
newTalent{
name = "Nature's Call",
type = {"spell/nature", 4},
require = spells_req4,
points = 5,
mana = 60,
cooldown = 100,
tactical = {
......
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