Skip to content
Snippets Groups Projects
Commit 8e3fba36 authored by DarkGod's avatar DarkGod
Browse files

Aether Beam and Gravitic Trap can not be placed in walls

parent 23705675
No related branches found
No related tags found
No related merge requests found
...@@ -648,6 +648,7 @@ newTalent{ ...@@ -648,6 +648,7 @@ newTalent{
if not x or not y then return nil end if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y) 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(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) local dam = t.getDamage(self, t)
-- Need to pass the actor in to the triggered function for the apply_power to work correctly -- Need to pass the actor in to the triggered function for the apply_power to work correctly
......
...@@ -62,6 +62,7 @@ newTalent{ ...@@ -62,6 +62,7 @@ newTalent{
if not x or not y then return nil end if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y) 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(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, { local t = basetrap(self, t, x, y, 44, {
type = "aether", name = "aether beam", color=colors.VIOLET, image = "trap/trap_glyph_explosion_01_64.png", type = "aether", name = "aether beam", color=colors.VIOLET, image = "trap/trap_glyph_explosion_01_64.png",
......
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