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

Healing flyers are only shown when seen

git-svn-id: http://svn.net-core.org/repos/t-engine4@4460 51575b47-30f0-44d4-a5cc-537603b46e54
parent e1644b8a
No related branches found
No related tags found
No related merge requests found
......@@ -1011,7 +1011,7 @@ function _M:onHeal(value, src)
end
print("[HEALING]", self.uid, self.name, "for", value)
if not self.resting and value >= 1 then
if not self.resting and value >= 1 and game.level.map.seens(self.x, self.y) then
local sx, sy = game.level.map:getTileToScreen(self.x, self.y)
game.flyers:add(sx, sy, 30, rng.float(-3, -2), (rng.range(0,2)-1) * 0.5, tostring(math.ceil(value)), {255,255,0})
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