diff --git a/game/modules/tome/class/Encounter.lua b/game/modules/tome/class/Encounter.lua index f972823f372e18ec33e6fa2669faf8ef22807f4f..55f0971a41f1be6c7dc5083749848ac58b1650ce 100644 --- a/game/modules/tome/class/Encounter.lua +++ b/game/modules/tome/class/Encounter.lua @@ -69,7 +69,7 @@ function _M:findSpot(who, what) what = what or "block_move" local spots = {} for i = -1, 1 do for j = -1, 1 do if i ~= 0 or j ~= 0 then - if not game.level.map:checkAllEntities(who.x + i, who.y + j, what, who) then + if not game.level.map:checkAllEntities(who.x + i, who.y + j, what, who) and game.level.map:checkAllEntities(who.x + i, who.y + j, "can_encounter", who) then spots[#spots+1] = {who.x + i, who.y + j} end end end end diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 785701684a33a32dc27ca3aa4e1a749e48078a71..3f9c8a76b8accce025328e1032eca72c2c5762fe 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -159,12 +159,14 @@ function _M:playerFOV() self:computeFOV(self.sight or 20, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:apply(x, y, math.max((20 - math.sqrt(sqdist)) / 14, 0.6)) end, true, false, true) - self:computeFOV(self.lite, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:applyLite(x, y) end, true, true, true) + if self.lite == 0 then game.level.map:applyLite(self.x, self.y) + else self:computeFOV(self.lite, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:applyLite(x, y) end, true, true, true) end end - -- Handle Sense spell, a simple FOV, using cache. Note that this means some terrain features can be made to block sensing - if self:attr("infravision") then - self:computeFOV(self.infravision, "block_sight", function(x, y) if game.level.map(x, y, game.level.map.ACTOR) then game.level.map.seens(x, y, 1) end end, true, true, true) + -- Handle infravision/heightened_senses which allow to see outside of lite radius but with LOS + if self:attr("infravision") or self:attr("heightened_senses") then + local rad = (self.heightened_senses or 0) + (self.infravision or 0) + self:computeFOV(rad, "block_sight", function(x, y) if game.level.map(x, y, game.level.map.ACTOR) then game.level.map.seens(x, y, 1) end end, true, true, true) end -- Handle Sense spell, a simple FOV, using cache. Note that this means some terrain features can be made to block sensing diff --git a/game/modules/tome/data/talents/cunning/survival.lua b/game/modules/tome/data/talents/cunning/survival.lua index 4a33fc56931535d534003b8861a6f815743828eb..b47cedfd4163afe953d7da5034dca290c52f4ceb 100644 --- a/game/modules/tome/data/talents/cunning/survival.lua +++ b/game/modules/tome/data/talents/cunning/survival.lua @@ -30,11 +30,34 @@ newTalent{ } newTalent{ - name = "Trap Disarm", + name = "Heightened Senses", type = {"cunning/survival", 2}, require = cuns_req2, mode = "passive", points = 5, + on_learn = function(self, t) + self.heightened_senses = 2 + math.ceil(self:getTalentLevel(t)) + end, + on_unlearn = function(self, t) + if self:knowTalent(t) then + self.heightened_senses = 2 + math.ceil(self:getTalentLevel(t)) + else + self.heightened_senses = nil + end + end, + info = function(self, t) + return ([[You notice the small things others do not notice, allowing you to "see" creatures in a %d radius even outside of light radius. + This is not telepathy though and is still limited to line of sight.]]): + format(2 + math.ceil(self:getTalentLevel(t))) + end, +} + +newTalent{ + name = "Trap Disarm", + type = {"cunning/survival", 3}, + require = cuns_req3, + mode = "passive", + points = 5, info = function(self, t) return ([[You have learnt to disarm traps (%d disarm power).]]): format(self:getTalentLevel(t) * self:getCun(25)) @@ -43,9 +66,9 @@ newTalent{ newTalent{ name = "Evasion", - type = {"cunning/survival", 3}, + type = {"cunning/survival", 4}, points = 5, - require = cuns_req3, + require = cuns_req4, stamina = 35, cooldown = 30, action = function(self, t) @@ -59,15 +82,3 @@ newTalent{ Duration increases with Willpower, and chance to evade with Cunning and Dexterity.]]):format(5 * self:getTalentLevel(t) + self:getCun(25) + self:getDex(25), 5 + self:getWil(10)) end, } - -newTalent{ - name = "Long Strides", - type = {"cunning/survival", 4}, - require = cuns_req4, - mode = "passive", - points = 5, - info = function(self, t) - return ([[Reduces the movement penality when moving over dangerous terrain.]]): - format() - end, -} diff --git a/game/modules/tome/data/talents/techniques/combat-techniques.lua b/game/modules/tome/data/talents/techniques/combat-techniques.lua index 759813ebb1dc8f33c4af1be038e6fc67c34fab1b..831a9c9b516bc98be4aeb9b586555b91d3cac4ff 100644 --- a/game/modules/tome/data/talents/techniques/combat-techniques.lua +++ b/game/modules/tome/data/talents/techniques/combat-techniques.lua @@ -47,43 +47,11 @@ newTalent{ end, } -newTalent{ - name = "Blinding Speed", - type = {"technique/combat-techniques-active", 2}, - points = 5, - cooldown = 55, - stamina = 25, - require = techs_strdex_req2, - action = function(self, t) - self:setEffect(self.EFF_SPEED, 5, {power=1 - (1 / (1 + self:getTalentLevel(t) * 0.06))}) - return true - end, - info = function(self, t) - return ([[Through rigorous training you have learned to focus your actions for a short while, increasing your speed by %d%% for 5 turns.]]):format(self:getTalentLevel(t) * 6) - end, -} - -newTalent{ - name = "Perfect Strike", - type = {"technique/combat-techniques-active", 3}, - points = 5, - cooldown = 55, - stamina = 25, - require = techs_strdex_req3, - action = function(self, t) - self:setEffect(self.EFF_ATTACK, 1 + self:getTalentLevel(t), {power=100}) - return true - end, - info = function(self, t) - return ([[You have learned to focus your blows to hit your target, granting +100 attack for %d turns.]]):format(1 + self:getTalentLevel(t)) - end, -} - newTalent{ name = "Rush", - type = {"technique/combat-techniques-active", 4}, + type = {"technique/combat-techniques-active", 2}, message = "@Source@ rushes out!", - require = techs_strdex_req4, + require = techs_strdex_req2, points = 5, stamina = 45, cooldown = 50, @@ -121,6 +89,38 @@ newTalent{ end, } +newTalent{ + name = "Perfect Strike", + type = {"technique/combat-techniques-active", 3}, + points = 5, + cooldown = 55, + stamina = 25, + require = techs_strdex_req3, + action = function(self, t) + self:setEffect(self.EFF_ATTACK, 1 + self:getTalentLevel(t), {power=100}) + return true + end, + info = function(self, t) + return ([[You have learned to focus your blows to hit your target, granting +100 attack for %d turns.]]):format(1 + self:getTalentLevel(t)) + end, +} + +newTalent{ + name = "Blinding Speed", + type = {"technique/combat-techniques-active", 4}, + points = 5, + cooldown = 55, + stamina = 25, + require = techs_strdex_req4, + action = function(self, t) + self:setEffect(self.EFF_SPEED, 5, {power=1 - (1 / (1 + self:getTalentLevel(t) * 0.06))}) + return true + end, + info = function(self, t) + return ([[Through rigorous training you have learned to focus your actions for a short while, increasing your speed by %d%% for 5 turns.]]):format(self:getTalentLevel(t) * 6) + end, +} + ---------------------------------------------------- -- Passive techniques ---------------------------------------------------- diff --git a/ideas/cunning.ods b/ideas/cunning.ods index 91bb9d6b8b8c5e24444b54b8e57e3063b067d222..d7e92b7e28a487bc92a844b789d73e3ac906c2d0 100644 Binary files a/ideas/cunning.ods and b/ideas/cunning.ods differ diff --git a/ideas/divine.ods b/ideas/divine.ods index 51c6ef75bd1c8aaa36e7ae4c0a135f8e7a9bd59e..de0f47f4f5f3b7f70f74a3b5f4ff322af709d544 100644 Binary files a/ideas/divine.ods and b/ideas/divine.ods differ diff --git a/ideas/technics.ods b/ideas/technics.ods index 349460d0e04e062cff8f42a2e6cc63bcc77001ef..1fb0dd078233b6b8be4621b59af14429e07f5296 100644 Binary files a/ideas/technics.ods and b/ideas/technics.ods differ