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

Gem Portal cooldown is now reduced by talent level. Also it wont enter cooldown if not moved

git-svn-id: http://svn.net-core.org/repos/t-engine4@4690 51575b47-30f0-44d4-a5cc-537603b46e54
parent 893c3a21
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,7 @@ newTalent{
name = "Gem Portal",
type = {"spell/stone-alchemy",3},
require = spells_req3,
cooldown = 20,
cooldown = function(self, t) return math.max(5, 20 - (self:getTalentLevelRaw(t) * 2)) end,
mana = 20,
points = 5,
range = 1,
......@@ -161,8 +161,13 @@ newTalent{
if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y)
for i = 1, 5 do self:removeObject(self:getInven("QUIVER"), 1) end
local l = line.new(self.x, self.y, x, y)
local nextx, nexty = l()
if not nextx or not game.level.map:checkEntity(nextx, nexty, Map.TERRAIN, "block_move", self) then return end
self:probabilityTravel(x, y, t.getRange(self, t))
for i = 1, 5 do self:removeObject(self:getInven("QUIVER"), 1) end
game:playSoundNear(self, "talents/arcane")
return true
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