diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index 5939a76d2fef93aa8f88c8ba91d6976749562906..910df7c5231cb5d69ec6181565fb391d9f0345a5 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -88,7 +88,7 @@ function _M:lineFOV(tx, ty, extra_block, block, sx, sy) sy = sy or self.y local act = game.level.map(tx, ty, engine.Map.ACTOR) local sees_target = core.fov.distance(sx, sy, tx, ty) <= self.sight and game.level.map.lites(tx, ty) or - act and self:canSee(act) and core.fov.distance(sx, sy, tx, ty) <= math.max(self.sight, (self.heightened_senses or 0) + (self.infravision or 0)) + act and self:canSee(act) and core.fov.distance(sx, sy, tx, ty) <= math.max(self.sight, math.min(self.sight, (self.heightened_senses or 0) + (self.infravision or 0))) local darkVisionRange if self:knowTalent(self.T_DARK_VISION) then