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

Displacement Shield cast correctly respects maximun range

git-svn-id: http://svn.net-core.org/repos/t-engine4@4736 51575b47-30f0-44d4-a5cc-537603b46e54
parent a04317b9
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,10 @@ newTalent{
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty or not target then return nil end
local _ _, tx, ty = self:canProject(tg, tx, ty)
target = game.level.map(tx, ty, Map.ACTOR)
if target == self then target = nil end
if not target then return end
self:setEffect(self.EFF_DISPLACEMENT_SHIELD, t.getDuration(self, t), {power=t.getMaxAbsorb(self, t), target=target, chance=t.getTransferChange(self, t)})
game:playSoundNear(self, "talents/teleport")
......
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