diff --git a/game/modules/tome/data/talents/cunning/stealth.lua b/game/modules/tome/data/talents/cunning/stealth.lua index b7395a56925ead964906150e3d1005e3bcf45461..7f9b9582628a706799f4dbb8e7bfa445e987f629 100644 --- a/game/modules/tome/data/talents/cunning/stealth.lua +++ b/game/modules/tome/data/talents/cunning/stealth.lua @@ -39,14 +39,19 @@ newTalent{ -- Check nearby actors if not self.x or not self.y or not game.level then return end - local grids = core.fov.circle_grids(self.x, self.y, t.getRadius(self, t), true) - for x, yy in pairs(grids) do for y in pairs(yy) do - local actor = game.level.map(x, y, game.level.map.ACTOR) - if actor and actor ~= self and actor:reactionToward(self) < 0 and not rng.percent(self.hide_chance or 0) then - if not silent then game.logPlayer(self, "You cannot Stealth with nearby foes watching!") end - return nil - end - end end + + if not rng.percent(self.hide_chance or 0) then + local grids = core.fov.circle_grids(self.x, self.y, t.getRadius(self, t), true) + for x, yy in pairs(grids) do for y in pairs(yy) do + local actor = game.level.map(x, y, game.level.map.ACTOR) + if actor and actor ~= self and actor:reactionToward(self) < 0 then + if not actor:hasEffect(actor.EFF_DIM_VISION) then + if not silent then game.logPlayer(self, "You cannot Stealth with nearby foes watching!") end + return nil + end + end + end end + end return true end, activate = function(self, t) diff --git a/game/modules/tome/data/talents/cunning/traps.lua b/game/modules/tome/data/talents/cunning/traps.lua index e109cb6397dd46297756231a805adcc15f6dfeac..b88c6861746b19a5505403a02b9ec89f97d2a15c 100644 --- a/game/modules/tome/data/talents/cunning/traps.lua +++ b/game/modules/tome/data/talents/cunning/traps.lua @@ -159,9 +159,10 @@ newTalent{ proj_speed = 10, requires_target = true, range = 10, + radius = function(self, t) return math.floor(0.5 * self:getTalentLevel(t)) end, tactical = { DISABLE = { blind = 2 } }, action = function(self, t) - local tg = {type="bolt", range=self:getTalentRange(t), talent=t} + local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t} local x, y = self:getTarget(tg) if not x or not y then return nil end self:projectile(tg, x, y, DamageType.STICKY_SMOKE, math.ceil(self:getTalentLevel(t) * 1.2), {type="slime"}) @@ -169,9 +170,10 @@ newTalent{ return true end, info = function(self, t) - return ([[Throws a vial of sticky smoke that explodes on your foe, reducing its vision range by %d for 5 turns. + return ([[Throws a vial of sticky smoke that explodes in radius %d on your foe, reducing its vision range by %d for 5 turns. + Creatures affected by smoke bomb can never prevent you from stealthing even if they are close to you. This can be used while stealthed.]]): - format(math.ceil(self:getTalentLevel(t) * 1.2)) + format(self:getTalentRadius(t), math.ceil(self:getTalentLevel(t) * 1.2)) end, }