Commit 8d9365dfddc12d1e65555f5e653d9511a1212816
1 parent
e2dc419d
Fixed Infestation's carrion worms poping over npcs/you sometimes
Showing
1 changed file
with
3 additions
and
10 deletions
@@ -197,16 +197,9 @@ newTalent{ | @@ -197,16 +197,9 @@ newTalent{ | ||
197 | if not self.turn_procs.infestation then | 197 | if not self.turn_procs.infestation then |
198 | self.turn_procs.infestation = true | 198 | self.turn_procs.infestation = true |
199 | 199 | ||
200 | - local nb = 0 | ||
201 | - | ||
202 | - local grids = {} | ||
203 | - self:project({type="ball", range=0, radius=2, talent=t}, self.x, self.y, function(px, py) | ||
204 | - if not ((px == x and py == y) or game.level.map:checkEntity(px, py, Map.TERRAIN, "block_move") or game.level.map(px, py, Map.TRAP)) then grids[#grids+1] = {x=px, y=py} end | ||
205 | - end) | ||
206 | - | ||
207 | - local g = rng.tableRemove(grids) | ||
208 | - if g then | ||
209 | - carrionworm(self, self, 5, g.x, g.y) | 200 | + local gx, gy = util.findFreeGrid(self.x, self.y, 2, true, {[Map.ACTOR]=true}) |
201 | + if gx and gy then | ||
202 | + carrionworm(self, self, 5, gx, gy) | ||
210 | end | 203 | end |
211 | end | 204 | end |
212 | return cb.value | 205 | return cb.value |
-
Please register or login to post a comment