def iterate_fov(self, x, y, range, action): xy = util.iterate_fov(x, y, range, self.current.width - 1, self.current.height - 1) for x,y in xy: # if libtcod.map_is_in_fov(self.current.fov_map, x, y): if rlfl.has_flag(self.current.fov_map0, (x, y), rlfl.CELL_SEEN): tile = self.current._map[y][x] if tile: action(tile, x, y, self.current)
def iterate_fov(self, x, y, range, action): xy = util.iterate_fov(x, y, range, self.current.width - 1, self.current.height - 1) for x, y in xy: # if libtcod.map_is_in_fov(self.current.fov_map, x, y): if rlfl.has_flag(self.current.fov_map0, (x, y), rlfl.CELL_SEEN): tile = self.current._map[y][x] if tile: action(tile, x, y, self.current)
def _nexttoplayer(self, crit, player, map): xyz = util.iterate_fov(crit.x, crit.y, 1, map.current.width, map.current.height) for xy in xyz: if xy == (player.x, player.y): return True return False