Skip to content
Snippets Groups Projects
Commit 35bb27c5 authored by dg's avatar dg
Browse files

corrosive seed can only appear on non-walls

git-svn-id: http://svn.net-core.org/repos/t-engine4@6555 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8539c616
No related branches found
No related tags found
No related merge requests found
......@@ -128,10 +128,13 @@ newTalent{
local tg = {type="ball", radius=self:getTalentRadius(t), range=self:getTalentRange(t)}
local grids = {}
self:project(tg, x, y, function(px, py) grids[#grids+1] = {x=px, y=py} end)
self:project(tg, x, y, function(px, py)
if not game.level.map:checkEntity(px, py, Map.TERRAIN, "block_move") then grids[#grids+1] = {x=px, y=py} end
end)
for i = 1, t.getNb(self, t) do
local spot = rng.tableRemove(grids)
if not spot then break end
local t = basetrap(self, t, spot.x, spot.y, 6, {
type = "seed", name = "corrosive seed", color=colors.VIOLET, image = "trap/corrosive_seeds.png",
disarm_power = self:combatMindpower(),
......
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