modified: black_widow.lua

modified:   uloboros.lua
Added webber_ability function
This commit is contained in:
npx 2016-04-24 15:54:49 +02:00
parent a77f64f519
commit 457ad939f1
2 changed files with 2 additions and 26 deletions

View File

@ -52,18 +52,6 @@ nssm:register_mob("nssm:black_widow", {
punch_end = 160, punch_end = 160,
}, },
do_custom = function(self) do_custom = function(self)
--Webber: puts web around himself nssm:webber_ability(self, "nssm:web", 3)
local pos = self.object:getpos()
if (math.random(1,75)==1) then
local dx=math.random(1,3)
local dz=math.random(1,3)
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
local t = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
local n = minetest.env:get_node(p).name
local k = minetest.env:get_node(t).name
if ((n~="air")and(k=="air")) then
minetest.env:set_node(t, {name="nssm:web"})
end
end
end, end,
}) })

View File

@ -52,18 +52,6 @@ nssm:register_mob("nssm:uloboros", {
punch_end = 110, punch_end = 110,
}, },
do_custom = function(self) do_custom = function(self)
--Webber: puts web around himself nssm:webber_ability(self, "nssm:web", 3)
local pos = self.object:getpos()
if (math.random(1,75)==1) then
local dx=math.random(1,3)
local dz=math.random(1,3)
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
local t = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
local n = minetest.env:get_node(p).name
local k = minetest.env:get_node(t).name
if ((n~="air")and(k=="air")) then
minetest.env:set_node(t, {name="nssm:web"})
end
end
end, end,
}) })