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

Smoke Bomb affects a radius at higher levels

Foes affected by smoke bomb do not prevent stealthing (event at close range)
Hide In Plain Sight chance is now checked once instead of once per foes


git-svn-id: http://svn.net-core.org/repos/t-engine4@6060 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8ec9522c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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,
}
......
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