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

Disperse magic now respects range

git-svn-id: http://svn.net-core.org/repos/t-engine4@4764 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0db52884
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,14 @@ newTalent{
local target = self
if self:getTalentLevel(t) >= 3 then
local tx, ty = self:getTarget{type="hit", range=self:getTalentRange(t)}
local tg = {type="hit", range=self:getTalentRange(t)}
local tx, ty = self:getTarget(tg)
if tx and ty and game.level.map(tx, ty, Map.ACTOR) then
local _ _, tx, ty = self:canProject(tg, tx, ty)
if not tx then return nil end
target = game.level.map(tx, ty, Map.ACTOR)
if not target then return nil end
target = game.level.map(tx, ty, Map.ACTOR)
else return nil
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