From 8e3fba36f112ac0769104bcb212b863af68033c1 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Fri, 20 Sep 2013 00:28:58 +0200 Subject: [PATCH] Aether Beam and Gravitic Trap can not be placed in walls --- game/modules/tome/data/talents/cunning/traps.lua | 1 + game/modules/tome/data/talents/spells/aether.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/game/modules/tome/data/talents/cunning/traps.lua b/game/modules/tome/data/talents/cunning/traps.lua index cdb5f53cb5..881f45ff9f 100644 --- a/game/modules/tome/data/talents/cunning/traps.lua +++ b/game/modules/tome/data/talents/cunning/traps.lua @@ -648,6 +648,7 @@ newTalent{ if not x or not y then return nil end local _ _, x, y = self:canProject(tg, x, y) if game.level.map(x, y, Map.TRAP) then game.logPlayer(self, "You somehow fail to set the trap.") return nil end + if game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then game.logPlayer(self, "You somehow fail to set the trap.") return nil end local dam = t.getDamage(self, t) -- Need to pass the actor in to the triggered function for the apply_power to work correctly diff --git a/game/modules/tome/data/talents/spells/aether.lua b/game/modules/tome/data/talents/spells/aether.lua index e7e152f578..a783f57458 100644 --- a/game/modules/tome/data/talents/spells/aether.lua +++ b/game/modules/tome/data/talents/spells/aether.lua @@ -62,6 +62,7 @@ newTalent{ if not x or not y then return nil end local _ _, x, y = self:canProject(tg, x, y) if game.level.map(x, y, Map.TRAP) then game.logPlayer(self, "You somehow fail to set the aether beam.") return nil end + if game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then game.logPlayer(self, "You somehow fail to set the aether beam.") return nil end local t = basetrap(self, t, x, y, 44, { type = "aether", name = "aether beam", color=colors.VIOLET, image = "trap/trap_glyph_explosion_01_64.png", -- GitLab