modified: black_widow.lua
modified: uloboros.lua Added webber_ability function
This commit is contained in:
parent
a77f64f519
commit
457ad939f1
@ -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,
|
||||||
})
|
})
|
||||||
|
14
uloboros.lua
14
uloboros.lua
@ -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,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user