code tweak/tidy, fixed bugs, spawn on 5.x nodes
This commit is contained in:
parent
ebadbee53d
commit
9348a169fc
@ -1,3 +1,8 @@
|
|||||||
|
v3.02 (26th Jul 2020):
|
||||||
|
- Tweaked and tidied code
|
||||||
|
- Fixed bugs and used latest mobs redo api functions
|
||||||
|
- Changed spawning to use new minetest 5.x dirt types
|
||||||
|
|
||||||
v3.01 (8th Aug 2018):
|
v3.01 (8th Aug 2018):
|
||||||
- Fixed missing functions so that nssm uses mobs redo's global functions;
|
- Fixed missing functions so that nssm uses mobs redo's global functions;
|
||||||
- Fixed performance issue thanks to Ihofhansl
|
- Fixed performance issue thanks to Ihofhansl
|
||||||
|
170
darts.lua
170
darts.lua
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
local function duck_explosion(pos)
|
local function duck_explosion(pos)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
pos.y = pos.y+1;
|
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 10,
|
amount = 10,
|
||||||
time = 0.2,
|
time = 0.2,
|
||||||
@ -21,9 +23,13 @@ local function duck_explosion(pos)
|
|||||||
vertical = false,
|
vertical = false,
|
||||||
texture = "duck_egg_fragments.png",
|
texture = "duck_egg_fragments.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
core.after(0.4, function()
|
core.after(0.4, function()
|
||||||
for dx = -1,1 do
|
|
||||||
pos = {x = pos.x+dx, y=pos.y; z=pos.z+dx}
|
for dx = -1, 1 do
|
||||||
|
|
||||||
|
pos = {x = pos.x + dx, y = pos.y, z = pos.z + dx}
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 100,
|
amount = 100,
|
||||||
time = 0.2,
|
time = 0.2,
|
||||||
@ -41,6 +47,7 @@ local function duck_explosion(pos)
|
|||||||
vertical = false,
|
vertical = false,
|
||||||
texture = "tnt_smoke.png",
|
texture = "tnt_smoke.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.add_entity(pos, "nssm:duck")
|
minetest.add_entity(pos, "nssm:duck")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -52,6 +59,7 @@ mobs:register_arrow("nssm:duck_father", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"duck_egg.png"},
|
textures = {"duck_egg.png"},
|
||||||
velocity = 8,
|
velocity = 8,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
@ -70,16 +78,21 @@ mobs:register_arrow("nssm:duck_father", {
|
|||||||
|
|
||||||
|
|
||||||
local function ice_explosion(pos)
|
local function ice_explosion(pos)
|
||||||
for i=pos.x-math.random(0, 1), pos.x+math.random(0, 1), 1 do
|
|
||||||
for j=pos.y-1, pos.y+4, 1 do
|
for i = pos.x - math.random(0, 1), pos.x + math.random(0, 1), 1 do
|
||||||
for k=pos.z-math.random(0, 1), pos.z+math.random(0, 1), 1 do
|
|
||||||
local p = {x=i, y=j, z=k}
|
for j = pos.y - 1, pos.y + 4, 1 do
|
||||||
|
|
||||||
|
for k = pos.z-math.random(0, 1), pos.z + math.random(0, 1), 1 do
|
||||||
|
|
||||||
|
local p = {x = i, y = j, z = k}
|
||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
|
|
||||||
if minetest.get_item_group(n, "unbreakable") == 1
|
if minetest.get_item_group(n, "unbreakable") == 1
|
||||||
or minetest.is_protected(p, "")
|
or minetest.is_protected(p, "")
|
||||||
or (n == "bones:bones" and not nssm:affectbones(self)) then
|
or (n == "bones:bones" and not nssm:affectbones(self)) then
|
||||||
else
|
else
|
||||||
minetest.set_node({x=i, y=j, z=k}, {name="default:ice"})
|
minetest.set_node({x = i, y = j, z = k}, {name = "default:ice"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -92,6 +105,7 @@ mobs:register_arrow("nssm:snow_arrow", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"transparent.png"},
|
textures = {"transparent.png"},
|
||||||
velocity =20,
|
velocity =20,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
@ -102,6 +116,7 @@ mobs:register_arrow("nssm:snow_arrow", {
|
|||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
ice_explosion(pos)
|
ice_explosion(pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
ice_explosion(pos)
|
ice_explosion(pos)
|
||||||
end,
|
end,
|
||||||
@ -114,6 +129,7 @@ mobs:register_arrow("nssm:spine", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"manticore_spine_flying.png"},
|
textures = {"manticore_spine_flying.png"},
|
||||||
velocity = 10,
|
velocity = 10,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
player:punch(self.object, 1.0, {
|
player:punch(self.object, 1.0, {
|
||||||
@ -154,18 +170,23 @@ mobs:register_arrow("nssm:morarrow", {
|
|||||||
|
|
||||||
|
|
||||||
local function explosion_web(pos)
|
local function explosion_web(pos)
|
||||||
|
|
||||||
pos.y = round(pos.y)
|
pos.y = round(pos.y)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for i=pos.x-1, pos.x+1, 1 do
|
|
||||||
for j=pos.y-3, pos.y, 1 do
|
for i = pos.x - 1, pos.x + 1, 1 do
|
||||||
for k=pos.z-1, pos.z+1, 1 do
|
for j = pos.y - 3, pos.y, 1 do
|
||||||
local p = {x=i,y=j,z=k}
|
for k = pos.z - 1, pos.z + 1, 1 do
|
||||||
local k = {x=i,y=j+1,z=k}
|
|
||||||
|
local p = {x = i, y = j, z = k}
|
||||||
|
local k = {x = i, y = j + 1, z = k}
|
||||||
local current = minetest.get_node(p).name
|
local current = minetest.get_node(p).name
|
||||||
local ontop = minetest.get_node(k).name
|
local ontop = minetest.get_node(k).name
|
||||||
if (current ~= "air") and
|
|
||||||
|
if (current ~= "air") and
|
||||||
(current ~= "nssm:web") and
|
(current ~= "nssm:web") and
|
||||||
(ontop == "air") and not
|
(ontop == "air") and not
|
||||||
minetest.is_protected(p,"") and not
|
minetest.is_protected(p,"") and not
|
||||||
@ -184,6 +205,7 @@ mobs:register_arrow("nssm:webball", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"web_ball.png"},
|
textures = {"web_ball.png"},
|
||||||
velocity = 8,
|
velocity = 8,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
local p = player:get_pos()
|
local p = player:get_pos()
|
||||||
@ -204,18 +226,23 @@ mobs:register_arrow("nssm:webball", {
|
|||||||
|
|
||||||
|
|
||||||
function explosion_thickweb(pos)
|
function explosion_thickweb(pos)
|
||||||
|
|
||||||
pos.y = round(pos.y)
|
pos.y = round(pos.y)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for i=pos.x+0, pos.x+0, 1 do
|
|
||||||
for j=pos.y-2, pos.y, 1 do
|
for i = pos.x + 0, pos.x + 0, 1 do
|
||||||
for k=pos.z+0, pos.z+0, 1 do
|
for j = pos.y - 2, pos.y, 1 do
|
||||||
local p = {x=i,y=j,z=k}
|
for k = pos.z + 0, pos.z + 0, 1 do
|
||||||
local k = {x=i,y=j+1,z=k}
|
|
||||||
|
local p = {x = i, y = j, z = k}
|
||||||
|
local k = {x = i, y = j + 1, z = k}
|
||||||
local current = minetest.get_node(p).name
|
local current = minetest.get_node(p).name
|
||||||
local ontop = minetest.get_node(k).name
|
local ontop = minetest.get_node(k).name
|
||||||
if (current ~= "air") and
|
|
||||||
|
if (current ~= "air") and
|
||||||
(current ~= "nssm:thick_web") and
|
(current ~= "nssm:thick_web") and
|
||||||
(ontop == "air") and not
|
(ontop == "air") and not
|
||||||
minetest.is_protected(p,"") and not
|
minetest.is_protected(p,"") and not
|
||||||
@ -233,6 +260,7 @@ mobs:register_arrow("nssm:thickwebball", {
|
|||||||
visual_size = {x = 2, y = 2},
|
visual_size = {x = 2, y = 2},
|
||||||
textures = {"thick_web_ball.png"},
|
textures = {"thick_web_ball.png"},
|
||||||
velocity = 8,
|
velocity = 8,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
local p = player:get_pos()
|
local p = player:get_pos()
|
||||||
@ -258,6 +286,7 @@ mobs:register_arrow("nssm:phoenix_arrow", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"transparent.png"},
|
textures = {"transparent.png"},
|
||||||
velocity = 8,
|
velocity = 8,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
end,
|
end,
|
||||||
@ -265,6 +294,7 @@ mobs:register_arrow("nssm:phoenix_arrow", {
|
|||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -276,43 +306,52 @@ mobs:register_arrow("nssm:phoenix_arrow", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if os.time() - self.timer > 5 or minetest.is_protected(pos, "")
|
if os.time() - self.timer > 5 or minetest.is_protected(pos, "")
|
||||||
or ((n~="air") and (n~="nssm:phoenix_fire")) then
|
or ((n ~= "air") and (n ~= "nssm:phoenix_fire")) then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.random(1,2)==2 then
|
if math.random(1, 2) == 2 then
|
||||||
minetest.set_node(pos, {name="nssm:phoenix_fire"})
|
minetest.set_node(pos, {name = "nssm:phoenix_fire"})
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.random(1,6)==1 then
|
if math.random(1, 6) == 1 then
|
||||||
dx = math.random(-1,1)
|
|
||||||
dy = math.random(-1,1)
|
local p = {
|
||||||
dz = math.random(-1,1)
|
x = pos.x + math.random(-1, 1),
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
y = pos.y + math.random(-1, 1),
|
||||||
|
z = pos.z + math.random(-1, 1)
|
||||||
|
}
|
||||||
|
|
||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if n=="air" then
|
|
||||||
minetest.set_node(p, {name="nssm:phoenix_fire"})
|
if n == "air" then
|
||||||
|
minetest.set_node(p, {name = "nssm:phoenix_fire"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function gas_explosion(pos)
|
function gas_explosion(pos)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for dx=-2,2 do
|
|
||||||
for dy=-1,4 do
|
for dx = -2, 2 do
|
||||||
for dz=-2,2 do
|
for dy = -1, 4 do
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
for dz = -2, 2 do
|
||||||
|
|
||||||
|
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||||
|
|
||||||
if minetest.is_protected(p, "") then
|
if minetest.is_protected(p, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if n== "air" then
|
|
||||||
minetest.set_node(p, {name="nssm:venomous_gas"})
|
if n == "air" then
|
||||||
|
minetest.set_node(p, {name = "nssm:venomous_gas"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -322,9 +361,9 @@ end
|
|||||||
mobs:register_arrow("nssm:super_gas", {
|
mobs:register_arrow("nssm:super_gas", {
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
-- textures = {"transparent.png"},
|
|
||||||
textures = {"tnt_smoke.png^[colorize:green:170"},
|
textures = {"tnt_smoke.png^[colorize:green:170"},
|
||||||
velocity = 8,
|
velocity = 8,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
local p = player:get_pos()
|
local p = player:get_pos()
|
||||||
@ -358,11 +397,18 @@ mobs:register_arrow("nssm:roar_of_the_dragon", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 1)
|
local objects = minetest.get_objects_inside_radius(pos, 1)
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
|
|
||||||
local name = obj:get_entity_name()
|
local name = obj:get_entity_name()
|
||||||
if name~="nssm:roar_of_the_dragon" and name ~= "nssm:mese_dragon" then
|
|
||||||
obj:set_hp(obj:get_hp()-0.05)
|
if name ~= "nssm:roar_of_the_dragon"
|
||||||
if (obj:get_hp() <= 0) then
|
and name ~= "nssm:mese_dragon" then
|
||||||
|
|
||||||
|
obj:set_hp(obj:get_hp() - 0.05)
|
||||||
|
|
||||||
|
if obj:get_hp() <= 0 then
|
||||||
|
|
||||||
if (not obj:is_player())
|
if (not obj:is_player())
|
||||||
and name ~= self.object:get_luaentity().name then
|
and name ~= self.object:get_luaentity().name then
|
||||||
obj:remove()
|
obj:remove()
|
||||||
@ -371,16 +417,19 @@ mobs:register_arrow("nssm:roar_of_the_dragon", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.set_node(pos, {name="air"})
|
minetest.set_node(pos, {name = "air"})
|
||||||
if math.random(1,2)==1 then
|
|
||||||
dx = math.random(-1,1)
|
if math.random(1, 2) == 1 then
|
||||||
dy = math.random(-1,1)
|
|
||||||
dz = math.random(-1,1)
|
local p = {
|
||||||
if minetest.is_protected(p, "") then
|
x = pos.x + math.random(-1, 1),
|
||||||
return
|
y = pos.y + math.random(-1, 1),
|
||||||
|
z = pos.z + math.random(-1, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
if not minetest.is_protected(p, "") then
|
||||||
|
minetest.set_node(p, {name = "air"})
|
||||||
end
|
end
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
|
||||||
minetest.set_node(p, {name="air"})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -391,25 +440,32 @@ mobs:register_arrow("nssm:lava_arrow", {
|
|||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"transparent.png"},
|
textures = {"transparent.png"},
|
||||||
velocity = 10,
|
velocity = 10,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for dy=-1, 6, 1 do
|
|
||||||
for dx=-1, 1, 2 do
|
for dy = -1, 6, 1 do
|
||||||
for dz=-1, 1, 2 do
|
for dx = -1, 1, 2 do
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
for dz = -1, 1, 2 do
|
||||||
|
|
||||||
|
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if n~="default:lava_flowing"
|
|
||||||
|
if n ~= "default:lava_flowing"
|
||||||
and not minetest.is_protected(p, "") then
|
and not minetest.is_protected(p, "") then
|
||||||
minetest.set_node(p, {name="default:lava_flowing"})
|
minetest.set_node(p, {name = "default:lava_flowing"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
9
init.lua
9
init.lua
@ -1,12 +1,13 @@
|
|||||||
local path = minetest.get_modpath("nssm")
|
local path = minetest.get_modpath("nssm")
|
||||||
nssm = {}
|
|
||||||
|
|
||||||
nssm.mymapgenis = tonumber(minetest.setting_get('mymapgenis')) or 7
|
nssm = {
|
||||||
nssm.multimobs = tonumber(minetest.setting_get('multimobs')) or 1000
|
mymapgenis = tonumber(minetest.setting_get('mymapgenis')) or 7,
|
||||||
|
multimobs = tonumber(minetest.setting_get('multimobs')) or 1000
|
||||||
|
}
|
||||||
|
|
||||||
dofile(path.."/spawn.lua")
|
dofile(path.."/spawn.lua")
|
||||||
|
|
||||||
--Mobs
|
-- Mobs
|
||||||
dofile(path.."/mobs/ant_queen.lua")
|
dofile(path.."/mobs/ant_queen.lua")
|
||||||
dofile(path.."/mobs/ant_soldier.lua")
|
dofile(path.."/mobs/ant_soldier.lua")
|
||||||
dofile(path.."/mobs/ant_worker.lua")
|
dofile(path.."/mobs/ant_worker.lua")
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:ant_queen", {
|
|||||||
collisionbox = {-0.6, 0.00, -0.6, 0.6, 1, 0.6},
|
collisionbox = {-0.6, 0.00, -0.6, 0.6, 1, 0.6},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "ant_queen.x",
|
mesh = "ant_queen.x",
|
||||||
textures = {{"ant_queen.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"ant_queen.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
fear_height = 5,
|
fear_height = 5,
|
||||||
@ -21,22 +23,10 @@ mobs:register_mob("nssm:ant_queen", {
|
|||||||
damage = 4,
|
damage = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 5, max = 7},
|
||||||
chance = 1,
|
{name = "nssm:ant_queen_abdomen", chance = 1, min = 1, max = 1},
|
||||||
min = 5,
|
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
|
||||||
max = 7,},
|
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
|
||||||
{name = "nssm:ant_queen_abdomen",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:ant_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 6,},
|
|
||||||
{name = "nssm:ant_mandible",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
reach = 8,
|
reach = 8,
|
||||||
armor = 40,
|
armor = 40,
|
||||||
@ -44,12 +34,11 @@ mobs:register_mob("nssm:ant_queen", {
|
|||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
stepheight=2.1,
|
stepheight = 2.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=12,
|
jump_height = 12,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
@ -65,39 +54,52 @@ mobs:register_mob("nssm:ant_queen", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
self.ant_queen_counter = (self.ant_queen_counter or 0) + 1
|
|
||||||
if self.ant_queen_counter == 4 then
|
|
||||||
self.ant_queen_counter = 0
|
|
||||||
local counter = 0
|
|
||||||
|
|
||||||
|
self.ant_queen_counter = (self.ant_queen_counter or 0) + 1
|
||||||
|
|
||||||
|
if self.ant_queen_counter == 4 then
|
||||||
|
|
||||||
|
self.ant_queen_counter = 0
|
||||||
|
|
||||||
|
local counter = 0
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
p.y = p.y + 1.5
|
p.y = p.y + 1.5
|
||||||
s.y = s.y + 1.5
|
s.y = s.y + 1.5
|
||||||
|
|
||||||
if mobs:line_of_sight(self, p, s) == true then
|
if mobs:line_of_sight(self, p, s) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
object = self.object,
|
object = self.object,
|
||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
local pos1 = {x=s.x+math.random(-3,3), y=s.y-1, z=s.z+math.random(-3,3)}
|
|
||||||
|
local pos1 = {
|
||||||
|
x = s.x + math.random(-3, 3),
|
||||||
|
y = s.y - 1,
|
||||||
|
z = s.z + math.random(-3, 3)
|
||||||
|
}
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(s, 10)
|
local objects = minetest.get_objects_inside_radius(s, 10)
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
if (obj:get_luaentity() and obj:get_luaentity().name == "nssm:ant_soldier") then
|
|
||||||
|
if (obj:get_luaentity()
|
||||||
|
and obj:get_luaentity().name == "nssm:ant_soldier") then
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ((pos1.x~=s.x) and (pos1.z~=s.z))
|
if ((pos1.x~=s.x) and (pos1.z~=s.z))
|
||||||
and (minetest.get_node(pos1).name == "air")
|
and (minetest.get_node(pos1).name == "air")
|
||||||
and (counter < 4)
|
and (counter < 4) then
|
||||||
then
|
|
||||||
explosion_particles(pos1, 1)
|
explosion_particles(pos1, 1)
|
||||||
|
|
||||||
minetest.add_entity(pos1, "nssm:ant_soldier")
|
minetest.add_entity(pos1, "nssm:ant_soldier")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:ant_soldier", {
|
|||||||
collisionbox = {-0.49, 0.00, -0.49, 0.49, 0.9, 0.49},
|
collisionbox = {-0.49, 0.00, -0.49, 0.49, 0.9, 0.49},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "ant_soldier.x",
|
mesh = "ant_soldier.x",
|
||||||
textures = {{"ant_soldier.png"}},
|
textures = {
|
||||||
visual_size = {x=3, y=3},
|
{"ant_soldier.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 3, y = 3},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -19,22 +21,10 @@ mobs:register_mob("nssm:ant_soldier", {
|
|||||||
damage = 6,
|
damage = 6,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
|
||||||
min = 1,
|
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
|
||||||
max = 2,},
|
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2},
|
||||||
{name = "nssm:ant_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 6,},
|
|
||||||
{name = "nssm:ant_mandible",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:ant_hard_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
reach = 2,
|
reach = 2,
|
||||||
armor = 70,
|
armor = 70,
|
||||||
@ -42,12 +32,11 @@ mobs:register_mob("nssm:ant_soldier", {
|
|||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
group_attack = true,
|
||||||
group_attack=true,
|
attack_animals = false,
|
||||||
attack_animals=false,
|
knock_back = 2,
|
||||||
knock_back=2,
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_texture="nssm_blood_blue.png",
|
stepheight = 1.1,
|
||||||
stepheight=1.1,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -6,8 +6,10 @@ mobs:register_mob("nssm:ant_worker", {
|
|||||||
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.5, 0.4},
|
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.5, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "ant_worker.x",
|
mesh = "ant_worker.x",
|
||||||
textures = {{"ant_worker.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"ant_worker.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -21,33 +23,20 @@ mobs:register_mob("nssm:ant_worker", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 2, min = 1, max = 1},
|
||||||
chance = 2,
|
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
|
||||||
min = 1,
|
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
|
||||||
max = 1,},
|
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2},
|
||||||
{name = "nssm:ant_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 6,},
|
|
||||||
{name = "nssm:ant_mandible",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:ant_hard_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
group_attack = true,
|
||||||
group_attack=true,
|
knock_back = 4,
|
||||||
knock_back=4,
|
attack_animals = false,
|
||||||
attack_animals=false,
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_texture="nssm_blood_blue.png",
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:black_widow", {
|
|||||||
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.8, 0.4},
|
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.8, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "black_widow.x",
|
mesh = "black_widow.x",
|
||||||
textures = {{"black_widow.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"black_widow.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 15,
|
view_range = 15,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -20,34 +22,21 @@ mobs:register_mob("nssm:black_widow", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
|
||||||
min = 1,
|
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
|
||||||
max = 2,},
|
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2},
|
||||||
{name = "nssm:spider_leg",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:silk_gland",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:spider_meat",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:bloco", {
|
|||||||
collisionbox = {-0.56, -0.2, -0.56, 0.56, 1.2, 0.56},
|
collisionbox = {-0.56, -0.2, -0.56, 0.56, 1.2, 0.56},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "bloco.x",
|
mesh = "bloco.x",
|
||||||
textures = {{"bloco.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"bloco.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -20,31 +22,28 @@ mobs:register_mob("nssm:bloco", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
|
||||||
chance = 1,
|
{name = "default:stone", chance = 1, min = 2, max = 3},
|
||||||
min = 1,
|
{name = "nssm:bloco_skin", chance = 3, min = 1, max = 2},
|
||||||
max = 1,},
|
|
||||||
{name = "default:stone",
|
|
||||||
chance = 1,
|
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:bloco_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 3,
|
water_damage = 3,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
blood_texture="stone_blood.png",
|
blood_texture = "stone_blood.png",
|
||||||
immune_to={{'default:sword_stone', -2},{'default:stone', -2}, {'default:cobble', -2}, {'default:axe_stone', -2}, {'default:shovel_stone', -2}, {'default:pick_stone', -2}},
|
immune_to = {
|
||||||
stepheight=1.1,
|
{'default:sword_stone', -2},
|
||||||
on_rightclick = nil,
|
{'default:stone', -2},
|
||||||
|
{'default:cobble', -2},
|
||||||
|
{'default:axe_stone', -2},
|
||||||
|
{'default:shovel_stone', -2},
|
||||||
|
{'default:pick_stone', -2}
|
||||||
|
},
|
||||||
|
stepheight = 1.1,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,11 +5,14 @@ mobs:register_mob("nssm:crab", {
|
|||||||
collisionbox = {-0.5, 0, -0.5, 0.5, 0.55, 0.5},
|
collisionbox = {-0.5, 0, -0.5, 0.5, 0.55, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "crab.x",
|
mesh = "crab.x",
|
||||||
textures = {{"crab1.png"},{"crab2.png"}},
|
textures = {
|
||||||
|
{"crab1.png"},
|
||||||
|
{"crab2.png"}
|
||||||
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "crab",
|
random = "crab",
|
||||||
},
|
},
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x = 3, y = 3},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 7,
|
view_range = 7,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -21,34 +24,21 @@ mobs:register_mob("nssm:crab", {
|
|||||||
floats = 0,
|
floats = 0,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:surimi", chance = 1, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:crab_chela", chance = 4, min = 1, max = 2},
|
||||||
max = 2,},
|
{name = "nssm:crab_carapace_fragment", chance = 4, min = 1, max = 1},
|
||||||
{name = "nssm:surimi",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:crab_chela",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:crab_carapace_fragment",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,11 +5,13 @@ mobs:register_mob("nssm:crocodile", {
|
|||||||
collisionbox = {-0.45, -0.30, -0.45, 0.45, 0.3, 0.45},
|
collisionbox = {-0.45, -0.30, -0.45, 0.45, 0.3, 0.45},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "crocodile.x",
|
mesh = "crocodile.x",
|
||||||
textures = {{"croco.png"}},
|
textures = {
|
||||||
|
{"croco.png"}
|
||||||
|
},
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "crocod",
|
random = "crocod",
|
||||||
},
|
},
|
||||||
visual_size = {x=4, y=4},
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 15,
|
view_range = 15,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
@ -18,18 +20,9 @@ mobs:register_mob("nssm:crocodile", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:crocodile_tail", chance = 2, min = 1, max = 1},
|
||||||
min = 1,
|
{name = "nssm:crocodile_skin", chance = 3, min = 1, max = 1},
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:crocodile_tail",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:crocodile_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -37,12 +30,11 @@ mobs:register_mob("nssm:crocodile", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=3,
|
knock_back = 3,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:daddy_long_legs", {
|
|||||||
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
|
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "daddy_long_legs.x",
|
mesh = "daddy_long_legs.x",
|
||||||
textures = {{"daddy_long_legs.png"}},
|
textures = {
|
||||||
visual_size = {x=8, y=8},
|
{"daddy_long_legs.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 8, y = 8},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 12,
|
view_range = 12,
|
||||||
walk_velocity = 0.7,
|
walk_velocity = 0.7,
|
||||||
@ -19,30 +21,20 @@ mobs:register_mob("nssm:daddy_long_legs", {
|
|||||||
damage = 3,
|
damage = 3,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
|
||||||
min = 1,
|
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2},
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:spider_leg",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:spider_meat",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,14 @@ mobs:register_mob("nssm:dolidrosaurus", {
|
|||||||
collisionbox = {-0.5, 0, -0.5, 0.5, 0.52, 0.5},
|
collisionbox = {-0.5, 0, -0.5, 0.5, 0.52, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "dolidrosaurus.x",
|
mesh = "dolidrosaurus.x",
|
||||||
textures = {{"dolidrosaurus1.png"},{"dolidrosaurus2.png"},{"dolidrosaurus3.png"},{"dolidrosaurus4.png"},{"dolidrosaurus5.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"dolidrosaurus1.png"},
|
||||||
|
{"dolidrosaurus2.png"},
|
||||||
|
{"dolidrosaurus3.png"},
|
||||||
|
{"dolidrosaurus4.png"},
|
||||||
|
{"dolidrosaurus5.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
fly = true,
|
fly = true,
|
||||||
@ -23,24 +29,18 @@ mobs:register_mob("nssm:dolidrosaurus", {
|
|||||||
random = "crocod",
|
random = "crocod",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:dolidrosaurus_fin", chance = 2, min = 1, max = 3},
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:dolidrosaurus_fin",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=3,
|
knock_back = 3,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
on_rightclick = nil,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:duck", {
|
|||||||
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.95, 0.3},
|
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.95, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "duck.x",
|
mesh = "duck.x",
|
||||||
textures = {{"duck.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"duck.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 13,
|
view_range = 13,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
@ -18,22 +20,10 @@ mobs:register_mob("nssm:duck", {
|
|||||||
random = "duck",
|
random = "duck",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
|
||||||
max = 1,},
|
{name = "nssm:duck_feather", chance = 3, min = 2, max = 4},
|
||||||
{name = "nssm:duck_legs",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:duck_feather",
|
|
||||||
chance = 3,
|
|
||||||
min = 2,
|
|
||||||
max = 4,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -42,11 +32,10 @@ mobs:register_mob("nssm:duck", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=5,
|
knock_back = 5,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -60,5 +49,4 @@ mobs:register_mob("nssm:duck", {
|
|||||||
punch_start = 40,
|
punch_start = 40,
|
||||||
punch_end = 60,
|
punch_end = 60,
|
||||||
}
|
}
|
||||||
--pathfinding = 1,
|
|
||||||
})
|
})
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:duckking", {
|
|||||||
collisionbox = {-1.2, -0.25, -1.2, 1.2, 4, 1.2},
|
collisionbox = {-1.2, -0.25, -1.2, 1.2, 4, 1.2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "king_duck.x",
|
mesh = "king_duck.x",
|
||||||
textures = {{"king_duck.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"king_duck.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
lifetimer = 300,
|
lifetimer = 300,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
@ -22,26 +24,11 @@ mobs:register_mob("nssm:duckking", {
|
|||||||
attack = "duckking",
|
attack = "duckking",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 1, min = 40, max = 50},
|
||||||
min = 7,
|
{name = "nssm:helmet_crown", chance = 1, min = 1, max = 1},
|
||||||
max = 8,},
|
{name = "nssm:duck_beak", chance = 4, min = 10, max = 20},
|
||||||
{name = "nssm:duck_legs",
|
{name = "nssm:duck_feather", chance = 3, min = 20, max = 40},
|
||||||
chance = 1,
|
|
||||||
min = 40,
|
|
||||||
max = 50,},
|
|
||||||
{name = "nssm:helmet_crown",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 4,
|
|
||||||
min = 10,
|
|
||||||
max = 20,},
|
|
||||||
{name = "nssm:duck_feather",
|
|
||||||
chance = 3,
|
|
||||||
min = 20,
|
|
||||||
max = 40,},
|
|
||||||
},
|
},
|
||||||
armor = 50,
|
armor = 50,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -49,18 +36,17 @@ mobs:register_mob("nssm:duckking", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
dogshoot_count_max = 9,
|
dogshoot_count_max = 9,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture="nssm_blood.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
stepheight=2.1,
|
stepheight = 2.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=12,
|
jump_height = 12,
|
||||||
arrow = "nssm:duck_father",
|
arrow = "nssm:duck_father",
|
||||||
shoot_interval=3,
|
shoot_interval = 3,
|
||||||
shoot_offset =-1,
|
shoot_offset = -1,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 25,
|
speed_run = 25,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:echidna", {
|
|||||||
collisionbox = {-0.6, 0.00, -0.6, 0.6, 2, 0.6},
|
collisionbox = {-0.6, 0.00, -0.6, 0.6, 2, 0.6},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "echidna.x",
|
mesh = "echidna.x",
|
||||||
textures = {{"echidnapes.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"echidnapes.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -20,14 +22,8 @@ mobs:register_mob("nssm:echidna", {
|
|||||||
random = "echidna",
|
random = "echidna",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
|
||||||
chance = 1,
|
{name = "nssm:snake_scute", chance = 1, min = 1, max = 1},
|
||||||
min = 6,
|
|
||||||
max = 7,},
|
|
||||||
{name = "nssm:snake_scute",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -35,17 +31,16 @@ mobs:register_mob("nssm:echidna", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
blood_amount=10,
|
blood_amount = 10,
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=8,
|
jump_height = 8,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
arrow = "nssm:super_gas";
|
arrow = "nssm:super_gas";
|
||||||
reach = 5,
|
reach = 5,
|
||||||
shoot_interval=3,
|
shoot_interval = 3,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 25,
|
speed_run = 25,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:enderduck", {
|
|||||||
collisionbox = {-0.28, 0.00, -0.28, 0.28, 1.8, 0.28},
|
collisionbox = {-0.28, 0.00, -0.28, 0.28, 1.8, 0.28},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "enderduck.x",
|
mesh = "enderduck.x",
|
||||||
textures = {{"enderduck.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"enderduck.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
walk_velocity = 3,
|
walk_velocity = 3,
|
||||||
@ -20,36 +22,23 @@ mobs:register_mob("nssm:enderduck", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:black_duck_feather", chance = 3, min = 1, max = 4},
|
||||||
max = 2},
|
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
|
||||||
{name = "nssm:duck_legs",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2},
|
|
||||||
{name = "nssm:black_duck_feather",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
floats=1,
|
floats = 1,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
jump_height=12,
|
jump_height = 12,
|
||||||
stepheight=2.1,
|
stepheight = 2.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:felucco", {
|
|||||||
collisionbox = {-0.5, 0, -0.5, 0.5, 1.2, 0.5},
|
collisionbox = {-0.5, 0, -0.5, 0.5, 1.2, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "felucco.x",
|
mesh = "felucco.x",
|
||||||
textures = {{"felucco.png"}},
|
textures = {
|
||||||
visual_size = {x=7, y=7},
|
{"felucco.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 7, y = 7},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
@ -18,34 +20,21 @@ mobs:register_mob("nssm:felucco", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:felucco_steak", chance = 2, min = 1, max = 2},
|
||||||
min = 3,
|
{name = "nssm:felucco_fur", chance = 2, min = 1, max = 1},
|
||||||
max = 4},
|
{name = "nssm:felucco_horn", chance = 3, min = 1, max = 2},
|
||||||
{name = "nssm:felucco_steak",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2},
|
|
||||||
{name = "nssm:felucco_fur",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:felucco_horn",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:flying_duck", {
|
|||||||
collisionbox = {-0.3, -0.2, -0.3, 0.3, 0.2, 0.3},
|
collisionbox = {-0.3, -0.2, -0.3, 0.3, 0.2, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "nathan_petrelli.x",
|
mesh = "nathan_petrelli.x",
|
||||||
textures = {{"nathan_petrelli.png"}},
|
textures = {
|
||||||
visual_size = {x=1, y=1},
|
{"nathan_petrelli.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
run_velocity = 2.5,
|
run_velocity = 2.5,
|
||||||
@ -19,33 +21,20 @@ mobs:register_mob("nssm:flying_duck", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 2, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
|
||||||
max = 2,},
|
{name = "nssm:duck_feather", chance = 2, min = 4, max = 8},
|
||||||
{name = "nssm:duck_legs",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:duck_feather",
|
|
||||||
chance = 2,
|
|
||||||
min = 4,
|
|
||||||
max = 8,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=5,
|
knock_back = 5,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:giant_sandworm", {
|
|||||||
collisionbox = {-1.2, 0, -1.2, 1.2, 4.5, 1.2},
|
collisionbox = {-1.2, 0, -1.2, 1.2, 4.5, 1.2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "giant_sandworm.x",
|
mesh = "giant_sandworm.x",
|
||||||
textures = {{"sandworm.png"}},
|
textures = {
|
||||||
visual_size = {x=13, y=13},
|
{"sandworm.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 13, y = 13},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 9,
|
view_range = 9,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -16,33 +18,20 @@ mobs:register_mob("nssm:giant_sandworm", {
|
|||||||
damage = 12,
|
damage = 12,
|
||||||
jump = false,
|
jump = false,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:worm_flesh",
|
{name = "nssm:worm_flesh", chance = 1, min = 20, max = 30},
|
||||||
chance = 1,
|
{name = "nssm:sandworm_skin", chance = 2, min = 3, max = 12},
|
||||||
min = 20,
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
|
||||||
max = 30,},
|
{name = "nssm:digested_sand", chance = 1, min = 1, max = 1},
|
||||||
{name = "nssm:sandworm_skin",
|
|
||||||
chance = 2,
|
|
||||||
min = 3,
|
|
||||||
max = 12,},
|
|
||||||
{name = "nssm:life_energy",
|
|
||||||
chance = 1,
|
|
||||||
min = 7,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:digested_sand",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 3,
|
lava_damage = 3,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=0,
|
jump_height = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:icelamander", {
|
|||||||
collisionbox = {-0.5, 0, -0.5, 0.5, 2.3, 0.5},
|
collisionbox = {-0.5, 0, -0.5, 0.5, 2.3, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "icelamander.x",
|
mesh = "icelamander.x",
|
||||||
textures = {{"icelamander.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"icelamander.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -19,40 +21,24 @@ mobs:register_mob("nssm:icelamander", {
|
|||||||
damage = 12,
|
damage = 12,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 6, max = 8},
|
||||||
chance = 1,
|
{name = "nssm:frosted_amphibian_heart", chance = 1, min = 1, max = 1},
|
||||||
min = 6,
|
{name = "nssm:ice_tooth", chance = 1, min = 1, max = 1},
|
||||||
max = 8},
|
{name = "nssm:little_ice_tooth", chance = 1, min = 0, max = 20},
|
||||||
{name = "nssm:frosted_amphibian_heart",
|
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:ice_tooth",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:little_ice_tooth",
|
|
||||||
chance = 1,
|
|
||||||
min = 0,
|
|
||||||
max = 20},
|
|
||||||
{name = "nssm:amphibian_ribs",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 30,
|
lava_damage = 30,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
blood_amount=20,
|
blood_amount = 20,
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=8,
|
jump_height = 8,
|
||||||
dogshoot_count_max = 7,
|
dogshoot_count_max = 7,
|
||||||
arrow = "nssm:snow_arrow",
|
arrow = "nssm:snow_arrow",
|
||||||
shoot_interval = 2,
|
shoot_interval = 2,
|
||||||
@ -71,6 +57,6 @@ mobs:register_mob("nssm:icelamander", {
|
|||||||
shoot_end = 210,
|
shoot_end = 210,
|
||||||
},
|
},
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
midas_ability(self, "default:ice", self.run_velocity,1, 3)
|
midas_ability(self, "default:ice", self.run_velocity, 1, 3)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:icesnake", {
|
|||||||
collisionbox = {-0.7, 0, -0.7, 0.7, 0.50, 0.7},
|
collisionbox = {-0.7, 0, -0.7, 0.7, 0.50, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "icesnake.x",
|
mesh = "icesnake.x",
|
||||||
textures = {{"icesnake.png"}},
|
textures = {
|
||||||
visual_size = {x=7, y=7},
|
{"icesnake.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 7, y = 7},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 10,
|
view_range = 10,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -20,34 +22,21 @@ mobs:register_mob("nssm:icesnake", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:frosted_amphibian_heart", chance = 2, min = 1, max = 1},
|
||||||
min = 1,
|
{name = "nssm:little_ice_tooth", chance = 2, min = 0, max = 4},
|
||||||
max = 2},
|
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 3},
|
||||||
{name = "nssm:frosted_amphibian_heart",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:little_ice_tooth",
|
|
||||||
chance = 2,
|
|
||||||
min = 0,
|
|
||||||
max = 4},
|
|
||||||
{name = "nssm:amphibian_ribs",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 20,
|
lava_damage = 20,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
@ -5,8 +5,11 @@ mobs:register_mob("nssm:kraken", {
|
|||||||
collisionbox = {-2, 0, -2, 2, 4, 2},
|
collisionbox = {-2, 0, -2, 2, 4, 2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "kraken.x",
|
mesh = "kraken.x",
|
||||||
textures = {{"kraken.png"}, {"kraken2.png"}},
|
textures = {
|
||||||
visual_size = {x=15, y=15},
|
{"kraken.png"},
|
||||||
|
{"kraken2.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 15, y = 15},
|
||||||
lifetimer=500,
|
lifetimer=500,
|
||||||
inker = false,
|
inker = false,
|
||||||
view_range = 50,
|
view_range = 50,
|
||||||
@ -24,30 +27,20 @@ mobs:register_mob("nssm:kraken", {
|
|||||||
random = "kraken",
|
random = "kraken",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
|
||||||
chance = 1,
|
{name = "nssm:tentacle", chance = 1, min = 30, max = 40},
|
||||||
min = 6,
|
{name = "nssm:tentacle_curly", chance = 1, min = 1, max = 1},
|
||||||
max = 7,},
|
|
||||||
{name = "nssm:tentacle",
|
|
||||||
chance = 1,
|
|
||||||
min = 30,
|
|
||||||
max = 40,},
|
|
||||||
{name = "nssm:tentacle_curly",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 50,
|
armor = 50,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_amount=100,
|
blood_amount = 100,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
reach=8,
|
reach = 8,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
speed_run = 30,
|
speed_run = 30,
|
||||||
|
@ -5,14 +5,16 @@ mobs:register_mob("nssm:larva", {
|
|||||||
collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3},
|
collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "larva.x",
|
mesh = "larva.x",
|
||||||
textures = {{"larva.png"}},
|
textures = {
|
||||||
visual_size = {x=3, y=3},
|
{"larva.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 3, y = 3},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 10,
|
view_range = 10,
|
||||||
rotate = 90,
|
rotate = 90,
|
||||||
jump = false,
|
jump = false,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
jump_height =0,
|
jump_height = 0,
|
||||||
walk_velocity = 0.4,
|
walk_velocity = 0.4,
|
||||||
run_velocity = 0.4,
|
run_velocity = 0.4,
|
||||||
sounds = {
|
sounds = {
|
||||||
@ -21,25 +23,18 @@ mobs:register_mob("nssm:larva", {
|
|||||||
damage = 1,
|
damage = 1,
|
||||||
reach = 1,
|
reach = 1,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 3, min = 1, max = 1},
|
||||||
chance = 3,
|
{name = "nssm:larva_meat", chance = 2, min = 1, max = 2},
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:larva_meat",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 4,
|
lava_damage = 4,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
@ -53,13 +48,20 @@ mobs:register_mob("nssm:larva", {
|
|||||||
punch_start = 180,
|
punch_start = 180,
|
||||||
punch_end = 230,
|
punch_end = 230,
|
||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function (self)
|
do_custom = function (self)
|
||||||
self.metatimer = (self.metatimer) or os.time()
|
|
||||||
if os.time() - self.metatimer >20 then
|
self.metatimer = self.metatimer or os.time()
|
||||||
|
|
||||||
|
if os.time() - self.metatimer > 20 then
|
||||||
|
|
||||||
minetest.log("action",
|
minetest.log("action",
|
||||||
"metatimer expired, metamorphosis! ")
|
"metatimer expired, metamorphosis! ")
|
||||||
local pos=self.object:get_pos()
|
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
200, --amount
|
200, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -76,11 +78,13 @@ mobs:register_mob("nssm:larva", {
|
|||||||
false, --collisiondetection
|
false, --collisiondetection
|
||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
if math.random(1,2)==1 then
|
|
||||||
|
if math.random(1, 2) == 1 then
|
||||||
minetest.add_entity(pos, "nssm:mantis")
|
minetest.add_entity(pos, "nssm:mantis")
|
||||||
else
|
else
|
||||||
minetest.add_entity(pos, "nssm:mantis_beast")
|
minetest.add_entity(pos, "nssm:mantis_beast")
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:lava_titan", {
|
|||||||
collisionbox = {-0.45, -0.05, -0.45, 0.45, 1.8, 0.45},
|
collisionbox = {-0.45, -0.05, -0.45, 0.45, 1.8, 0.45},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "lava_titan.x",
|
mesh = "lava_titan.x",
|
||||||
textures = {{"lava_titan.png"}},
|
textures = {
|
||||||
visual_size = {x=2.7, y=2.7},
|
{"lava_titan.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2.7, y = 2.7},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -19,32 +21,22 @@ mobs:register_mob("nssm:lava_titan", {
|
|||||||
},
|
},
|
||||||
damage = 8,
|
damage = 8,
|
||||||
jump = false,
|
jump = false,
|
||||||
jump_height=0,
|
jump_height = 0,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
|
||||||
chance = 1,
|
{name = "nssm:lava_titan_eye", chance = 1, min = 1, max = 1},
|
||||||
min = 7,
|
{name = "bucket:bucket_lava", chance = 2, min = 1, max = 3},
|
||||||
max = 9,},
|
|
||||||
{name = "nssm:lava_titan_eye",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "bucket:bucket_lava",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
},
|
},
|
||||||
armor = 20,
|
armor = 20,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 25,
|
water_damage = 25,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
floats = 0,
|
floats = 0,
|
||||||
blood_texture="stone_blood.png",
|
blood_texture = "stone_blood.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
arrow = "nssm:lava_arrow",
|
arrow = "nssm:lava_arrow",
|
||||||
@ -81,7 +73,7 @@ mobs:register_mob("nssm:lava_titan", {
|
|||||||
shoot_end=400,
|
shoot_end=400,
|
||||||
},
|
},
|
||||||
do_custom = function (self)
|
do_custom = function (self)
|
||||||
digging_attack(self, nil, self.run_velocity, {x=0, y=4, z=0})
|
digging_attack(self, nil, self.run_velocity, {x = 0, y = 4, z = 0})
|
||||||
--digging_ability(self, nil, self.run_velocity, {x=0, y=5, z=0})
|
--digging_ability(self, nil, self.run_velocity, {x=0, y=5, z=0})
|
||||||
--putting_ability(self, "default:lava_source", self.run_velocity)
|
--putting_ability(self, "default:lava_source", self.run_velocity)
|
||||||
end,
|
end,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:manticore", {
|
|||||||
collisionbox = {-0.8, -0.85, -0.8, 0.8, 1.9, 0.8},
|
collisionbox = {-0.8, -0.85, -0.8, 0.8, 1.9, 0.8},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "manticore.x",
|
mesh = "manticore.x",
|
||||||
textures = {{"manticore.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"manticore.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -18,18 +20,9 @@ mobs:register_mob("nssm:manticore", {
|
|||||||
damage = 6,
|
damage = 6,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:manticore_spine", chance = 3, min = 2, max = 5},
|
||||||
min = 3,
|
{name = "nssm:manticore_fur", chance = 3, min = 1, max = 2},
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:manticore_spine",
|
|
||||||
chance = 3,
|
|
||||||
min = 2,
|
|
||||||
max = 5,},
|
|
||||||
{name = "nssm:manticore_fur",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -37,16 +30,15 @@ mobs:register_mob("nssm:manticore", {
|
|||||||
rotate = 270,
|
rotate = 270,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
arrow = "nssm:spine",
|
arrow = "nssm:spine",
|
||||||
shoot_interval = 2,
|
shoot_interval = 2,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
shoot_offset = 1,
|
shoot_offset = 1,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,8 +5,11 @@ mobs:register_mob("nssm:mantis", {
|
|||||||
collisionbox = {-0.5, 0.00, -0.5, 0.5, 2.30, 0.5},
|
collisionbox = {-0.5, 0.00, -0.5, 0.5, 2.30, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mantis.x",
|
mesh = "mantis.x",
|
||||||
textures = {{"mantis.png"}, {"mantis2.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"mantis.png"},
|
||||||
|
{"mantis2.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -18,34 +21,21 @@ mobs:register_mob("nssm:mantis", {
|
|||||||
damage = 4,
|
damage = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:mantis_claw",
|
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 4},
|
||||||
chance = 2,
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:mantis_skin", chance = 3, min = 1, max = 2},
|
||||||
max = 4,},
|
{name = "nssm:mantis_meat", chance = 2, min = 1, max = 2},
|
||||||
{name = "nssm:life_energy",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:mantis_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:mantis_meat",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
group_attack = true,
|
||||||
group_attack=true,
|
attack_animals = true,
|
||||||
attack_animals=true,
|
knock_back = 2,
|
||||||
knock_back=2,
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_texture="nssm_blood_blue.png",
|
stepheight = 1.1,
|
||||||
stepheight=1.1,
|
|
||||||
double_melee_attack = true,
|
double_melee_attack = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -5,8 +5,11 @@ mobs:register_mob("nssm:mantis_beast", {
|
|||||||
collisionbox = {-0.65, 0.00, -0.65, 0.65, 1.50, 0.65},
|
collisionbox = {-0.65, 0.00, -0.65, 0.65, 1.50, 0.65},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mantis_beast.x",
|
mesh = "mantis_beast.x",
|
||||||
textures = {{"mantis_beast.png"}, {"mantis_beast2.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"mantis_beast.png"},
|
||||||
|
{"mantis_beast2.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -19,34 +22,21 @@ mobs:register_mob("nssm:mantis_beast", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:mantis_claw",
|
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 6},
|
||||||
chance = 2,
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
min = 1,
|
{name = "nssm:mantis_skin", chance = 3, min = 1, max = 2},
|
||||||
max = 6,},
|
{name = "nssm:mantis_meat", chance = 2, min = 1, max = 2},
|
||||||
{name = "nssm:life_energy",
|
|
||||||
chance = 1,
|
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:mantis_skin",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:mantis_meat",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:masticone", {
|
|||||||
collisionbox = {-0.45, 0.00, -0.45, 0.45, 0.40, 0.45},
|
collisionbox = {-0.45, 0.00, -0.45, 0.45, 0.40, 0.45},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "masticone.x",
|
mesh = "masticone.x",
|
||||||
textures = {{"masticone.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"masticone.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 15,
|
view_range = 15,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -20,31 +22,21 @@ mobs:register_mob("nssm:masticone", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
|
||||||
chance = 1,
|
{name = "nssm:masticone_fang", chance = 1, min = 1, max = 2},
|
||||||
min = 7,
|
{name = "nssm:masticone_skull_fragments", chance = 2, min = 1, max = 2},
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:masticone_fang",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:masticone_skull_fragments",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 10,
|
||||||
floats=0,
|
floats = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
reach =1.5,
|
reach =1.5,
|
||||||
animation = {
|
animation = {
|
||||||
@ -60,17 +52,20 @@ mobs:register_mob("nssm:masticone", {
|
|||||||
punch_end = 180,
|
punch_end = 180,
|
||||||
},
|
},
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
core.after(2, function()
|
core.after(2, function()
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
200, --amount
|
200, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
{x=pos.x-1, y=pos.y-1, z=pos.z-1}, --minpos
|
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, --minpos
|
||||||
{x=pos.x+1, y=pos.y+1, z=pos.z+1}, --maxpos
|
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}, --maxpos
|
||||||
{x=-0, y=-0, z=-0}, --minvel
|
{x = -0, y = -0, z = -0}, --minvel
|
||||||
{x=1, y=1, z=1}, --maxvel
|
{x = 1, y = 1, z = 1}, --maxvel
|
||||||
{x=-0.5,y=5,z=-0.5}, --minacc
|
{x = -0.5, y = 5, z = -0.5}, --minacc
|
||||||
{x=0.5,y=5,z=0.5}, --maxacc
|
{x = 0.5, y = 5, z = 0.5}, --maxacc
|
||||||
0.1, --minexptime
|
0.1, --minexptime
|
||||||
1, --maxexptime
|
1, --maxexptime
|
||||||
3, --minsize
|
3, --minsize
|
||||||
@ -78,44 +73,21 @@ mobs:register_mob("nssm:masticone", {
|
|||||||
false, --collisiondetection
|
false, --collisiondetection
|
||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
for i = 1,2 do
|
|
||||||
local pos = {x=pos.x+math.random(-1,1), y=pos.y+0.5, z=pos.z+math.random(-1,1)}
|
for i = 1, 2 do
|
||||||
|
|
||||||
|
local pos = {
|
||||||
|
x = pos.x + math.random(-1, 1),
|
||||||
|
y = pos.y + 0.5,
|
||||||
|
z = pos.z + math.random(-1, 1)
|
||||||
|
}
|
||||||
|
|
||||||
local n = minetest.get_node(pos).name
|
local n = minetest.get_node(pos).name
|
||||||
|
|
||||||
if n == "air" then
|
if n == "air" then
|
||||||
minetest.add_entity(pos, "nssm:masticone")
|
minetest.add_entity(pos, "nssm:masticone")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
do_custom = function (self)
|
|
||||||
local pos = self.object:get_pos()
|
|
||||||
local n = minetest.get_node(pos).name
|
|
||||||
|
|
||||||
if n == "default:lava_source" or n == "default:lava_flowing" then
|
|
||||||
self.object:set_hp(self.object:get_hp()-5)
|
|
||||||
if self.object:get_hp() <=0 then
|
|
||||||
|
|
||||||
for _,drop in pairs(self.drops) do
|
|
||||||
|
|
||||||
if math.random(1, drop.chance) == 1 then
|
|
||||||
|
|
||||||
obj = minetest.add_item(pos,
|
|
||||||
ItemStack(drop.name .. " "
|
|
||||||
.. math.random(drop.min, drop.max)))
|
|
||||||
|
|
||||||
if obj then
|
|
||||||
|
|
||||||
obj:set_velocity({
|
|
||||||
x = math.random(-1, 1),
|
|
||||||
y = 6,
|
|
||||||
z = math.random(-1, 1)
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.object:remove()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:mese_dragon", {
|
|||||||
collisionbox = {-1, 0, -1, 1, 5, 1},
|
collisionbox = {-1, 0, -1, 1, 5, 1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mese_dragon.x",
|
mesh = "mese_dragon.x",
|
||||||
textures = {{"mese_dragon.png"}},
|
textures = {
|
||||||
visual_size = {x=12, y=12},
|
{"mese_dragon.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 12, y = 12},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 45,
|
view_range = 45,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -22,14 +24,8 @@ mobs:register_mob("nssm:mese_dragon", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
jump_height = 10,
|
jump_height = 10,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:rainbow_staff",
|
{name = "nssm:rainbow_staff", chance = 1, min = 1, max = 1},
|
||||||
chance = 1,
|
{name = "nssm:energy_globe", chance = 1, min = 99, max = 99},
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:energy_globe",
|
|
||||||
chance = 1,
|
|
||||||
min = 99,
|
|
||||||
max = 99},
|
|
||||||
},
|
},
|
||||||
armor = 30,
|
armor = 30,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -39,11 +35,11 @@ mobs:register_mob("nssm:mese_dragon", {
|
|||||||
on_rightclick = nil,
|
on_rightclick = nil,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
blood_texture="mese_blood.png",
|
blood_texture = "mese_blood.png",
|
||||||
blood_amount=30,
|
blood_amount = 30,
|
||||||
stepheight=3.1,
|
stepheight = 3.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=12,
|
jump_height = 12,
|
||||||
dogshoot_count_max = 9,
|
dogshoot_count_max = 9,
|
||||||
arrow = "nssm:roar_of_the_dragon",
|
arrow = "nssm:roar_of_the_dragon",
|
||||||
reach = 5,
|
reach = 5,
|
||||||
@ -65,25 +61,32 @@ mobs:register_mob("nssm:mese_dragon", {
|
|||||||
dattack_start = 120,
|
dattack_start = 120,
|
||||||
dattack_end = 160,
|
dattack_end = 160,
|
||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
midas_ability(self, "default:mese_block", self.run_velocity,2, 3)
|
midas_ability(self, "default:mese_block", self.run_velocity, 2, 3)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
|
|
||||||
if self.timer > 1 then
|
if self.timer > 1 then
|
||||||
|
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.attack_rip = self.attack_rip+1
|
|
||||||
|
self.attack_rip = (self.attack_rip or 0) + 1
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
|
|
||||||
if minetest.is_protected(s, "") then
|
if minetest.is_protected(s, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
p.y = p.y + 1.5
|
p.y = p.y + 1.5
|
||||||
s.y = s.y + 1.5
|
s.y = s.y + 1.5
|
||||||
|
|
||||||
if minetest.line_of_sight(p, s) == true then
|
if minetest.line_of_sight(p, s) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -91,20 +94,27 @@ mobs:register_mob("nssm:mese_dragon", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- punch player
|
-- punch player
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval=1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
if self.attack_rip>=8 then
|
|
||||||
self.attack_rip =0
|
if self.attack_rip >= 8 then
|
||||||
|
|
||||||
|
self.attack_rip = 0
|
||||||
|
|
||||||
mobs:set_animation("punch1")
|
mobs:set_animation("punch1")
|
||||||
for dx = -17,17 do
|
|
||||||
for dz= -17,17 do
|
for dx = -17, 17 do
|
||||||
local k = {x = s.x+dx, y=s.y+20, z=s.z+dz}
|
for dz = -17, 17 do
|
||||||
|
|
||||||
|
local k = {x = s.x + dx, y = s.y + 20, z = s.z + dz}
|
||||||
local n = minetest.get_node(k).name
|
local n = minetest.get_node(k).name
|
||||||
if n=="air" and math.random(1,23)==1 then
|
|
||||||
|
if n == "air" and math.random(1, 23) == 1 then
|
||||||
minetest.set_node(k, {name="nssm:mese_meteor"})
|
minetest.set_node(k, {name="nssm:mese_meteor"})
|
||||||
nodeupdate(k)
|
nodeupdate(k)
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:moonheron", {
|
|||||||
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.3, 0.45},
|
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.3, 0.45},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "moonheron.x",
|
mesh = "moonheron.x",
|
||||||
textures = {{"moonheron.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"moonheron.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -20,25 +22,18 @@ mobs:register_mob("nssm:moonheron", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1},
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:heron_leg",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
floats = 1,
|
floats = 1,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
108
mobs/mordain.lua
108
mobs/mordain.lua
@ -5,8 +5,10 @@ mobs:register_mob("nssm:mordain", {
|
|||||||
collisionbox = {-0.5, -0.3, -0.5, 0.5, 2.7, 0.5},
|
collisionbox = {-0.5, -0.3, -0.5, 0.5, 2.7, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mordain.x",
|
mesh = "mordain.x",
|
||||||
textures = {{"mordain.png"}},
|
textures = {
|
||||||
visual_size = {x=3.5, y=3.5},
|
{"mordain.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 3.5, y = 3.5},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -19,26 +21,19 @@ mobs:register_mob("nssm:mordain", {
|
|||||||
damage = 6,
|
damage = 6,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
|
||||||
chance = 1,
|
{name = "nssm:slothful_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:slothful_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
group_attack=true,
|
-- light_damage = 2,
|
||||||
attack_animals=true,
|
group_attack = true,
|
||||||
knock_back=1,
|
attack_animals = true,
|
||||||
blood_texture="morparticle.png",
|
knock_back = 1,
|
||||||
stepheight=1.1,
|
blood_texture = "morparticle.png",
|
||||||
--light_damage = 2,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -52,17 +47,24 @@ mobs:register_mob("nssm:mordain", {
|
|||||||
punch_start = 210,
|
punch_start = 210,
|
||||||
punch_end = 225,
|
punch_end = 225,
|
||||||
},
|
},
|
||||||
--pathfinding = 1,
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
self.mordain_timer = (self.mordain_timer or os.time())
|
|
||||||
|
self.mordain_timer = self.mordain_timer or os.time()
|
||||||
|
|
||||||
if (os.time() - self.mordain_timer) > 1 then
|
if (os.time() - self.mordain_timer) > 1 then
|
||||||
|
|
||||||
self.mordain_timer = os.time()
|
self.mordain_timer = os.time()
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
if minetest.line_of_sight(
|
||||||
|
{x = p.x, y = p.y + 1.5, z = p.z},
|
||||||
|
{x = s.x, y = s.y + 1.5, z = s.z}) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -70,52 +72,92 @@ mobs:register_mob("nssm:mordain", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- punch player
|
-- punch player
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval=1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
|
|
||||||
local ty = s.y
|
local ty = s.y
|
||||||
local flag = 0
|
local flag = 0
|
||||||
local m = 3
|
local m = 3
|
||||||
|
|
||||||
local v = {x=(p.x-s.x)*m, y = ty, z = (p.z-s.z)*m}
|
local v = {
|
||||||
local d = {x=s.x+v.x, y = ty, z = s.z+v.z}
|
x = (p.x - s.x) * m,
|
||||||
|
y = ty,
|
||||||
|
z = (p.z - s.z) * m
|
||||||
|
}
|
||||||
|
|
||||||
d.y = ty
|
local d = {
|
||||||
|
x = s.x + v.x,
|
||||||
|
y = ty,
|
||||||
|
z = s.z + v.z
|
||||||
|
}
|
||||||
|
|
||||||
for j = -3,3 do
|
for j = -3,3 do
|
||||||
|
|
||||||
ty = d.y + j
|
ty = d.y + j
|
||||||
local current = minetest.get_node({x = d.x, y = ty, z = d.z}).name
|
|
||||||
local up = minetest.get_node({x = d.x, y = ty+1, z = d.z}).name
|
local current = minetest.get_node({
|
||||||
|
x = d.x,
|
||||||
|
y = ty,
|
||||||
|
z = d.z}).name
|
||||||
|
|
||||||
|
local up = minetest.get_node({
|
||||||
|
x = d.x,
|
||||||
|
y = ty + 1,
|
||||||
|
z = d.z}).name
|
||||||
|
|
||||||
if up == "air" and current ~= "air" then
|
if up == "air" and current ~= "air" then
|
||||||
|
|
||||||
d.y = d.y + j+1.5
|
d.y = d.y + j+1.5
|
||||||
|
|
||||||
flag = 1
|
flag = 1
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
while flag ~= 1 do
|
while flag ~= 1 do
|
||||||
d.x = p.x + math.random(-m,m)
|
|
||||||
d.z = p.z + math.random(-m,m)
|
d.x = p.x + math.random(-m, m)
|
||||||
|
d.z = p.z + math.random(-m, m)
|
||||||
d.y = p.y
|
d.y = p.y
|
||||||
|
|
||||||
local dist = dist_pos(d, p)
|
local dist = dist_pos(d, p)
|
||||||
if dist>=2 then
|
|
||||||
|
if dist >= 2 then
|
||||||
|
|
||||||
for j = -3,3 do
|
for j = -3,3 do
|
||||||
|
|
||||||
ty = d.y + j
|
ty = d.y + j
|
||||||
local current = minetest.get_node({x = d.x, y = ty, z = d.z}).name
|
|
||||||
local up = minetest.get_node({x = d.x, y = ty+1, z = d.z}).name
|
local current = minetest.get_node({
|
||||||
|
x = d.x,
|
||||||
|
y = ty,
|
||||||
|
z = d.z}).name
|
||||||
|
|
||||||
|
local up = minetest.get_node({
|
||||||
|
x = d.x,
|
||||||
|
y = ty + 1,
|
||||||
|
z = d.z}).name
|
||||||
|
|
||||||
if up == "air" and current ~= "air" then
|
if up == "air" and current ~= "air" then
|
||||||
|
|
||||||
d.y = d.y + j+1.5
|
d.y = d.y + j+1.5
|
||||||
|
|
||||||
flag = 1
|
flag = 1
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:set_pos(d)
|
self.object:set_pos(d)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -6,8 +6,10 @@ mobs:register_mob("nssm:morde", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
rotate= 270,
|
rotate= 270,
|
||||||
mesh = "morde.x",
|
mesh = "morde.x",
|
||||||
textures = {{"morde.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"morde.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
@ -19,14 +21,8 @@ mobs:register_mob("nssm:morde", {
|
|||||||
random = "morde",
|
random = "morde",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:proud_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 2,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:proud_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -35,12 +31,11 @@ mobs:register_mob("nssm:morde", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -54,9 +49,13 @@ mobs:register_mob("nssm:morde", {
|
|||||||
punch_start = 130,
|
punch_start = 130,
|
||||||
punch_end = 160,
|
punch_end = 160,
|
||||||
},
|
},
|
||||||
|
|
||||||
custom_attack = function (self)
|
custom_attack = function (self)
|
||||||
self.morde_timer = (self.morde_timer or os.time())
|
|
||||||
|
self.morde_timer = self.morde_timer or os.time()
|
||||||
|
|
||||||
if (os.time() - self.morde_timer) > 1 then
|
if (os.time() - self.morde_timer) > 1 then
|
||||||
|
|
||||||
self.morde_timer = os.time()
|
self.morde_timer = os.time()
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
@ -64,10 +63,14 @@ mobs:register_mob("nssm:morde", {
|
|||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
self.health = self.health + (self.damage*2)
|
self.health = self.health + (self.damage * 2)
|
||||||
|
|
||||||
local m = 3
|
local m = 3
|
||||||
|
|
||||||
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
if minetest.line_of_sight(
|
||||||
|
{x = p.x, y = p.y + 1.5, z = p.z},
|
||||||
|
{x = s.x, y = s.y + 1.5, z = s.z}) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -75,10 +78,11 @@ mobs:register_mob("nssm:morde", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- punch player
|
-- punch player
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval=1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
@ -100,9 +104,13 @@ mobs:register_mob("nssm:morde", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_die = function(self)
|
on_die = function(self)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.add_entity(pos, "nssm:mortick")
|
minetest.add_entity(pos, "nssm:mortick")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -114,13 +122,16 @@ minetest.register_entity("nssm:mortick", {
|
|||||||
armor = 100,
|
armor = 100,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mortick.x",
|
mesh = "mortick.x",
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x = 3, y = 3},
|
||||||
--lifetime = 10,
|
--lifetime = 10,
|
||||||
damage = 1,
|
damage = 1,
|
||||||
|
|
||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
|
|
||||||
self.mortick_timer = self.mortick_timer or os.time()
|
self.mortick_timer = self.mortick_timer or os.time()
|
||||||
self.timer = self.timer or 0
|
self.timer = self.timer or 0
|
||||||
self.timer = self.timer+dtime
|
self.timer = self.timer + dtime
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local s1 = {x=s.x, y = s.y-1, z = s.z}
|
local s1 = {x=s.x, y = s.y-1, z = s.z}
|
||||||
|
|
||||||
@ -129,9 +140,12 @@ minetest.register_entity("nssm:mortick", {
|
|||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
]]
|
]]
|
||||||
|
|
||||||
--The mortick dies when he finds himself in the fire
|
--The mortick dies when he finds himself in the fire
|
||||||
local name = minetest.get_node(s1).name
|
local name = minetest.get_node(s1).name
|
||||||
if name == "fire:basic_flame" then
|
|
||||||
|
if name == "fire:basic_flame"
|
||||||
|
or name == "fire:permanent_flame" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -139,6 +153,7 @@ minetest.register_entity("nssm:mortick", {
|
|||||||
self.attack = (self.attack or 0)
|
self.attack = (self.attack or 0)
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(s, 8)
|
local objects = minetest.get_objects_inside_radius(s, 8)
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
if (obj:is_player()) then
|
if (obj:is_player()) then
|
||||||
self.attack = obj
|
self.attack = obj
|
||||||
@ -147,23 +162,29 @@ minetest.register_entity("nssm:mortick", {
|
|||||||
|
|
||||||
--If found a player follow him
|
--If found a player follow him
|
||||||
if self.attack ~= 0 then
|
if self.attack ~= 0 then
|
||||||
|
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
local yawp = self.attack:get_look_yaw()
|
local yawp = self.attack:get_look_yaw()
|
||||||
local pi = math.pi
|
local pi = math.pi
|
||||||
|
|
||||||
p.y = p.y + 1
|
p.y = p.y + 1
|
||||||
p.x = p.x-math.cos(yawp)/2.5
|
p.x = p.x - math.cos(yawp) / 2.5
|
||||||
p.z = p.z-math.sin(yawp)/2.5
|
p.z = p.z - math.sin(yawp) / 2.5
|
||||||
|
|
||||||
local m = 10
|
local m = 10
|
||||||
local v = {x=-(s.x-p.x)*m, y=-(s.y-p.y)*m, z=-(s.z-p.z)*m}
|
local v = {
|
||||||
local yaws = yawp +pi
|
x = -(s.x - p.x) * m,
|
||||||
|
y = -(s.y - p.y) * m,
|
||||||
|
z = -(s.z - p.z) * m
|
||||||
|
}
|
||||||
|
local yaws = yawp + pi
|
||||||
|
|
||||||
--stay attached to players back:
|
--stay attached to players back:
|
||||||
self.object:set_velocity(v)
|
self.object:set_velocity(v)
|
||||||
self.object:set_yaw(yaws)
|
self.object:set_yaw(yaws)
|
||||||
|
|
||||||
--damage player every ten seconds:
|
--damage player every ten seconds:
|
||||||
if (self.timer>10) then
|
if (self.timer > 10) then
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.attack:set_hp(self.attack:get_hp() - self.damage)
|
self.attack:set_hp(self.attack:get_hp() - self.damage)
|
||||||
end
|
end
|
||||||
|
@ -6,8 +6,10 @@ mobs:register_mob("nssm:morgre", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morgre.x",
|
mesh = "morgre.x",
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
textures = {{"morgre.png"}},
|
textures = {
|
||||||
visual_size = {x=5, y=5},
|
{"morgre.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 5, y = 5},
|
||||||
explosion_radius = 4,
|
explosion_radius = 4,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
@ -21,26 +23,19 @@ mobs:register_mob("nssm:morgre", {
|
|||||||
damage = 1,
|
damage = 1,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:greedy_soul_fragment", chance = 5, min = 1, max = 1},
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:greedy_soul_fragment",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
169
mobs/morgut.lua
169
mobs/morgut.lua
@ -6,8 +6,10 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
rotate= 270,
|
rotate= 270,
|
||||||
mesh = "morgut.x",
|
mesh = "morgut.x",
|
||||||
textures = {{"morgut.png"}},
|
textures = {
|
||||||
visual_size = {x=5, y=5},
|
{"morgut.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 5, y = 5},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 26,
|
view_range = 26,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
@ -20,14 +22,8 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
random = "morgut",
|
random = "morgut",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:gluttonous_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:gluttonous_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -36,12 +32,11 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -57,21 +52,29 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function (self)
|
do_custom = function (self)
|
||||||
|
|
||||||
self.flag = (self.flag or 0)
|
self.flag = (self.flag or 0)
|
||||||
|
|
||||||
if self.inv_flag ~= 1 then
|
if self.inv_flag ~= 1 then
|
||||||
|
|
||||||
self.inventory = {}
|
self.inventory = {}
|
||||||
for i=1,32 do
|
|
||||||
self.inventory[i]={name = '', num = 0}
|
for i = 1, 32 do
|
||||||
|
self.inventory[i] = {name = '', num = 0}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.inv_flag = (self.inv_flag or 1)
|
self.inv_flag = (self.inv_flag or 1)
|
||||||
|
|
||||||
if self.flag == 1 then
|
if self.flag == 1 then
|
||||||
|
|
||||||
self.state = ""
|
self.state = ""
|
||||||
|
|
||||||
mobs:set_animation(self, "run")
|
mobs:set_animation(self, "run")
|
||||||
|
|
||||||
self.object:set_yaw(self.dir)
|
self.object:set_yaw(self.dir)
|
||||||
set_velocity(self, 4)
|
|
||||||
|
self:set_velocity(4)
|
||||||
|
|
||||||
if os.time() - self.morgut_timer > 3 then
|
if os.time() - self.morgut_timer > 3 then
|
||||||
self.flag = 0
|
self.flag = 0
|
||||||
@ -80,16 +83,23 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function (self)
|
custom_attack = function (self)
|
||||||
|
|
||||||
self.curr_attack = (self.curr_attack or self.attack)
|
self.curr_attack = (self.curr_attack or self.attack)
|
||||||
self.morgut_timer = (self.morgut_timer or os.time())
|
self.morgut_timer = (self.morgut_timer or os.time())
|
||||||
|
|
||||||
self.dir = (self.dir or 0)
|
self.dir = (self.dir or 0)
|
||||||
|
|
||||||
if (os.time() - self.morgut_timer) > 1 then
|
if (os.time() - self.morgut_timer) > 1 then
|
||||||
|
|
||||||
if self.attack then
|
if self.attack then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
local m = 2
|
local m = 2
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
@ -109,71 +119,97 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
"roasted_duck_legs.png" --texture
|
"roasted_duck_legs.png" --texture
|
||||||
)
|
)
|
||||||
|
|
||||||
minetest.after(1, function (self)
|
minetest.after(1, function(self)
|
||||||
if self then
|
|
||||||
if self.attack:is_player() then
|
|
||||||
local pname = self.attack:get_player_name()
|
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
|
||||||
|
|
||||||
if player_inv:is_empty('main') then
|
if self and self.attack:is_player() then
|
||||||
--minetest.chat_send_all("Inventory empty")
|
|
||||||
else
|
local pname = self.attack:get_player_name()
|
||||||
for i = 1,32 do
|
local player_inv = minetest.get_inventory(
|
||||||
--minetest.chat_send_all("Inventory is not empty")
|
{type = 'player', name = pname})
|
||||||
local items = player_inv:get_stack('main', i)
|
|
||||||
local n = items:get_name()
|
if player_inv:is_empty('main') then
|
||||||
if minetest.get_item_group(n, "eatable")==1 then
|
--minetest.chat_send_all("Inventory empty")
|
||||||
local index
|
else
|
||||||
local found = 0
|
for i = 1, 32 do
|
||||||
for j = 1,32 do
|
--minetest.chat_send_all("Inventory is not empty")
|
||||||
if found == 0 then
|
local items = player_inv:get_stack('main', i)
|
||||||
if self.inventory[j].num == 0 then
|
local n = items:get_name()
|
||||||
--found an empty place
|
|
||||||
found = 2
|
if minetest.get_item_group(n, "eatable")==1 then
|
||||||
index = j
|
|
||||||
else
|
local index
|
||||||
--found a corrsponding itemstack
|
local found = 0
|
||||||
if self.inventory[j].name == n then
|
|
||||||
self.inventory[j].num = self.inventory[j].num +1
|
for j = 1,32 do
|
||||||
found = 1
|
|
||||||
end
|
if found == 0 then
|
||||||
|
|
||||||
|
if self.inventory[j].num == 0 then
|
||||||
|
--found an empty place
|
||||||
|
found = 2
|
||||||
|
index = j
|
||||||
|
else
|
||||||
|
--found a corrsponding itemstack
|
||||||
|
if self.inventory[j].name == n then
|
||||||
|
|
||||||
|
self.inventory[j].num = self.inventory[j].num +1
|
||||||
|
|
||||||
|
found = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if found == 2 then
|
|
||||||
self.inventory[index].name = n
|
|
||||||
self.inventory[index].num = 1
|
|
||||||
end
|
|
||||||
items:take_item()
|
|
||||||
player_inv:set_stack('main', i, items)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if found == 2 then
|
||||||
|
self.inventory[index].name = n
|
||||||
|
self.inventory[index].num = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
items:take_item()
|
||||||
|
|
||||||
|
player_inv:set_stack('main', i, items)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
mobs:set_animation(self, "run")
|
end
|
||||||
self.flag = 1
|
|
||||||
self.morgut_timer = os.time()
|
mobs:set_animation(self, "run")
|
||||||
self.curr_attack = self.attack
|
|
||||||
self.state = ""
|
self.flag = 1
|
||||||
local pyaw = self.curr_attack: get_look_yaw()
|
self.morgut_timer = os.time()
|
||||||
self.dir = pyaw
|
self.curr_attack = self.attack
|
||||||
self.object:set_yaw(pyaw)
|
self.state = ""
|
||||||
if self then
|
|
||||||
set_velocity(self, 4)
|
local pyaw = self.curr_attack: get_look_yaw()
|
||||||
end
|
|
||||||
|
self.dir = pyaw
|
||||||
|
self.object:set_yaw(pyaw)
|
||||||
|
|
||||||
|
if self then
|
||||||
|
self:set_velocity(4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,self)
|
end, self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_die = function(self)
|
on_die = function(self)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if (self.inventory ~= nil) then
|
if (self.inventory ~= nil) then
|
||||||
|
|
||||||
local elem
|
local elem
|
||||||
|
|
||||||
for i = 1,32 do
|
for i = 1,32 do
|
||||||
if self.inventory[i].num~=0 then
|
|
||||||
local items = ItemStack(self.inventory[i].name.." "..self.inventory[i].num)
|
if self.inventory[i].num ~= 0 then
|
||||||
|
|
||||||
|
local items = ItemStack(self.inventory[i].name
|
||||||
|
.. " " .. self.inventory[i].num)
|
||||||
|
|
||||||
local obj = minetest.add_item(pos, items)
|
local obj = minetest.add_item(pos, items)
|
||||||
|
|
||||||
obj:set_velocity({
|
obj:set_velocity({
|
||||||
x = math.random(-1, 1),
|
x = math.random(-1, 1),
|
||||||
y = 6,
|
y = 6,
|
||||||
@ -182,6 +218,7 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
108
mobs/morlu.lua
108
mobs/morlu.lua
@ -6,8 +6,10 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
rotate= 270,
|
rotate= 270,
|
||||||
mesh = "morlu.x",
|
mesh = "morlu.x",
|
||||||
textures = {{"morlu.png"}},
|
textures = {
|
||||||
visual_size = {x=7, y=7},
|
{"morlu.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 7, y = 7},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 28,
|
view_range = 28,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
@ -21,14 +23,8 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
random = "morlu2"
|
random = "morlu2"
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:lustful_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 3,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:lustful_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -37,12 +33,11 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -58,22 +53,30 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function (self)
|
do_custom = function (self)
|
||||||
|
|
||||||
self.flag = (self.flag or 0)
|
self.flag = (self.flag or 0)
|
||||||
|
|
||||||
if self.inv_flag ~= 1 then
|
if self.inv_flag ~= 1 then
|
||||||
|
|
||||||
self.inventory = {}
|
self.inventory = {}
|
||||||
self.invnum = 0
|
self.invnum = 0
|
||||||
for i=1,6 do
|
|
||||||
self.inventory[i]={name = ''}
|
for i = 1, 6 do
|
||||||
|
self.inventory[i] = {name = ''}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.inv_flag = (self.inv_flag or 1)
|
self.inv_flag = (self.inv_flag or 1)
|
||||||
|
|
||||||
if self.flag == 1 then
|
if self.flag == 1 then
|
||||||
|
|
||||||
self.state = ""
|
self.state = ""
|
||||||
|
|
||||||
mobs:set_animation(self, "run")
|
mobs:set_animation(self, "run")
|
||||||
self.object:set_yaw(self.dir)
|
|
||||||
set_velocity(self, 4)
|
self:set_yaw(self.dir)
|
||||||
|
|
||||||
|
self:set_velocity(4)
|
||||||
|
|
||||||
if os.time() - self.morlu_timer > 3 then
|
if os.time() - self.morlu_timer > 3 then
|
||||||
self.flag = 0
|
self.flag = 0
|
||||||
@ -82,24 +85,35 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function (self)
|
custom_attack = function (self)
|
||||||
|
|
||||||
self.curr_attack = (self.curr_attack or self.attack)
|
self.curr_attack = (self.curr_attack or self.attack)
|
||||||
self.morlu_timer = (self.morlu_timer or os.time())
|
self.morlu_timer = (self.morlu_timer or os.time())
|
||||||
|
|
||||||
self.dir = (self.dir or 0)
|
self.dir = (self.dir or 0)
|
||||||
|
|
||||||
if (os.time() - self.morlu_timer) > 1 then
|
if (os.time() - self.morlu_timer) > 1 then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
local m = 1
|
local m = 1
|
||||||
|
|
||||||
if self.attack:is_player() then
|
if self.attack:is_player() then
|
||||||
|
|
||||||
if minetest.get_modpath("3d_armor") then
|
if minetest.get_modpath("3d_armor") then
|
||||||
local pname, player_inv, armor_inv, ppos = armor:get_valid_player(self.attack, "[set_player_armor]")
|
|
||||||
|
local pname, player_inv, armor_inv, ppos = armor:get_valid_player(
|
||||||
|
self.attack, "[set_player_armor]")
|
||||||
|
|
||||||
local pname = self.attack:get_player_name()
|
local pname = self.attack:get_player_name()
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
|
|
||||||
if player_inv:is_empty('armor') then
|
if player_inv:is_empty('armor') then
|
||||||
|
|
||||||
-- punch player if he doesn't own an armor
|
-- punch player if he doesn't own an armor
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
@ -110,17 +124,21 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
local armor_num = 0
|
local armor_num = 0
|
||||||
local steal_pos
|
local steal_pos
|
||||||
|
|
||||||
for i=1,6 do
|
for i = 1, 6 do
|
||||||
|
|
||||||
local armor_stack = player_inv:get_stack("armor", i)
|
local armor_stack = player_inv:get_stack("armor", i)
|
||||||
local armor_item = armor_stack:get_name()
|
local armor_item = armor_stack:get_name()
|
||||||
|
|
||||||
if armor_stack:get_count() > 0 then
|
if armor_stack:get_count() > 0 then
|
||||||
armor_elements[armor_num]={name=armor_item, pos=i}
|
armor_elements[armor_num] = {name=armor_item, pos=i}
|
||||||
armor_num = armor_num + 1
|
armor_num = armor_num + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if armor_num > 0 then
|
if armor_num > 0 then
|
||||||
steal_pos = math.random(1,armor_num)
|
|
||||||
steal_pos = steal_pos-1
|
steal_pos = math.random(armor_num)
|
||||||
|
steal_pos = steal_pos - 1
|
||||||
--[[for i=0,armor_num-1 do
|
--[[for i=0,armor_num-1 do
|
||||||
minetest.chat_send_all("Posizione: "..armor_elements[i].pos.." Oggetto: "..armor_elements[i].name)
|
minetest.chat_send_all("Posizione: "..armor_elements[i].pos.." Oggetto: "..armor_elements[i].name)
|
||||||
end
|
end
|
||||||
@ -161,19 +179,19 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
)
|
)
|
||||||
|
|
||||||
minetest.after(1, function (self)
|
minetest.after(1, function (self)
|
||||||
|
|
||||||
if self then
|
if self then
|
||||||
|
|
||||||
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
||||||
armor_stack:take_item()
|
armor_stack:take_item()
|
||||||
player_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
player_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
||||||
|
armor_stack = armor_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
||||||
|
armor_stack:take_item()
|
||||||
|
armor_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
||||||
|
|
||||||
armor_stack = armor_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
armor:set_player_armor(self.attack, self.attack)
|
||||||
armor_stack:take_item()
|
|
||||||
armor_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
|
||||||
|
|
||||||
armor:set_player_armor(self.attack, self.attack)
|
|
||||||
--armor:update_armor(self.attack)
|
--armor:update_armor(self.attack)
|
||||||
armor:update_inventory(self.attack)
|
armor:update_inventory(self.attack)
|
||||||
--armor:update_player_visuals(self.attack)
|
--armor:update_player_visuals(self.attack)
|
||||||
|
|
||||||
--Update personal inventory of armors:
|
--Update personal inventory of armors:
|
||||||
@ -205,7 +223,10 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
if minetest.line_of_sight(
|
||||||
|
{x = p.x, y = p.y +1.5, z = p.z},
|
||||||
|
{x = s.x, y = s.y +1.5, z = s.z}) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -213,23 +234,31 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- punch player
|
-- punch player
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval=1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_die = function(self)
|
on_die = function(self)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if (self.inventory ~= nil) then
|
if (self.inventory ~= nil) then
|
||||||
|
|
||||||
if self.invnum > 0 then
|
if self.invnum > 0 then
|
||||||
for i=1,self.invnum do
|
|
||||||
|
for i = 1, self.invnum do
|
||||||
|
|
||||||
local items = ItemStack(self.inventory[i].name.." 1")
|
local items = ItemStack(self.inventory[i].name.." 1")
|
||||||
local obj = minetest.add_item(pos, items)
|
local obj = minetest.add_item(pos, items)
|
||||||
|
|
||||||
obj:set_velocity({
|
obj:set_velocity({
|
||||||
x = math.random(-1, 1),
|
x = math.random(-1, 1),
|
||||||
y = 6,
|
y = 6,
|
||||||
@ -238,6 +267,7 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local time_limit = 120
|
local time_limit = 120
|
||||||
posmorvalarblock = {x=827, y=-30094, z=-817}
|
local posmorvalarblock = {x=827, y=-30094, z=-817}
|
||||||
|
|
||||||
function respawn_block(self)
|
function respawn_block(self)
|
||||||
--start a timer if it doesn't exist
|
--start a timer if it doesn't exist
|
||||||
@ -28,12 +28,14 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
--rotate= 270,
|
--rotate= 270,
|
||||||
mesh = "morvalar.x",
|
mesh = "morvalar.x",
|
||||||
textures = {{"morvalar.png"}},
|
textures = {
|
||||||
visual_size = {x=5, y=5},
|
{"morvalar.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 5, y = 5},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 50,
|
view_range = 50,
|
||||||
walk_velocity = 1.6,
|
walk_velocity = 1.6,
|
||||||
reach =3,
|
reach = 3,
|
||||||
run_velocity = 3.2,
|
run_velocity = 3.2,
|
||||||
damage = 8,
|
damage = 8,
|
||||||
runaway = true,
|
runaway = true,
|
||||||
@ -47,11 +49,10 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
blood_amount=10,
|
blood_amount = 10,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -71,22 +72,30 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function (self)
|
custom_attack = function (self)
|
||||||
|
|
||||||
self.curr_attack = (self.curr_attack or self.attack)
|
self.curr_attack = (self.curr_attack or self.attack)
|
||||||
self.morvalar_timer = (self.morvalar_timer or os.time())
|
self.morvalar_timer = (self.morvalar_timer or os.time())
|
||||||
|
|
||||||
self.dir = (self.dir or 0)
|
self.dir = (self.dir or 0)
|
||||||
|
|
||||||
if (os.time() - self.morvalar_timer) > 2 then
|
if (os.time() - self.morvalar_timer) > 2 then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
local m = 1
|
local m = 1
|
||||||
|
|
||||||
if self.attack:is_player() then
|
if self.attack:is_player() then
|
||||||
|
|
||||||
if minetest.get_modpath("3d_armor") then
|
if minetest.get_modpath("3d_armor") then
|
||||||
local pname, player_inv, armor_inv, ppos = armor:get_valid_player(self.attack, "[set_player_armor]")
|
|
||||||
local pname = self.attack:get_player_name()
|
local pname, player_inv, armor_inv, ppos = armor:get_valid_player(
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
self.attack, "[set_player_armor]")
|
||||||
|
local pname = self.attack:get_player_name()
|
||||||
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
|
|
||||||
if player_inv:is_empty('armor') then
|
if player_inv:is_empty('armor') then
|
||||||
-- punch player if he doesn't own an armor
|
-- punch player if he doesn't own an armor
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
@ -98,20 +107,25 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
local armor_num = 0
|
local armor_num = 0
|
||||||
local steal_pos
|
local steal_pos
|
||||||
|
|
||||||
for i=1,6 do
|
for i = 1, 6 do
|
||||||
|
|
||||||
local armor_stack = player_inv:get_stack("armor", i)
|
local armor_stack = player_inv:get_stack("armor", i)
|
||||||
local armor_item = armor_stack:get_name()
|
local armor_item = armor_stack:get_name()
|
||||||
|
|
||||||
if armor_stack:get_count() > 0 then
|
if armor_stack:get_count() > 0 then
|
||||||
armor_elements[armor_num]={name=armor_item, pos=i}
|
armor_elements[armor_num]={name=armor_item, pos=i}
|
||||||
armor_num = armor_num + 1
|
armor_num = armor_num + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if armor_num > 0 then
|
if armor_num > 0 then
|
||||||
|
|
||||||
steal_pos = math.random(1,armor_num)
|
steal_pos = math.random(1,armor_num)
|
||||||
steal_pos = steal_pos-1
|
steal_pos = steal_pos-1
|
||||||
local cpos = string.find(armor_elements[steal_pos].name, ":")
|
|
||||||
local mod_name = string.sub(armor_elements[steal_pos].name, 0, cpos-1)
|
local cpos = string.find(armor_elements[steal_pos].name, ":")
|
||||||
local nname = string.sub(armor_elements[steal_pos].name, cpos+1)
|
local mod_name = string.sub(armor_elements[steal_pos].name, 0, cpos - 1)
|
||||||
|
local nname = string.sub(armor_elements[steal_pos].name, cpos + 1)
|
||||||
|
|
||||||
if mod_name == "3d_armor" then
|
if mod_name == "3d_armor" then
|
||||||
nname = "3d_armor_inv_"..nname..".png"
|
nname = "3d_armor_inv_"..nname..".png"
|
||||||
@ -140,17 +154,17 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
|
|
||||||
minetest.after(1, function (self)
|
minetest.after(1, function (self)
|
||||||
|
|
||||||
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
||||||
armor_stack:take_item()
|
armor_stack:take_item()
|
||||||
player_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
player_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
||||||
|
|
||||||
armor_stack = armor_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
armor_stack = armor_inv:get_stack("armor", armor_elements[steal_pos].pos)
|
||||||
armor_stack:take_item()
|
armor_stack:take_item()
|
||||||
armor_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
armor_inv:set_stack('armor', armor_elements[steal_pos].pos, armor_stack)
|
||||||
|
|
||||||
armor:set_player_armor(self.attack, self.attack)
|
armor:set_player_armor(self.attack, self.attack)
|
||||||
armor:update_inventory(self.attack)
|
armor:update_inventory(self.attack)
|
||||||
end,self)
|
end, self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -159,7 +173,10 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
if minetest.line_of_sight(
|
||||||
|
{x = p.x, y = p.y + 1.5, z = p.z},
|
||||||
|
{x = s.x, y = s.y +1.5, z = s.z}) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -168,18 +185,22 @@ mobs:register_mob("nssm:morvalar", {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
-- punch player
|
-- punch player
|
||||||
self.attack:punch(self.object, 1.0, {
|
self.attack:punch(self.object, 1.0, {
|
||||||
full_punch_interval=1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_die = function(self)
|
on_die = function(self)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
add_entity_and_particles("nssm:morvalar6", pos, "morparticle.png", 10)
|
add_entity_and_particles("nssm:morvalar6", pos, "morparticle.png", 10)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -192,8 +213,10 @@ mobs:register_mob("nssm:morvalar6", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
--rotate= 270,
|
--rotate= 270,
|
||||||
mesh = "morvalar.x",
|
mesh = "morvalar.x",
|
||||||
textures = {{"morvalar.png"}},
|
textures = {
|
||||||
visual_size = {x=5, y=5},
|
{"morvalar.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 5, y = 5},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 50,
|
view_range = 50,
|
||||||
walk_velocity = 1.6,
|
walk_velocity = 1.6,
|
||||||
@ -212,10 +235,9 @@ mobs:register_mob("nssm:morvalar6", {
|
|||||||
floats = 1,
|
floats = 1,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
blood_amount=10,
|
blood_amount = 10,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
@ -229,13 +251,17 @@ mobs:register_mob("nssm:morvalar6", {
|
|||||||
punch_start = 132,
|
punch_start = 132,
|
||||||
punch_end = 162,
|
punch_end = 162,
|
||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
respawn_block(self)
|
respawn_block(self)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function (self)
|
custom_attack = function (self)
|
||||||
|
|
||||||
self.morvalar6_timer = (self.morvalar6_timer or os.time())
|
self.morvalar6_timer = (self.morvalar6_timer or os.time())
|
||||||
|
|
||||||
self.dir = (self.dir or 0)
|
self.dir = (self.dir or 0)
|
||||||
|
|
||||||
if (os.time() - self.morvalar6_timer) > 1 then
|
if (os.time() - self.morvalar6_timer) > 1 then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
@ -246,7 +272,9 @@ mobs:register_mob("nssm:morvalar6", {
|
|||||||
|
|
||||||
|
|
||||||
minetest.after(1, function (self)
|
minetest.after(1, function (self)
|
||||||
|
|
||||||
if self.attack:is_player() then
|
if self.attack:is_player() then
|
||||||
|
|
||||||
local pname = self.attack:get_player_name()
|
local pname = self.attack:get_player_name()
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
|
|
||||||
@ -254,7 +282,8 @@ mobs:register_mob("nssm:morvalar6", {
|
|||||||
--minetest.chat_send_all("Inventory empty")
|
--minetest.chat_send_all("Inventory empty")
|
||||||
else
|
else
|
||||||
local imhungry = 0
|
local imhungry = 0
|
||||||
for i = 1,32 do
|
|
||||||
|
for i = 1, 32 do
|
||||||
--minetest.chat_send_all("Inventory is not empty")
|
--minetest.chat_send_all("Inventory is not empty")
|
||||||
local items = player_inv:get_stack('main', i)
|
local items = player_inv:get_stack('main', i)
|
||||||
local n = items:get_name()
|
local n = items:get_name()
|
||||||
|
109
mobs/morvy.lua
109
mobs/morvy.lua
@ -5,8 +5,10 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
collisionbox = {-0.3, -0.1, -0.3, 0.3, 2.3, 0.3},
|
collisionbox = {-0.3, -0.1, -0.3, 0.3, 2.3, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morvy.x",
|
mesh = "morvy.x",
|
||||||
textures = {{"morvy.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"morvy.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
fear_height = 5,
|
fear_height = 5,
|
||||||
@ -19,14 +21,8 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
},
|
},
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 5, max = 7},
|
||||||
chance = 1,
|
{name = "nssm:envious_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 5,
|
|
||||||
max = 7,},
|
|
||||||
{name = "nssm:envious_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
reach = 8,
|
reach = 8,
|
||||||
armor = 60,
|
armor = 60,
|
||||||
@ -34,12 +30,11 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
@ -55,18 +50,24 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
mobs:set_animation(self, "stand")
|
|
||||||
self.morvy_counter = (self.morvy_counter or 0) + 1
|
|
||||||
if self.morvy_counter == 4 then
|
|
||||||
mobs:set_animation(self, "punch")
|
|
||||||
self.morvy_counter = 0
|
|
||||||
local counter = 0
|
|
||||||
|
|
||||||
|
mobs:set_animation(self, "stand")
|
||||||
|
|
||||||
|
self.morvy_counter = (self.morvy_counter or 0) + 1
|
||||||
|
|
||||||
|
if self.morvy_counter == 4 then
|
||||||
|
|
||||||
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
|
self.morvy_counter = 0
|
||||||
|
|
||||||
|
local counter = 0
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
p.y = p.y + 1.5
|
p.y = p.y + 1.5
|
||||||
s.y = s.y + 1.5
|
s.y = s.y + 1.5
|
||||||
|
|
||||||
if mobs:line_of_sight(self, p, s) == true then
|
if mobs:line_of_sight(self, p, s) == true then
|
||||||
--[[play attack sound
|
--[[play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
@ -75,20 +76,31 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end]]
|
end]]
|
||||||
local pos1 = {x=s.x+math.random(-0.5,0.5), y=s.y+0.2, z=s.z+math.random(-0.5,0.5)}
|
|
||||||
|
local pos1 = {
|
||||||
|
x = s.x + math.random(-0.5, 0.5),
|
||||||
|
y = s.y + 0.2,
|
||||||
|
z = s.z + math.random(-0.5, 0.5)
|
||||||
|
}
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(s, 10)
|
local objects = minetest.get_objects_inside_radius(s, 10)
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
if (obj:get_luaentity() and ((obj:get_luaentity().name == "nssm:morbat1") or (obj:get_luaentity().name == "nssm:morbat2") or (obj:get_luaentity().name == "nssm:morbat3"))) then
|
|
||||||
|
if (obj:get_luaentity()
|
||||||
|
and ((obj:get_luaentity().name == "nssm:morbat1")
|
||||||
|
or (obj:get_luaentity().name == "nssm:morbat2")
|
||||||
|
or (obj:get_luaentity().name == "nssm:morbat3"))) then
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (minetest.get_node(pos1).name == "air")
|
if minetest.get_node(pos1).name == "air"
|
||||||
and (counter < 5)
|
and counter < 5 then
|
||||||
then
|
|
||||||
local bat
|
local bat
|
||||||
local which = math.random(1,3)
|
local which = math.random(1,3)
|
||||||
|
|
||||||
if which == 1 then
|
if which == 1 then
|
||||||
bat = "nssm:morbat1"
|
bat = "nssm:morbat1"
|
||||||
elseif which == 2 then
|
elseif which == 2 then
|
||||||
@ -96,10 +108,13 @@ mobs:register_mob("nssm:morvy", {
|
|||||||
elseif which == 3 then
|
elseif which == 3 then
|
||||||
bat = "nssm:morbat3"
|
bat = "nssm:morbat3"
|
||||||
end
|
end
|
||||||
|
|
||||||
if (bat=="nssm:morbat3") then
|
if (bat=="nssm:morbat3") then
|
||||||
pos1.y=pos1.y+1.5
|
pos1.y = pos1.y + 1.5
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.add_entity(pos1, bat)
|
minetest.add_entity(pos1, bat)
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
20, --amount
|
20, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -132,8 +147,10 @@ mobs:register_mob("nssm:morbat1", {
|
|||||||
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morbat.x",
|
mesh = "morbat.x",
|
||||||
textures = {{"morbat1.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"morbat1.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
@ -147,10 +164,7 @@ mobs:register_mob("nssm:morbat1", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -158,7 +172,6 @@ mobs:register_mob("nssm:morbat1", {
|
|||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="morparticle.png",
|
blood_texture="morparticle.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
@ -182,8 +195,10 @@ mobs:register_mob("nssm:morbat2", {
|
|||||||
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morbat.x",
|
mesh = "morbat.x",
|
||||||
textures = {{"morbat2.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"morbat2.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
@ -197,10 +212,7 @@ mobs:register_mob("nssm:morbat2", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
@ -208,7 +220,6 @@ mobs:register_mob("nssm:morbat2", {
|
|||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="morparticle.png",
|
blood_texture="morparticle.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
explosion_radius = 3,
|
explosion_radius = 3,
|
||||||
@ -234,8 +245,10 @@ mobs:register_mob("nssm:morbat3", {
|
|||||||
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morbat.x",
|
mesh = "morbat.x",
|
||||||
textures = {{"morbat3.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"morbat3.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
walk_velocity = 0.5,
|
walk_velocity = 0.5,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
@ -249,18 +262,14 @@ mobs:register_mob("nssm:morbat3", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "shoot",
|
attack_type = "shoot",
|
||||||
arrow = "nssm:morarrow",
|
arrow = "nssm:morarrow",
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:morwa", {
|
|||||||
collisionbox = {-1, -0.1, -1, 1, 3, 1},
|
collisionbox = {-1, -0.1, -1, 1, 3, 1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "morwa.x",
|
mesh = "morwa.x",
|
||||||
textures = {{"morwa.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"morwa.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -18,28 +20,21 @@ mobs:register_mob("nssm:morwa", {
|
|||||||
damage = 8,
|
damage = 8,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:wrathful_soul_fragment", chance = 3, min = 1, max = 1},
|
||||||
min = 3,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:wrathful_soul_fragment",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 50,
|
armor = 50,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
reach =4,
|
reach = 4,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=1,
|
knock_back = 1,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
arrow = "nssm:morarrow",
|
arrow = "nssm:morarrow",
|
||||||
@ -59,13 +54,16 @@ mobs:register_mob("nssm:morwa", {
|
|||||||
shoot_start =176,
|
shoot_start =176,
|
||||||
shoot_end=226,
|
shoot_end=226,
|
||||||
},
|
},
|
||||||
|
|
||||||
do_custom = function (self)
|
do_custom = function (self)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local light = minetest.get_node_light(pos)
|
local light = minetest.get_node_light(pos)
|
||||||
|
|
||||||
--minetest.chat_send_all("Luce: "..light)
|
--minetest.chat_send_all("Luce: "..light)
|
||||||
if (light < 8) then
|
if light < 8 then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
minetest.set_node(pos, {name="nssm:morwa_statue"})
|
minetest.set_node(pos, {name = "nssm:morwa_statue"})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:night_master", {
|
|||||||
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "moonherontrio.x",
|
mesh = "moonherontrio.x",
|
||||||
textures = {{"moonherontrio.png"}},
|
textures = {
|
||||||
visual_size = {x=18, y=18},
|
{"moonherontrio.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 18, y = 18},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -26,9 +28,8 @@ mobs:register_mob("nssm:night_master", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
@ -43,7 +44,9 @@ mobs:register_mob("nssm:night_master", {
|
|||||||
punch_start = 130,
|
punch_start = 130,
|
||||||
punch_end = 160,
|
punch_end = 160,
|
||||||
},
|
},
|
||||||
|
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
200, --amount
|
200, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -60,7 +63,9 @@ mobs:register_mob("nssm:night_master", {
|
|||||||
false, --collisiondetection
|
false, --collisiondetection
|
||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.add_entity(pos, "nssm:night_master_2")
|
minetest.add_entity(pos, "nssm:night_master_2")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -72,12 +77,14 @@ mobs:register_mob("nssm:night_master_2", {
|
|||||||
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "night_master_2.x",
|
mesh = "night_master_2.x",
|
||||||
textures = {{"moonherontrio.png"}},
|
textures = {
|
||||||
visual_size = {x=18, y=18},
|
{"moonherontrio.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 18, y = 18},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
floats=1,
|
floats = 1,
|
||||||
walk_velocity = 3,
|
walk_velocity = 3,
|
||||||
run_velocity = 4,
|
run_velocity = 4,
|
||||||
fall_speed = 0,
|
fall_speed = 0,
|
||||||
@ -93,7 +100,6 @@ mobs:register_mob("nssm:night_master_2", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
@ -108,7 +114,9 @@ mobs:register_mob("nssm:night_master_2", {
|
|||||||
punch_start = 130,
|
punch_start = 130,
|
||||||
punch_end = 160,
|
punch_end = 160,
|
||||||
},
|
},
|
||||||
|
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
200, --amount
|
200, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -125,7 +133,9 @@ mobs:register_mob("nssm:night_master_2", {
|
|||||||
false, --collisiondetection
|
false, --collisiondetection
|
||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.add_entity(pos, "nssm:night_master_1")
|
minetest.add_entity(pos, "nssm:night_master_1")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -137,8 +147,10 @@ mobs:register_mob("nssm:night_master_1", {
|
|||||||
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "night_master_1.x",
|
mesh = "night_master_1.x",
|
||||||
textures = {{"moonherontrio.png"}},
|
textures = {
|
||||||
visual_size = {x=18, y=18},
|
{"moonherontrio.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 18, y = 18},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -154,25 +166,15 @@ mobs:register_mob("nssm:night_master_1", {
|
|||||||
damage = 12,
|
damage = 12,
|
||||||
jump = false,
|
jump = false,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
|
||||||
chance = 1,
|
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1},
|
||||||
min = 6,
|
{name = "nssm:night_feather", chance = 1, min = 1, max = 1},
|
||||||
max = 7,},
|
|
||||||
{name = "nssm:heron_leg",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:night_feather",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 50,
|
armor = 50,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:octopus", {
|
|||||||
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
|
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "octopus.x",
|
mesh = "octopus.x",
|
||||||
textures = {{"octopus.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"octopus.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
fly = true,
|
fly = true,
|
||||||
fly_in = "default:water_source",
|
fly_in = "default:water_source",
|
||||||
@ -23,25 +25,18 @@ mobs:register_mob("nssm:octopus", {
|
|||||||
random = "octopus",
|
random = "octopus",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:tentacle", chance = 1, min = 1, max = 8},
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:tentacle",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
},
|
},
|
||||||
armor = 70,
|
armor = 70,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
@ -64,8 +59,10 @@ mobs:register_mob("nssm:xgaloctopus", {
|
|||||||
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "octopus.x",
|
mesh = "octopus.x",
|
||||||
textures = {{"xgaloctopus.png"}},
|
textures = {
|
||||||
visual_size = {x=1, y=1},
|
{"xgaloctopus.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
fly = true,
|
fly = true,
|
||||||
fly_in = "default:water_source",
|
fly_in = "default:water_source",
|
||||||
@ -82,25 +79,18 @@ mobs:register_mob("nssm:xgaloctopus", {
|
|||||||
random = "octopus",
|
random = "octopus",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:tentacle", chance = 1, min = 1, max = 8},
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:tentacle",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
group_attack = true,
|
||||||
group_attack=true,
|
attack_animals = true,
|
||||||
attack_animals=true,
|
knock_back = 2,
|
||||||
knock_back=2,
|
blood_texture = "nssm_blood_blue.png",
|
||||||
blood_texture="nssm_blood_blue.png",
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,11 +5,13 @@ mobs:register_mob("nssm:phoenix", {
|
|||||||
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "phoenix.x",
|
mesh = "phoenix.x",
|
||||||
textures = {{"phoenix.png"}},
|
textures = {
|
||||||
visual_size = {x=18, y=18},
|
{"phoenix.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 18, y = 18},
|
||||||
view_range = 40,
|
view_range = 40,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
floats=1,
|
floats = 1,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
run_velocity = 2.5,
|
run_velocity = 2.5,
|
||||||
@ -22,31 +24,18 @@ mobs:register_mob("nssm:phoenix", {
|
|||||||
damage = 2,
|
damage = 2,
|
||||||
jump = false,
|
jump = false,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
|
||||||
chance = 1,
|
{name = "nssm:sun_feather", chance = 1, min = 1, max = 1},
|
||||||
min = 7,
|
{name = "nssm:phoenix_tear", chance = 1, min = 5, max = 6},
|
||||||
max = 8,},
|
{name = "nssm:phoenix_nuggets", chance = 6, min = 10, max = 20},
|
||||||
{name = "nssm:sun_feather",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:phoenix_tear",
|
|
||||||
chance = 1,
|
|
||||||
min = 5,
|
|
||||||
max = 6,},
|
|
||||||
{name = "nssm:phoenix_nuggets",
|
|
||||||
chance = 6,
|
|
||||||
min = 10,
|
|
||||||
max = 20,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
blood_amount=50,
|
blood_amount = 50,
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "shoot",
|
attack_type = "shoot",
|
||||||
arrow = "nssm:phoenix_arrow",
|
arrow = "nssm:phoenix_arrow",
|
||||||
|
@ -6,8 +6,10 @@ mobs:register_mob("nssm:pumpboom_small", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "pumpboom.x",
|
mesh = "pumpboom.x",
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
textures = {{"pumpboom.png"}},
|
textures = {
|
||||||
visual_size = {x=3, y=3},
|
{"pumpboom.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 3, y = 3},
|
||||||
explosion_radius = 4,
|
explosion_radius = 4,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
@ -20,26 +22,19 @@ mobs:register_mob("nssm:pumpboom_small", {
|
|||||||
damage = 1.5,
|
damage = 1.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:black_powder", chance = 2, min = 1, max = 2},
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:black_powder",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
@ -63,8 +58,10 @@ mobs:register_mob("nssm:pumpboom_medium", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "pumpboom.x",
|
mesh = "pumpboom.x",
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
textures = {{"pumpboom.png"}},
|
textures = {
|
||||||
visual_size = {x=5, y=5},
|
{"pumpboom.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 5, y = 5},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -76,26 +73,19 @@ mobs:register_mob("nssm:pumpboom_medium", {
|
|||||||
damage = 1.5,
|
damage = 1.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:black_powder", chance = 2, min = 1, max = 3},
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:black_powder",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
@ -120,8 +110,10 @@ mobs:register_mob("nssm:pumpboom_large", {
|
|||||||
mesh = "pumpboom.x",
|
mesh = "pumpboom.x",
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
explosion_radius = 8,
|
explosion_radius = 8,
|
||||||
textures = {{"pumpboom.png"}},
|
textures = {
|
||||||
visual_size = {x=8, y=8},
|
{"pumpboom.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 8, y = 8},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -132,26 +124,19 @@ mobs:register_mob("nssm:pumpboom_large", {
|
|||||||
damage = 1.5,
|
damage = 1.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:black_powder", chance = 2, min = 2, max = 4},
|
||||||
min = 3,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:black_powder",
|
|
||||||
chance = 2,
|
|
||||||
min = 2,
|
|
||||||
max = 4,},
|
|
||||||
},
|
},
|
||||||
armor = 100,
|
armor = 100,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,11 +5,13 @@ mobs:register_mob("nssm:pumpking", {
|
|||||||
collisionbox = {-0.4, 0.00, -0.4, 0.4, 3.2, 0.4},
|
collisionbox = {-0.4, 0.00, -0.4, 0.4, 3.2, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "pumpking.x",
|
mesh = "pumpking.x",
|
||||||
textures = {{"pumpking.png"}},
|
textures = {
|
||||||
visual_size = {x=2.5, y=2.5},
|
{"pumpking.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2.5, y = 2.5},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
lifetimer=500,
|
lifetimer = 500,
|
||||||
rotate=270,
|
rotate = 270,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -21,30 +23,20 @@ mobs:register_mob("nssm:pumpking", {
|
|||||||
damage = 13,
|
damage = 13,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
|
||||||
chance = 1,
|
{name = "nssm:cursed_pumpkin_seed", chance = 1, min = 1, max = 1},
|
||||||
min = 7,
|
{name = "nssm:black_powder", chance = 1, min = 9, max = 12},
|
||||||
max = 9,},
|
|
||||||
{name = "nssm:cursed_pumpkin_seed",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:black_powder",
|
|
||||||
chance = 1,
|
|
||||||
min = 9,
|
|
||||||
max = 12,},
|
|
||||||
},
|
},
|
||||||
armor =40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
blood_amount=25,
|
blood_amount = 25,
|
||||||
stepheight=2.1,
|
stepheight = 2.1,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
jump_height=12,
|
jump_height = 12,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
stand_start = 165, stand_end = 210,
|
stand_start = 165, stand_end = 210,
|
||||||
@ -53,22 +45,34 @@ mobs:register_mob("nssm:pumpking", {
|
|||||||
punch_start = 300, punch_end = 330,
|
punch_start = 300, punch_end = 330,
|
||||||
speed_normal = 15, speed_run = 15,
|
speed_normal = 15, speed_run = 15,
|
||||||
},
|
},
|
||||||
|
|
||||||
on_die=function(self,pos)
|
on_die=function(self,pos)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.after(0.2, function(pos)
|
minetest.after(0.2, function(pos)
|
||||||
tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
|
tnt.boom(pos, {damage_radius = 5, radius = 4, ignore_protection = false})
|
||||||
end, pos)
|
end, pos)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
self.pumpking_timer = (self.pumpking_timer or os.time())
|
|
||||||
if (os.time() - self.pumpking_timer) >3 then
|
self.pumpking_timer = self.pumpking_timer or os.time()
|
||||||
|
|
||||||
|
if (os.time() - self.pumpking_timer) > 3 then
|
||||||
|
|
||||||
mobs:set_animation(self, "punch")
|
mobs:set_animation(self, "punch")
|
||||||
|
|
||||||
self.pumpking_timer = os.time()
|
self.pumpking_timer = os.time()
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
p.y = p.y + 1.5
|
p.y = p.y + 1.5
|
||||||
s.y = s.y + 1.5
|
s.y = s.y + 1.5
|
||||||
|
|
||||||
if minetest.line_of_sight(p, s) == true then
|
if minetest.line_of_sight(p, s) == true then
|
||||||
|
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
minetest.sound_play(self.sounds.attack, {
|
minetest.sound_play(self.sounds.attack, {
|
||||||
@ -76,12 +80,17 @@ mobs:register_mob("nssm:pumpking", {
|
|||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
local pos1 = {x=s.x+math.random(-1,1), y=s.y-1.5, z=s.z+math.random(-1,1)}
|
|
||||||
|
local pos1 = {
|
||||||
|
x = s.x + math.random(-1, 1),
|
||||||
|
y = s.y - 1.5,
|
||||||
|
z = s.z + math.random(-1, 1)
|
||||||
|
}
|
||||||
|
|
||||||
minetest.after(1, function(pos1)
|
minetest.after(1, function(pos1)
|
||||||
minetest.set_node(pos1, {name="nssm:pumpbomb"})
|
minetest.set_node(pos1, {name = "nssm:pumpbomb"})
|
||||||
minetest.get_node_timer(pos1):start(2)
|
minetest.get_node_timer(pos1):start(2)
|
||||||
end,
|
end, pos1)
|
||||||
pos1)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:sand_bloco", {
|
|||||||
collisionbox = {-0.5, -0.2, -0.5, 0.5, 1.3, 0.5},
|
collisionbox = {-0.5, -0.2, -0.5, 0.5, 1.3, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "sand_bloco.x",
|
mesh = "sand_bloco.x",
|
||||||
textures = {{"sand_bloco.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"sand_bloco.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 14,
|
view_range = 14,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
@ -20,29 +22,19 @@ mobs:register_mob("nssm:sand_bloco", {
|
|||||||
reach = 1.5,
|
reach = 1.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
|
||||||
chance = 1,
|
{name = "default:sandstone", chance = 1, min = 2, max = 3},
|
||||||
min = 1,
|
{name = "nssm:sand_bloco_skin", chance = 2, min = 1, max = 3},
|
||||||
max = 1,},
|
|
||||||
{name = "default:sandstone",
|
|
||||||
chance = 1,
|
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:sand_bloco_skin",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 10,
|
water_damage = 10,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="stone_blood.png",
|
blood_texture = "stone_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:sandworm", {
|
|||||||
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
|
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "sandworm.x",
|
mesh = "sandworm.x",
|
||||||
textures = {{"sandworm.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"sandworm.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 17,
|
view_range = 17,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -21,30 +23,20 @@ mobs:register_mob("nssm:sandworm", {
|
|||||||
},
|
},
|
||||||
jump = false,
|
jump = false,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:worm_flesh",
|
{name = "nssm:worm_flesh", chance = 2, min = 1, max = 3},
|
||||||
chance = 2,
|
{name = "nssm:sandworm_skin", chance = 2, min = 1, max = 3},
|
||||||
min = 1,
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:sandworm_skin",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:life_energy",
|
|
||||||
chance = 1,
|
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
@ -59,6 +51,6 @@ mobs:register_mob("nssm:sandworm", {
|
|||||||
punch_end = 180,
|
punch_end = 180,
|
||||||
},
|
},
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
digging_attack(self, "sand", self.run_velocity, {x=0, y=3, z=0})
|
digging_attack(self, "sand", self.run_velocity, {x = 0, y = 3, z = 0})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:scrausics", {
|
|||||||
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
|
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "scrausics.x",
|
mesh = "scrausics.x",
|
||||||
textures = {{"scrausics.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"scrausics.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
view_range = 35,
|
view_range = 35,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -21,25 +23,18 @@ mobs:register_mob("nssm:scrausics", {
|
|||||||
damage = 4,
|
damage = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:raw_scrausics_wing", chance = 1, min = 1, max = 2},
|
||||||
min = 3,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:raw_scrausics_wing",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
fly = true,
|
fly = true,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -5,8 +5,11 @@ mobs:register_mob("nssm:signosigno", {
|
|||||||
collisionbox = {-0.2, 0.00, -0.2, 0.2, 1.6, 0.2},
|
collisionbox = {-0.2, 0.00, -0.2, 0.2, 1.6, 0.2},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "signosigno.x",
|
mesh = "signosigno.x",
|
||||||
textures = {{"signosigno.png"}, {"signosigno2.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"signosigno.png"},
|
||||||
|
{"signosigno2.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 15,
|
view_range = 15,
|
||||||
walk_velocity = 1.5,
|
walk_velocity = 1.5,
|
||||||
@ -17,25 +20,18 @@ mobs:register_mob("nssm:signosigno", {
|
|||||||
reach = 1.5,
|
reach = 1.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:slothful_soul_fragment", chance = 20, min = 1, max = 1},
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:slothful_soul_fragment",
|
|
||||||
chance = 20,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 2,
|
lava_damage = 2,
|
||||||
light_damage = 1,
|
light_damage = 1,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="morparticle.png",
|
blood_texture = "morparticle.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:snow_biter", {
|
|||||||
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
|
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "snow_biter.x",
|
mesh = "snow_biter.x",
|
||||||
textures = {{"snow_biter.png"}},
|
textures = {
|
||||||
visual_size = {x=6, y=6},
|
{"snow_biter.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 6, y = 6},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 18,
|
view_range = 18,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -18,38 +20,24 @@ mobs:register_mob("nssm:snow_biter", {
|
|||||||
sounds = {
|
sounds = {
|
||||||
random = "snow_biter",
|
random = "snow_biter",
|
||||||
},
|
},
|
||||||
--pathfinding = true,
|
|
||||||
damage = 4,
|
damage = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
chance = 1,
|
{name = "nssm:frosted_amphibian_heart", chance = 2, min = 1, max = 1},
|
||||||
min = 2,
|
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1},
|
||||||
max = 3},
|
{name = "nssm:little_ice_tooth", chance = 2, min = 0, max = 4},
|
||||||
{name = "nssm:frosted_amphibian_heart",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:amphibian_ribs",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
{name = "nssm:little_ice_tooth",
|
|
||||||
chance = 2,
|
|
||||||
min = 0,
|
|
||||||
max = 4},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 30,
|
lava_damage = 30,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
double_melee_attack = true,
|
double_melee_attack = true,
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -6,8 +6,10 @@ mobs:register_mob("nssm:spiderduck", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
mesh = "spiderduck.x",
|
mesh = "spiderduck.x",
|
||||||
textures = {{"spiderduck.png"}},
|
textures = {
|
||||||
visual_size = {x=2, y=2},
|
{"spiderduck.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 2, y = 2},
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 24,
|
view_range = 24,
|
||||||
@ -19,38 +21,22 @@ mobs:register_mob("nssm:spiderduck", {
|
|||||||
damage = 6,
|
damage = 6,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 1, min = 1, max = 8},
|
||||||
min = 1,
|
{name = "nssm:silk_gland", chance = 2, min = 1, max = 2},
|
||||||
max = 2,},
|
{name = "nssm:black_duck_feather", chance = 3, min = 1, max = 4},
|
||||||
{name = "nssm:duck_legs",
|
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:silk_gland",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:black_duck_feather",
|
|
||||||
chance = 3,
|
|
||||||
min = 1,
|
|
||||||
max = 4,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.5,
|
stepheight = 1.5,
|
||||||
on_rightclick = nil,
|
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
arrow = "nssm:webball",
|
arrow = "nssm:webball",
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:stone_eater", {
|
|||||||
collisionbox = {-0.3, -0.05, -0.3, 0.3, 0.65, 0.3},
|
collisionbox = {-0.3, -0.05, -0.3, 0.3, 0.65, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "stone_eater.x",
|
mesh = "stone_eater.x",
|
||||||
textures = {{"stone_eater.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"stone_eater.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
rotate = 270,
|
rotate = 270,
|
||||||
@ -18,30 +20,27 @@ mobs:register_mob("nssm:stone_eater", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
reach = 1.5,
|
reach = 1.5,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "default:stone",
|
{name = "default:stone", chance = 2, min = 1, max = 3},
|
||||||
chance = 2,
|
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
|
||||||
min = 1,
|
{name = "nssm:stoneater_mandible", chance = 2, min = 1, max = 4},
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:life_energy",
|
|
||||||
chance = 1,
|
|
||||||
min = 2,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:stoneater_mandible",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 4,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
blood_texture="stone_blood.png",
|
blood_texture = "stone_blood.png",
|
||||||
immune_to={{'default:sword_stone', -2},{'default:stone', -2}, {'default:cobble', -2}, {'default:axe_stone', -2}, {'default:shovel_stone', -2}, {'default:pick_stone', -2}},
|
immune_to={
|
||||||
|
{'default:sword_stone', -2},
|
||||||
|
{'default:stone', -2},
|
||||||
|
{'default:cobble', -2},
|
||||||
|
{'default:axe_stone', -2},
|
||||||
|
{'default:shovel_stone', -2},
|
||||||
|
{'default:pick_stone', -2}
|
||||||
|
},
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
@ -57,6 +56,6 @@ mobs:register_mob("nssm:stone_eater", {
|
|||||||
},
|
},
|
||||||
do_custom = function(self)
|
do_custom = function(self)
|
||||||
--digging_ability(self, "stone", self.run_velocity, {x=0, y=2, z=0})
|
--digging_ability(self, "stone", self.run_velocity, {x=0, y=2, z=0})
|
||||||
digging_attack(self, "stone", self.run_velocity, {x=0, y=1, z=0})
|
digging_attack(self, "stone", self.run_velocity, {x = 0, y = 1, z = 0})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -5,10 +5,12 @@ mobs:register_mob("nssm:swimming_duck", {
|
|||||||
collisionbox = {-0.35, -0.30, -0.35, 0.35, 0.7, 0.35},
|
collisionbox = {-0.35, -0.30, -0.35, 0.35, 0.7, 0.35},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "swimming_duck.x",
|
mesh = "swimming_duck.x",
|
||||||
textures = {{"swimming_duck.png"}},
|
textures = {
|
||||||
visual_size = {x=1.5, y=1.5},
|
{"swimming_duck.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 1.5, y = 1.5},
|
||||||
view_range = 25,
|
view_range = 25,
|
||||||
floats=1,
|
floats = 1,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 1,
|
run_velocity = 1,
|
||||||
damage = 3,
|
damage = 3,
|
||||||
@ -20,33 +22,20 @@ mobs:register_mob("nssm:swimming_duck", {
|
|||||||
random = "duck",
|
random = "duck",
|
||||||
},
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
|
||||||
chance = 1,
|
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
|
||||||
min = 1,
|
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
|
||||||
max = 2,},
|
{name = "nssm:duck_feather", chance = 6, min = 1, max = 2},
|
||||||
{name = "nssm:duck_legs",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
{name = "nssm:duck_beak",
|
|
||||||
chance = 5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:duck_feather",
|
|
||||||
chance = 6,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=4,
|
knock_back = 4,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 25,
|
speed_normal = 25,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:tarantula", {
|
|||||||
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.9, 0.5},
|
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.9, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "tarantula.x",
|
mesh = "tarantula.x",
|
||||||
textures = {{"tarantula.png"}},
|
textures = {
|
||||||
visual_size = {x=8, y=8},
|
{"tarantula.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 8, y = 8},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 20,
|
view_range = 20,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -20,21 +22,17 @@ mobs:register_mob("nssm:tarantula", {
|
|||||||
damage = 8,
|
damage = 8,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:super_silk_gland",
|
{name = "nssm:super_silk_gland", chance = 1, min = 3, max = 5},
|
||||||
chance = 1,
|
|
||||||
min = 3,
|
|
||||||
max = 5,},
|
|
||||||
},
|
},
|
||||||
armor = 60,
|
armor = 60,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
dogshoot_switch = true,
|
dogshoot_switch = true,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
arrow = "nssm:thickwebball",
|
arrow = "nssm:thickwebball",
|
||||||
@ -54,8 +52,11 @@ mobs:register_mob("nssm:tarantula", {
|
|||||||
shoot_start = 180,
|
shoot_start = 180,
|
||||||
shoot_end = 200,
|
shoot_end = 200,
|
||||||
},
|
},
|
||||||
|
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
200, --amount
|
200, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -72,6 +73,7 @@ mobs:register_mob("nssm:tarantula", {
|
|||||||
false, --collisiondetection
|
false, --collisiondetection
|
||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
|
|
||||||
minetest.add_entity(pos, "nssm:tarantula_propower")
|
minetest.add_entity(pos, "nssm:tarantula_propower")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -84,8 +86,10 @@ mobs:register_mob("nssm:tarantula_propower", {
|
|||||||
collisionbox = {-0.5, 0.00, -0.5, 0.5, 1, 0.5},
|
collisionbox = {-0.5, 0.00, -0.5, 0.5, 1, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "tarantula_propower.x",
|
mesh = "tarantula_propower.x",
|
||||||
textures = {{"tarantula.png"}},
|
textures = {
|
||||||
visual_size = {x=10, y=10},
|
{"tarantula.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 10, y = 10},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
lifetimer = 500,
|
lifetimer = 500,
|
||||||
@ -98,37 +102,21 @@ mobs:register_mob("nssm:tarantula_propower", {
|
|||||||
damage = 12,
|
damage = 12,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 16, max = 18},
|
||||||
chance = 1,
|
{name = "nssm:spider_leg", chance = 1, min = 1, max = 8},
|
||||||
min = 16,
|
{name = "nssm:tarantula_chelicerae", chance = 1, min = 1, max = 1},
|
||||||
max = 18,},
|
{name = "nssm:silk_gland", chance = 2, min = 1, max = 3},
|
||||||
{name = "nssm:spider_leg",
|
{name = "nssm:spider_meat", chance = 2, min = 1, max = 2},
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:tarantula_chelicerae",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
{name = "nssm:silk_gland",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:spider_meat",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 40,
|
armor = 40,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 3,
|
lava_damage = 3,
|
||||||
reach = 4,
|
reach = 4,
|
||||||
knock_back=0,
|
knock_back = 0,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=2.1,
|
stepheight = 2.1,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:uloboros", {
|
|||||||
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.8, 0.5},
|
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.8, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "uloboros.x",
|
mesh = "uloboros.x",
|
||||||
textures = {{"uloboros.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"uloboros.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 22,
|
view_range = 22,
|
||||||
walk_velocity = 1.5,
|
walk_velocity = 1.5,
|
||||||
@ -20,34 +22,21 @@ mobs:register_mob("nssm:uloboros", {
|
|||||||
reach = 2,
|
reach = 2,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 1, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:spider_leg", chance = 2, min = 1, max = 8},
|
||||||
min = 1,
|
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
|
||||||
max = 4,},
|
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2},
|
||||||
{name = "nssm:spider_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 8,},
|
|
||||||
{name = "nssm:silk_gland",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 3,},
|
|
||||||
{name = "nssm:spider_meat",
|
|
||||||
chance = 4,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 7,
|
lava_damage = 7,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood_blue.png",
|
blood_texture = "nssm_blood_blue.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 20,
|
speed_normal = 20,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:werewolf", {
|
|||||||
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
|
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "werewolf.x",
|
mesh = "werewolf.x",
|
||||||
textures = {{"werewolf.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"werewolf.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
walk_velocity = 3,
|
walk_velocity = 3,
|
||||||
@ -18,30 +20,20 @@ mobs:register_mob("nssm:werewolf", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
|
||||||
min = 3,
|
{name = "nssm:wolf_fur", chance = 2, min = 1, max = 1},
|
||||||
max = 4},
|
|
||||||
{name = "nssm:werewolf_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2},
|
|
||||||
{name = "nssm:wolf_fur",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
@ -5,8 +5,10 @@ mobs:register_mob("nssm:white_werewolf", {
|
|||||||
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
|
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "white_werewolf.x",
|
mesh = "white_werewolf.x",
|
||||||
textures = {{"white_werewolf.png"}},
|
textures = {
|
||||||
visual_size = {x=4, y=4},
|
{"white_werewolf.png"}
|
||||||
|
},
|
||||||
|
visual_size = {x = 4, y = 4},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
view_range = 30,
|
view_range = 30,
|
||||||
walk_velocity = 3,
|
walk_velocity = 3,
|
||||||
@ -18,30 +20,20 @@ mobs:register_mob("nssm:white_werewolf", {
|
|||||||
damage = 5,
|
damage = 5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "nssm:life_energy",
|
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
|
||||||
chance = 1,
|
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
|
||||||
min = 3,
|
{name = "nssm:white_wolf_fur", chance = 2, min = 1, max = 1},
|
||||||
max = 4},
|
|
||||||
{name = "nssm:werewolf_leg",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 2},
|
|
||||||
{name = "nssm:white_wolf_fur",
|
|
||||||
chance = 2,
|
|
||||||
min = 1,
|
|
||||||
max = 1},
|
|
||||||
},
|
},
|
||||||
armor = 80,
|
armor = 80,
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
group_attack=true,
|
group_attack = true,
|
||||||
attack_animals=true,
|
attack_animals = true,
|
||||||
knock_back=2,
|
knock_back = 2,
|
||||||
blood_texture="nssm_blood.png",
|
blood_texture = "nssm_blood.png",
|
||||||
stepheight=1.1,
|
stepheight = 1.1,
|
||||||
on_rightclick = nil,
|
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
|
447
nssm_api.lua
447
nssm_api.lua
@ -10,18 +10,24 @@ nssm.safebones = minetest.setting_getbool("nssm.safebones") or false
|
|||||||
nssm.cryosave = minetest.setting_getbool("nssm.cryosave") or false
|
nssm.cryosave = minetest.setting_getbool("nssm.cryosave") or false
|
||||||
|
|
||||||
function nssm:virulence(mobe)
|
function nssm:virulence(mobe)
|
||||||
|
|
||||||
if not nssm.lessvirulent then
|
if not nssm.lessvirulent then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
return math.ceil(100 / mobe.hp_max)
|
return math.ceil(100 / mobe.hp_max)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function nssm:affectbones(mobe) -- as function for adaptable heuristic
|
function nssm:affectbones(mobe) -- as function for adaptable heuristic
|
||||||
return not nssm.safebones
|
return not nssm.safebones
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function drops(drop)
|
function drops(drop)
|
||||||
|
|
||||||
if drop then
|
if drop then
|
||||||
|
|
||||||
drop:setvelocity({
|
drop:setvelocity({
|
||||||
x = math.random(-10, 10) / 9,
|
x = math.random(-10, 10) / 9,
|
||||||
y = 5,
|
y = 5,
|
||||||
@ -30,20 +36,22 @@ function drops(drop)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D
|
function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D
|
||||||
local ang = math.pi/2
|
|
||||||
|
local ang = math.pi / 2
|
||||||
local c = math.cos(ang)
|
local c = math.cos(ang)
|
||||||
local s = math.sin(ang)
|
local s = math.sin(ang)
|
||||||
|
local i = vec.x * c - vec.z * s
|
||||||
local i = vec.x*c - vec.z*s
|
local k = vec.x * s + vec.z * c
|
||||||
local k = vec.x*s + vec.z*c
|
|
||||||
local j = 0
|
local j = 0
|
||||||
|
|
||||||
vec = {x=i, y=j, z=k}
|
return {x = i, y = j, z = k}
|
||||||
return vec
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function add_entity_and_particles(entity, pos, particles, multiplier)
|
function add_entity_and_particles(entity, pos, particles, multiplier)
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 100*multiplier,
|
amount = 100*multiplier,
|
||||||
time = 2,
|
time = 2,
|
||||||
@ -61,65 +69,90 @@ function add_entity_and_particles(entity, pos, particles, multiplier)
|
|||||||
vertical = false,
|
vertical = false,
|
||||||
texture = particles,
|
texture = particles,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.add_entity(pos, entity)
|
minetest.add_entity(pos, entity)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- get node but use fallback for nil or unknown
|
-- get node but use fallback for nil or unknown
|
||||||
function node_ok(pos, fallback)
|
function node_ok(pos, fallback)
|
||||||
|
|
||||||
fallback = fallback or "default:dirt"
|
fallback = fallback or "default:dirt"
|
||||||
|
|
||||||
local node = minetest.get_node_or_nil(pos)
|
local node = minetest.get_node_or_nil(pos)
|
||||||
|
|
||||||
if not node then
|
if not node then
|
||||||
return minetest.registered_nodes[fallback]
|
return minetest.registered_nodes[fallback]
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes[node.name] then
|
if minetest.registered_nodes[node.name] then
|
||||||
return node
|
return node
|
||||||
end
|
end
|
||||||
|
|
||||||
return minetest.registered_nodes[fallback]
|
return minetest.registered_nodes[fallback]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function dist_pos(p, s)
|
function dist_pos(p, s)
|
||||||
local v = {x = math.abs(s.x-p.x), y = math.abs(s.y-p.y), z = math.abs(s.z-p.z)}
|
local v = {
|
||||||
local r = math.sqrt(v.x^2+v.y^2+v.z^2)
|
x = math.abs(s.x - p.x),
|
||||||
return r
|
y = math.abs(s.y - p.y),
|
||||||
|
z = math.abs(s.z - p.z)
|
||||||
|
}
|
||||||
|
|
||||||
|
return math.sqrt(v.x ^ 2 + v.y ^ 2 + v.z ^ 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--check_for_death functions customized for monsters who respawns (Masticone)
|
--check_for_death functions customized for monsters who respawns (Masticone)
|
||||||
function check_for_death_hydra(self)
|
function check_for_death_hydra(self)
|
||||||
|
|
||||||
local hp = self.object:get_hp()
|
local hp = self.object:get_hp()
|
||||||
|
|
||||||
if hp > 0 then
|
if hp > 0 then
|
||||||
|
|
||||||
self.health = hp
|
self.health = hp
|
||||||
|
|
||||||
if self.sounds.damage ~= nil then
|
if self.sounds.damage ~= nil then
|
||||||
minetest.sound_play(self.sounds.damage,{
|
minetest.sound_play(self.sounds.damage,{
|
||||||
object = self.object,
|
object = self.object,
|
||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local obj = nil
|
local obj = nil
|
||||||
|
|
||||||
if self.sounds.death ~= nil then
|
if self.sounds.death ~= nil then
|
||||||
minetest.sound_play(self.sounds.death,{
|
minetest.sound_play(self.sounds.death,{
|
||||||
object = self.object,
|
object = self.object,
|
||||||
max_hear_distance = self.sounds.distance
|
max_hear_distance = self.sounds.distance
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
self.object:remove()
|
|
||||||
|
self.object:remove()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function round(n)
|
function round(n)
|
||||||
if (n>0) then
|
|
||||||
|
if (n > 0) then
|
||||||
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
||||||
else
|
else
|
||||||
n=-n
|
n = -n
|
||||||
local t = n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
local t = n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
||||||
return -t
|
return -t
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function explosion_particles(pos, exp_radius)
|
function explosion_particles(pos, exp_radius)
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
100*exp_radius/2, --amount
|
100*exp_radius/2, --amount
|
||||||
0.1, --time
|
0.1, --time
|
||||||
@ -137,198 +170,8 @@ function explosion_particles(pos, exp_radius)
|
|||||||
"tnt_smoke.png" --texture
|
"tnt_smoke.png" --texture
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
--[[
|
|
||||||
function explosion(pos, exp_radius, fire, kamehameha_bad)
|
|
||||||
local radius = exp_radius
|
|
||||||
-- if area protected or near map limits then no blast damage
|
|
||||||
if minetest.is_protected(pos, "")
|
|
||||||
or not within_limits(pos, radius) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--sound
|
|
||||||
minetest.sound_play("boom", {
|
|
||||||
pos = pos,
|
|
||||||
max_hear_distance = exp_radius*4,
|
|
||||||
})
|
|
||||||
|
|
||||||
--particles:
|
|
||||||
explosion_particles(pos, exp_radius)
|
|
||||||
|
|
||||||
--Damages entities around (not the player)
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, exp_radius)
|
|
||||||
for _,obj in ipairs(objects) do
|
|
||||||
local obj_p = obj:get_pos()
|
|
||||||
local vec = {x=obj_p.x-pos.x, y=obj_p.y-pos.y, z=obj_p.z-pos.z}
|
|
||||||
local dist = (vec.x^2+vec.y^2+vec.z^2)^0.5
|
|
||||||
local damage = (-exp_radius*dist+exp_radius^2)*2
|
|
||||||
if not kamehameha_bad then
|
|
||||||
if obj:is_player() then
|
|
||||||
obj:set_hp(obj:get_hp()-damage)
|
|
||||||
elseif obj:get_luaentity().health then
|
|
||||||
obj:get_luaentity().health = obj:get_luaentity().health - damage
|
|
||||||
check_for_death(obj:get_luaentity())
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if (obj:get_luaentity()) then
|
|
||||||
local name = obj:get_luaentity().name
|
|
||||||
if (name~="nssm:morvalar0") and (name~="nssm:morvalar5") then
|
|
||||||
if obj:is_player() then
|
|
||||||
obj:set_hp(obj:get_hp()-damage)
|
|
||||||
elseif obj:get_luaentity().health then
|
|
||||||
obj:get_luaentity().health = obj.get_luaentity().health - damage
|
|
||||||
check_for_death(obj:get_luaentity())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--damages blocks around and if necessary put some fire
|
|
||||||
pos = vector.round(pos) -- voxelmanip doesn't work properly unless pos is rounded ?!?!
|
|
||||||
local vm = VoxelManip()
|
|
||||||
local minp, maxp = vm:read_from_map(vector.subtract(pos, radius), vector.add(pos, radius))
|
|
||||||
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
|
|
||||||
local data = vm:get_data()
|
|
||||||
local p = {}
|
|
||||||
local pr = PseudoRandom(os.time())
|
|
||||||
|
|
||||||
--remove everything near the center of the explosion
|
|
||||||
for dz=-radius,radius do
|
|
||||||
for dy=-radius,radius do
|
|
||||||
local vi = a:index(pos.x + (-radius), pos.y + dy, pos.z + dz)
|
|
||||||
for dx=-radius,radius do
|
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
|
||||||
|
|
||||||
if (dx * dx) + (dy * dy) + (dz * dz) <= (radius * radius) + pr:next(-radius, radius)
|
|
||||||
and data[vi] ~= c_air
|
|
||||||
and data[vi] ~= c_ignore
|
|
||||||
and data[vi] ~= c_obsidian
|
|
||||||
and data[vi] ~= c_brick
|
|
||||||
and data[vi] ~= c_chest then
|
|
||||||
|
|
||||||
local n = node_ok(p).name
|
|
||||||
local on_blast = minetest.registered_nodes[n].on_blast
|
|
||||||
|
|
||||||
if on_blast then
|
|
||||||
return on_blast(p)
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_item_group(n, "unbreakable") ~= 1 then
|
|
||||||
|
|
||||||
-- if chest then drop items inside
|
|
||||||
if n == "default:chest"
|
|
||||||
or n == "3dchest:chest"
|
|
||||||
or n == "bones:bones" then
|
|
||||||
|
|
||||||
local meta = minetest.get_meta(p)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
|
|
||||||
for i = 1, inv:get_size("main") do
|
|
||||||
|
|
||||||
local m_stack = inv:get_stack("main", i)
|
|
||||||
local obj = minetest.add_item(p, m_stack)
|
|
||||||
|
|
||||||
if obj then
|
|
||||||
|
|
||||||
obj:set_velocity({
|
|
||||||
x = math.random(-2, 2),
|
|
||||||
y = 7,
|
|
||||||
z = math.random(-2, 2)
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- after effects
|
|
||||||
if fire > 0
|
|
||||||
and (minetest.registered_nodes[n].groups.flammable
|
|
||||||
or math.random(1, 100) <= 3) then
|
|
||||||
minetest.set_node(p, {name = "fire:basic_flame"})
|
|
||||||
else
|
|
||||||
local dist = round(((pos.x-p.x)^2 + (pos.y-p.y)^2 + (pos.z-p.z)^2)^1/2)
|
|
||||||
local prob = 2/dist
|
|
||||||
if math.random(1,100)<=prob*100 then
|
|
||||||
minetest.remove_node(p)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vi = vi+1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- SPECIAL ABILITIES OF SOME MOBS
|
|
||||||
--[[function digging_ability(
|
|
||||||
self, --the entity of the mob
|
|
||||||
group, --group of the blocks the mob can dig: nil=everything
|
|
||||||
max_vel, --max velocity of the mob
|
|
||||||
dim --vector representing the dimensions of the mob
|
|
||||||
)
|
|
||||||
|
|
||||||
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
|
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
|
||||||
local pos = self.object:get_pos()
|
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local h = dim.y
|
|
||||||
|
|
||||||
local max = 0
|
|
||||||
--local posmax = 0 -- 1 = x, -1=-x, 2 = z, -2 = -z
|
|
||||||
local yaw = (self.object:get_yaw() + self.rotate) or 0
|
|
||||||
local x = math.sin(yaw)*-1
|
|
||||||
local z = math.cos(yaw)
|
|
||||||
|
|
||||||
local i = 1
|
|
||||||
local i1 = -1
|
|
||||||
local k = 1
|
|
||||||
local k1 = -1
|
|
||||||
|
|
||||||
local multiplier = 2
|
|
||||||
|
|
||||||
if x>0 then
|
|
||||||
i = round(x*max_vel)*multiplier
|
|
||||||
else
|
|
||||||
i1 = round(x*max_vel)*multiplier
|
|
||||||
end
|
|
||||||
|
|
||||||
if z>0 then
|
|
||||||
k = round(z*max_vel)*multiplier
|
|
||||||
else
|
|
||||||
k1 = round(z*max_vel)*multiplier
|
|
||||||
end
|
|
||||||
|
|
||||||
for dx = i1, i do
|
|
||||||
for dy = 0, h do
|
|
||||||
for dz = k1, k do
|
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
|
||||||
|
|
||||||
local n = minetest.get_node(p).name
|
|
||||||
--local up = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
|
||||||
if group == nil then
|
|
||||||
if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or (n == "bones:bones" and not nssm:affectbones(self) ) then
|
|
||||||
else
|
|
||||||
--minetest.set_node(p, {name="air"})
|
|
||||||
minetest.remove_node(p)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if (minetest.get_item_group(n, group)==1) and (minetest.get_item_group(n, "unbreakable") ~= 1) and (n == "bones:bones" and not (minetest.is_protected(p, "")) ) then
|
|
||||||
--minetest.set_node(p, {name="air"})
|
|
||||||
minetest.remove_node(p)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
]]--
|
|
||||||
function digging_attack(
|
function digging_attack(
|
||||||
self, --the entity of the mob
|
self, --the entity of the mob
|
||||||
group, --group of the blocks the mob can dig: nil=everything
|
group, --group of the blocks the mob can dig: nil=everything
|
||||||
@ -338,49 +181,59 @@ function digging_attack(
|
|||||||
|
|
||||||
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
|
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
|
||||||
if self.attack and self.attack:is_player() then
|
if self.attack and self.attack:is_player() then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack:get_pos()
|
||||||
|
|
||||||
local dir = vector.subtract(p,s)
|
local dir = vector.subtract(p,s)
|
||||||
dir = vector.normalize(dir)
|
|
||||||
local per = perpendicular_vector(dir)
|
|
||||||
|
|
||||||
|
dir = vector.normalize(dir)
|
||||||
|
|
||||||
|
local per = perpendicular_vector(dir)
|
||||||
local posp = vector.add(s,dir)
|
local posp = vector.add(s,dir)
|
||||||
|
|
||||||
--minetest.chat_send_all("La mia posizione:"..minetest.pos_to_string(s))
|
--minetest.chat_send_all("La mia posizione:"..minetest.pos_to_string(s))
|
||||||
--minetest.chat_send_all("La posizione davanti:"..minetest.pos_to_string(posp))
|
--minetest.chat_send_all("La posizione davanti:"..minetest.pos_to_string(posp))
|
||||||
posp = vector.subtract(posp,per)
|
posp = vector.subtract(posp,per)
|
||||||
|
|
||||||
|
|
||||||
for j = 1,3 do
|
for j = 1,3 do
|
||||||
--minetest.chat_send_all("pos1:"..minetest.pos_to_string(posp).." per.y= "..dim.y)
|
--minetest.chat_send_all("pos1:"..minetest.pos_to_string(posp).." per.y= "..dim.y)
|
||||||
if minetest.is_protected(posp, "") then
|
if minetest.is_protected(posp, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos1 = posp
|
local pos1 = posp
|
||||||
|
|
||||||
for i = 0,dim.y do
|
for i = 0, dim.y do
|
||||||
|
|
||||||
--minetest.chat_send_all("pos2:"..minetest.pos_to_string(posp).." per.y= "..per.y)
|
--minetest.chat_send_all("pos2:"..minetest.pos_to_string(posp).." per.y= "..per.y)
|
||||||
|
|
||||||
local n = minetest.get_node(pos1).name
|
local n = minetest.get_node(pos1).name
|
||||||
--local up = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
--local up = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
|
||||||
if group == nil then
|
if group == nil then
|
||||||
if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(pos1, "") or (n == "bones:bones" and not nssm:affectbones(self) ) then
|
|
||||||
|
if minetest.get_item_group(n, "unbreakable") == 1
|
||||||
|
or minetest.is_protected(pos1, "")
|
||||||
|
or (n == "bones:bones" and not nssm:affectbones(self) ) then
|
||||||
else
|
else
|
||||||
--minetest.set_node(p, {name="air"})
|
--minetest.set_node(p, {name="air"})
|
||||||
minetest.remove_node(pos1)
|
minetest.remove_node(pos1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if ((minetest.get_item_group(n, group)==1) and (minetest.get_item_group(n, "unbreakable") ~= 1) and (n ~= "bones:bones") and not (minetest.is_protected(pos1, "")) ) then
|
if ((minetest.get_item_group(n, group)==1)
|
||||||
|
and (minetest.get_item_group(n, "unbreakable") ~= 1)
|
||||||
|
and (n ~= "bones:bones")
|
||||||
|
and not (minetest.is_protected(pos1, "")) ) then
|
||||||
--minetest.set_node(p, {name="air"})
|
--minetest.set_node(p, {name="air"})
|
||||||
minetest.remove_node(pos1)
|
minetest.remove_node(pos1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
pos1.y = pos1.y+1
|
|
||||||
|
pos1.y = pos1.y + 1
|
||||||
end
|
end
|
||||||
posp.y=s.y
|
posp.y = s.y
|
||||||
posp=vector.add(posp,per)
|
posp = vector.add(posp,per)
|
||||||
--minetest.chat_send_all("pos3:"..minetest.pos_to_string(posp).." per.y= "..per.y)
|
--minetest.chat_send_all("pos3:"..minetest.pos_to_string(posp).." per.y= "..per.y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -395,7 +248,6 @@ function putting_ability( --puts under the mob the block defined as 'p_block'
|
|||||||
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
|
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
local dx = 0
|
local dx = 0
|
||||||
local dz = 0
|
local dz = 0
|
||||||
|
|
||||||
@ -415,23 +267,44 @@ function putting_ability( --puts under the mob the block defined as 'p_block'
|
|||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local pos1
|
local pos1
|
||||||
pos.y=pos.y-1
|
|
||||||
pos1 = {x = pos.x+dx, y = pos.y, z = pos.z+dz}
|
pos.y=pos.y - 1
|
||||||
|
|
||||||
|
pos1 = {x = pos.x + dx, y = pos.y, z = pos.z + dz}
|
||||||
|
|
||||||
local n = minetest.get_node(pos).name
|
local n = minetest.get_node(pos).name
|
||||||
local n1 = minetest.get_node(pos1).name
|
local n1 = minetest.get_node(pos1).name
|
||||||
local oldmetainf = {minetest.get_meta(pos):to_table(),minetest.get_meta(pos1):to_table() }
|
local oldmetainf = {
|
||||||
if n~=p_block and not minetest.is_protected(pos, "") and (n == "bones:bones" and nssm:affectbones(self) ) and n~="air" then
|
minetest.get_meta(pos):to_table(),
|
||||||
|
minetest.get_meta(pos1):to_table()
|
||||||
|
}
|
||||||
|
|
||||||
|
if n ~= p_block and not minetest.is_protected(pos, "")
|
||||||
|
and (n == "bones:bones"
|
||||||
|
and nssm:affectbones(self) )
|
||||||
|
and n ~= "air" then
|
||||||
|
|
||||||
minetest.set_node(pos, {name=p_block})
|
minetest.set_node(pos, {name=p_block})
|
||||||
|
|
||||||
if nssm.cryosave then
|
if nssm.cryosave then
|
||||||
|
|
||||||
local metai = minetest.get_meta(pos)
|
local metai = minetest.get_meta(pos)
|
||||||
|
|
||||||
metai:from_table(oldmetainf[1]) -- this is enough to save the meta
|
metai:from_table(oldmetainf[1]) -- this is enough to save the meta
|
||||||
metai:set_string("nssm",n)
|
metai:set_string("nssm", n)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if n1~=p_block and not minetest.is_protected(pos1, "") and (n == "bones:bones" and nssm:affectbones(self) ) and n~="air" then
|
|
||||||
minetest.set_node(pos1, {name=p_block})
|
if n1 ~= p_block and not minetest.is_protected(pos1, "")
|
||||||
|
and (n == "bones:bones" and nssm:affectbones(self) )
|
||||||
|
and n ~= "air" then
|
||||||
|
|
||||||
|
minetest.set_node(pos1, {name = p_block})
|
||||||
|
|
||||||
if nssm.cryosave then
|
if nssm.cryosave then
|
||||||
|
|
||||||
local metai = minetest.get_meta(pos1)
|
local metai = minetest.get_meta(pos1)
|
||||||
|
|
||||||
metai:from_table(oldmetainf[2]) -- this is enough to save the meta
|
metai:from_table(oldmetainf[2]) -- this is enough to save the meta
|
||||||
metai:set_string("nssm",n1)
|
metai:set_string("nssm",n1)
|
||||||
end
|
end
|
||||||
@ -445,22 +318,29 @@ function webber_ability( --puts randomly around the block defined as w_block
|
|||||||
radius --max distance the block can be put
|
radius --max distance the block can be put
|
||||||
)
|
)
|
||||||
|
|
||||||
if (nssm:virulence(self)~=0) and (math.random(1,nssm:virulence(self)) ~= 1) then return end
|
if (nssm:virulence(self) ~= 0)
|
||||||
|
and (math.random(1, nssm:virulence(self)) ~= 1) then return end
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if (math.random(1,55)==1) then
|
|
||||||
local dx=math.random(1,radius)
|
if (math.random(1, 55) == 1) then
|
||||||
local dz=math.random(1,radius)
|
|
||||||
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
|
local dx = math.random(1, radius)
|
||||||
local t = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
local dz = math.random(1, radius)
|
||||||
|
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.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
local k = minetest.get_node(t).name
|
local k = minetest.get_node(t).name
|
||||||
if ((n~="air")and(k=="air")) and not minetest.is_protected(t, "") then
|
|
||||||
minetest.set_node(t, {name=w_block})
|
if ((n ~= "air")
|
||||||
|
and(k == "air"))
|
||||||
|
and not minetest.is_protected(t, "") then
|
||||||
|
minetest.set_node(t, {name = w_block})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function midas_ability( --ability to transform every blocks it touches in the m_block block
|
function midas_ability( --ability to transform every blocks it touches in the m_block block
|
||||||
self, --the entity of the mob
|
self, --the entity of the mob
|
||||||
m_block,
|
m_block,
|
||||||
@ -479,9 +359,8 @@ function midas_ability( --ability to transform every blocks it touches in the m
|
|||||||
|
|
||||||
local max = 0
|
local max = 0
|
||||||
local yaw = (self.object:get_yaw() + self.rotate) or 0
|
local yaw = (self.object:get_yaw() + self.rotate) or 0
|
||||||
local x = math.sin(yaw)*-1
|
local x = math.sin(yaw) * -1
|
||||||
local z = math.cos(yaw)
|
local z = math.cos(yaw)
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
local i1 = -1
|
local i1 = -1
|
||||||
local k = 1
|
local k = 1
|
||||||
@ -489,22 +368,23 @@ function midas_ability( --ability to transform every blocks it touches in the m
|
|||||||
|
|
||||||
local multiplier = mult
|
local multiplier = mult
|
||||||
|
|
||||||
if x>0 then
|
if x > 0 then
|
||||||
i = round(x*max_vel)*multiplier
|
i = round(x * max_vel) * multiplier
|
||||||
else
|
else
|
||||||
i1 = round(x*max_vel)*multiplier
|
i1 = round(x * max_vel) * multiplier
|
||||||
end
|
end
|
||||||
|
|
||||||
if z>0 then
|
if z > 0 then
|
||||||
k = round(z*max_vel)*multiplier
|
k = round(z * max_vel) * multiplier
|
||||||
else
|
else
|
||||||
k1 = round(z*max_vel)*multiplier
|
k1 = round(z * max_vel) * multiplier
|
||||||
end
|
end
|
||||||
|
|
||||||
for dx = i1, i do
|
for dx = i1, i do
|
||||||
for dy = -1, height do
|
for dy = -1, height do
|
||||||
for dz = k1, k do
|
for dz = k1, k do
|
||||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
|
||||||
|
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||||
local n = minetest.get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
|
|
||||||
if minetest.get_item_group(n, "unbreakable") == 1
|
if minetest.get_item_group(n, "unbreakable") == 1
|
||||||
@ -512,7 +392,7 @@ function midas_ability( --ability to transform every blocks it touches in the m
|
|||||||
or (n == "bones:bones" and not nssm:affectbones(self))
|
or (n == "bones:bones" and not nssm:affectbones(self))
|
||||||
or n==m_block then
|
or n==m_block then
|
||||||
else
|
else
|
||||||
minetest.set_node(p, {name=m_block})
|
minetest.set_node(p, {name = m_block})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -530,9 +410,10 @@ loss_prob["default:cobble"] = 3
|
|||||||
loss_prob["default:dirt"] = 4
|
loss_prob["default:dirt"] = 4
|
||||||
|
|
||||||
local tnt_radius = tonumber(minetest.setting_get("tnt_radius") or 3)
|
local tnt_radius = tonumber(minetest.setting_get("tnt_radius") or 3)
|
||||||
|
|
||||||
local cid_data = {}
|
local cid_data = {}
|
||||||
|
|
||||||
minetest.after(0, function()
|
minetest.after(0, function()
|
||||||
|
|
||||||
for name, def in pairs(minetest.registered_nodes) do
|
for name, def in pairs(minetest.registered_nodes) do
|
||||||
cid_data[minetest.get_content_id(name)] = {
|
cid_data[minetest.get_content_id(name)] = {
|
||||||
name = name,
|
name = name,
|
||||||
@ -543,24 +424,33 @@ minetest.after(0, function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
local function rand_pos(center, pos, radius)
|
local function rand_pos(center, pos, radius)
|
||||||
|
|
||||||
local def
|
local def
|
||||||
local reg_nodes = minetest.registered_nodes
|
local reg_nodes = minetest.registered_nodes
|
||||||
local i = 0
|
local i = 0
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
-- Give up and use the center if this takes too long
|
-- Give up and use the center if this takes too long
|
||||||
if i > 4 then
|
if i > 4 then
|
||||||
pos.x, pos.z = center.x, center.z
|
pos.x, pos.z = center.x, center.z
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
pos.x = center.x + math.random(-radius, radius)
|
pos.x = center.x + math.random(-radius, radius)
|
||||||
pos.z = center.z + math.random(-radius, radius)
|
pos.z = center.z + math.random(-radius, radius)
|
||||||
|
|
||||||
def = reg_nodes[minetest.get_node(pos).name]
|
def = reg_nodes[minetest.get_node(pos).name]
|
||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
until def and not def.walkable
|
until def and not def.walkable
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function add_effects(pos, radius, drops)
|
local function add_effects(pos, radius, drops)
|
||||||
|
|
||||||
minetest.add_particle({
|
minetest.add_particle({
|
||||||
pos = pos,
|
pos = pos,
|
||||||
velocity = vector.new(),
|
velocity = vector.new(),
|
||||||
@ -571,6 +461,7 @@ local function add_effects(pos, radius, drops)
|
|||||||
vertical = false,
|
vertical = false,
|
||||||
texture = "tnt_boom.png",
|
texture = "tnt_boom.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 64,
|
amount = 64,
|
||||||
time = 0.5,
|
time = 0.5,
|
||||||
@ -591,11 +482,17 @@ local function add_effects(pos, radius, drops)
|
|||||||
-- one of them to use as texture
|
-- one of them to use as texture
|
||||||
local texture = "tnt_blast.png" --fallback texture
|
local texture = "tnt_blast.png" --fallback texture
|
||||||
local most = 0
|
local most = 0
|
||||||
|
|
||||||
for name, stack in pairs(drops) do
|
for name, stack in pairs(drops) do
|
||||||
|
|
||||||
local count = stack:get_count()
|
local count = stack:get_count()
|
||||||
|
|
||||||
if count > most then
|
if count > most then
|
||||||
|
|
||||||
most = count
|
most = count
|
||||||
|
|
||||||
local def = minetest.registered_nodes[name]
|
local def = minetest.registered_nodes[name]
|
||||||
|
|
||||||
if def and def.tiles and def.tiles[1] then
|
if def and def.tiles and def.tiles[1] then
|
||||||
texture = def.tiles[1]
|
texture = def.tiles[1]
|
||||||
end
|
end
|
||||||
@ -620,18 +517,29 @@ local function add_effects(pos, radius, drops)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function eject_drops(drops, pos, radius)
|
local function eject_drops(drops, pos, radius)
|
||||||
|
|
||||||
local drop_pos = vector.new(pos)
|
local drop_pos = vector.new(pos)
|
||||||
|
|
||||||
for _, item in pairs(drops) do
|
for _, item in pairs(drops) do
|
||||||
|
|
||||||
local count = math.min(item:get_count(), item:get_stack_max())
|
local count = math.min(item:get_count(), item:get_stack_max())
|
||||||
|
|
||||||
while count > 0 do
|
while count > 0 do
|
||||||
|
|
||||||
local take = math.max(1,math.min(radius * radius,
|
local take = math.max(1,math.min(radius * radius,
|
||||||
count,
|
count,
|
||||||
item:get_stack_max()))
|
item:get_stack_max()))
|
||||||
|
|
||||||
rand_pos(pos, drop_pos, radius)
|
rand_pos(pos, drop_pos, radius)
|
||||||
|
|
||||||
local dropitem = ItemStack(item)
|
local dropitem = ItemStack(item)
|
||||||
|
|
||||||
dropitem:set_count(take)
|
dropitem:set_count(take)
|
||||||
|
|
||||||
local obj = minetest.add_item(drop_pos, dropitem)
|
local obj = minetest.add_item(drop_pos, dropitem)
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
obj:get_luaentity().collect = true
|
obj:get_luaentity().collect = true
|
||||||
obj:set_acceleration({x = 0, y = -10, z = 0})
|
obj:set_acceleration({x = 0, y = -10, z = 0})
|
||||||
@ -639,23 +547,28 @@ local function eject_drops(drops, pos, radius)
|
|||||||
y = math.random(0, 10),
|
y = math.random(0, 10),
|
||||||
z = math.random(-3, 3)})
|
z = math.random(-3, 3)})
|
||||||
end
|
end
|
||||||
|
|
||||||
count = count - take
|
count = count - take
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function calc_velocity(pos1, pos2, old_vel, power)
|
local function calc_velocity(pos1, pos2, old_vel, power)
|
||||||
|
|
||||||
-- Avoid errors caused by a vector of zero length
|
-- Avoid errors caused by a vector of zero length
|
||||||
if vector.equals(pos1, pos2) then
|
if vector.equals(pos1, pos2) then
|
||||||
return old_vel
|
return old_vel
|
||||||
end
|
end
|
||||||
|
|
||||||
local vel = vector.direction(pos1, pos2)
|
local vel = vector.direction(pos1, pos2)
|
||||||
|
|
||||||
vel = vector.normalize(vel)
|
vel = vector.normalize(vel)
|
||||||
vel = vector.multiply(vel, power)
|
vel = vector.multiply(vel, power)
|
||||||
|
|
||||||
-- Divide by distance
|
-- Divide by distance
|
||||||
local dist = vector.distance(pos1, pos2)
|
local dist = vector.distance(pos1, pos2)
|
||||||
|
|
||||||
dist = math.max(dist, 1)
|
dist = math.max(dist, 1)
|
||||||
vel = vector.divide(vel, dist)
|
vel = vector.divide(vel, dist)
|
||||||
|
|
||||||
@ -671,19 +584,25 @@ local function calc_velocity(pos1, pos2, old_vel, power)
|
|||||||
|
|
||||||
-- Limit to terminal velocity
|
-- Limit to terminal velocity
|
||||||
dist = vector.length(vel)
|
dist = vector.length(vel)
|
||||||
|
|
||||||
if dist > 250 then
|
if dist > 250 then
|
||||||
vel = vector.divide(vel, dist / 250)
|
vel = vector.divide(vel, dist / 250)
|
||||||
end
|
end
|
||||||
|
|
||||||
return vel
|
return vel
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function entity_physics(pos, radius, drops)
|
local function entity_physics(pos, radius, drops)
|
||||||
|
|
||||||
local objs = minetest.get_objects_inside_radius(pos, radius)
|
local objs = minetest.get_objects_inside_radius(pos, radius)
|
||||||
|
|
||||||
for _, obj in pairs(objs) do
|
for _, obj in pairs(objs) do
|
||||||
|
|
||||||
local obj_pos = obj:get_pos()
|
local obj_pos = obj:get_pos()
|
||||||
local dist = math.max(1, vector.distance(pos, obj_pos))
|
local dist = math.max(1, vector.distance(pos, obj_pos))
|
||||||
|
|
||||||
local damage = (4 / dist) * radius
|
local damage = (4 / dist) * radius
|
||||||
|
|
||||||
if obj:is_player() then
|
if obj:is_player() then
|
||||||
-- currently the engine has no method to set
|
-- currently the engine has no method to set
|
||||||
-- player velocity. See #2960
|
-- player velocity. See #2960
|
||||||
@ -691,7 +610,9 @@ local function entity_physics(pos, radius, drops)
|
|||||||
local dir = vector.normalize(vector.subtract(obj_pos, pos))
|
local dir = vector.normalize(vector.subtract(obj_pos, pos))
|
||||||
local moveoff = vector.multiply(dir, dist + 1.0)
|
local moveoff = vector.multiply(dir, dist + 1.0)
|
||||||
local newpos = vector.add(pos, moveoff)
|
local newpos = vector.add(pos, moveoff)
|
||||||
|
|
||||||
newpos = vector.add(newpos, {x = 0, y = 0.2, z = 0})
|
newpos = vector.add(newpos, {x = 0, y = 0.2, z = 0})
|
||||||
|
|
||||||
obj:set_pos(newpos)
|
obj:set_pos(newpos)
|
||||||
|
|
||||||
obj:set_hp(obj:get_hp() - damage)
|
obj:set_hp(obj:get_hp() - damage)
|
||||||
@ -704,7 +625,10 @@ local function entity_physics(pos, radius, drops)
|
|||||||
local name = luaobj.name
|
local name = luaobj.name
|
||||||
|
|
||||||
if objdef and objdef.on_blast then
|
if objdef and objdef.on_blast then
|
||||||
if ((name == "nssm:pumpking") or (name == "nssm:morvalar0") or (name== "nssm:morvalar5")) then
|
|
||||||
|
if ((name == "nssm:pumpking")
|
||||||
|
or (name == "nssm:morvalar0")
|
||||||
|
or (name== "nssm:morvalar5")) then
|
||||||
do_damage = false
|
do_damage = false
|
||||||
do_knockback = false
|
do_knockback = false
|
||||||
else
|
else
|
||||||
@ -713,18 +637,24 @@ local function entity_physics(pos, radius, drops)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if do_knockback then
|
if do_knockback then
|
||||||
|
|
||||||
local obj_vel = obj:get_velocity()
|
local obj_vel = obj:get_velocity()
|
||||||
|
|
||||||
obj:set_velocity(calc_velocity(pos, obj_pos,
|
obj:set_velocity(calc_velocity(pos, obj_pos,
|
||||||
obj_vel, radius * 10))
|
obj_vel, radius * 10))
|
||||||
end
|
end
|
||||||
|
|
||||||
if do_damage then
|
if do_damage then
|
||||||
|
|
||||||
if not obj:get_armor_groups().immortal then
|
if not obj:get_armor_groups().immortal then
|
||||||
|
|
||||||
obj:punch(obj, 1.0, {
|
obj:punch(obj, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = damage},
|
damage_groups = {fleshy = damage},
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, item in pairs(entity_drops) do
|
for _, item in pairs(entity_drops) do
|
||||||
add_drop(drops, item)
|
add_drop(drops, item)
|
||||||
end
|
end
|
||||||
@ -732,14 +662,19 @@ local function entity_physics(pos, radius, drops)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function add_drop(drops, item)
|
local function add_drop(drops, item)
|
||||||
|
|
||||||
item = ItemStack(item)
|
item = ItemStack(item)
|
||||||
|
|
||||||
local name = item:get_name()
|
local name = item:get_name()
|
||||||
|
|
||||||
if loss_prob[name] ~= nil and math.random(1, loss_prob[name]) == 1 then
|
if loss_prob[name] ~= nil and math.random(1, loss_prob[name]) == 1 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local drop = drops[name]
|
local drop = drops[name]
|
||||||
|
|
||||||
if drop == nil then
|
if drop == nil then
|
||||||
drops[name] = item
|
drops[name] = item
|
||||||
else
|
else
|
||||||
@ -747,7 +682,9 @@ local function add_drop(drops, item)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_protection, ignore_on_blast)
|
local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_protection, ignore_on_blast)
|
||||||
|
|
||||||
if not ignore_protection and minetest.is_protected(npos, "") then
|
if not ignore_protection and minetest.is_protected(npos, "") then
|
||||||
return cid
|
return cid
|
||||||
end
|
end
|
||||||
@ -770,8 +707,11 @@ local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_p
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
||||||
|
|
||||||
pos = vector.round(pos)
|
pos = vector.round(pos)
|
||||||
|
|
||||||
-- scan for adjacent TNT nodes first, and enlarge the explosion
|
-- scan for adjacent TNT nodes first, and enlarge the explosion
|
||||||
local vm1 = VoxelManip()
|
local vm1 = VoxelManip()
|
||||||
local p1 = vector.subtract(pos, 2)
|
local p1 = vector.subtract(pos, 2)
|
||||||
@ -787,13 +727,18 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
|
|
||||||
for z = pos.z - 2, pos.z + 2 do
|
for z = pos.z - 2, pos.z + 2 do
|
||||||
for y = pos.y - 2, pos.y + 2 do
|
for y = pos.y - 2, pos.y + 2 do
|
||||||
|
|
||||||
local vi = a:index(pos.x - 2, y, z)
|
local vi = a:index(pos.x - 2, y, z)
|
||||||
|
|
||||||
for x = pos.x - 2, pos.x + 2 do
|
for x = pos.x - 2, pos.x + 2 do
|
||||||
|
|
||||||
local cid = data[vi]
|
local cid = data[vi]
|
||||||
|
|
||||||
if cid == c_tnt or cid == c_tnt_boom or cid == c_tnt_burning then
|
if cid == c_tnt or cid == c_tnt_boom or cid == c_tnt_burning then
|
||||||
count = count + 1
|
count = count + 1
|
||||||
data[vi] = c_air
|
data[vi] = c_air
|
||||||
end
|
end
|
||||||
|
|
||||||
vi = vi + 1
|
vi = vi + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -808,6 +753,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
-- perform the explosion
|
-- perform the explosion
|
||||||
local vm = VoxelManip()
|
local vm = VoxelManip()
|
||||||
local pr = PseudoRandom(os.time())
|
local pr = PseudoRandom(os.time())
|
||||||
|
|
||||||
p1 = vector.subtract(pos, radius)
|
p1 = vector.subtract(pos, radius)
|
||||||
p2 = vector.add(pos, radius)
|
p2 = vector.add(pos, radius)
|
||||||
minp, maxp = vm:read_from_map(p1, p2)
|
minp, maxp = vm:read_from_map(p1, p2)
|
||||||
@ -816,22 +762,29 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
|
|
||||||
local drops = {}
|
local drops = {}
|
||||||
local on_blast_queue = {}
|
local on_blast_queue = {}
|
||||||
|
|
||||||
local c_fire = minetest.get_content_id("fire:basic_flame")
|
local c_fire = minetest.get_content_id("fire:basic_flame")
|
||||||
|
|
||||||
for z = -radius, radius do
|
for z = -radius, radius do
|
||||||
for y = -radius, radius do
|
for y = -radius, radius do
|
||||||
|
|
||||||
local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z)
|
local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z)
|
||||||
|
|
||||||
for x = -radius, radius do
|
for x = -radius, radius do
|
||||||
|
|
||||||
local r = vector.length(vector.new(x, y, z))
|
local r = vector.length(vector.new(x, y, z))
|
||||||
|
|
||||||
if (radius * radius) / (r * r) >= (pr:next(80, 125) / 100) then
|
if (radius * radius) / (r * r) >= (pr:next(80, 125) / 100) then
|
||||||
|
|
||||||
local cid = data[vi]
|
local cid = data[vi]
|
||||||
local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z}
|
local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z}
|
||||||
|
|
||||||
if cid ~= c_air then
|
if cid ~= c_air then
|
||||||
data[vi] = destroy(drops, p, cid, c_air, c_fire,
|
data[vi] = destroy(drops, p, cid, c_air, c_fire,
|
||||||
on_blast_queue, ignore_protection,
|
on_blast_queue, ignore_protection,
|
||||||
ignore_on_blast)
|
ignore_on_blast)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vi = vi + 1
|
vi = vi + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -846,9 +799,11 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
for y = -radius * 1.5, radius * 1.5 do
|
for y = -radius * 1.5, radius * 1.5 do
|
||||||
for z = -radius * 1.5, radius * 1.5 do
|
for z = -radius * 1.5, radius * 1.5 do
|
||||||
for x = -radius * 1.5, radius * 1.5 do
|
for x = -radius * 1.5, radius * 1.5 do
|
||||||
|
|
||||||
local rad = {x = x, y = y, z = z}
|
local rad = {x = x, y = y, z = z}
|
||||||
local s = vector.add(pos, rad)
|
local s = vector.add(pos, rad)
|
||||||
local r = vector.length(rad)
|
local r = vector.length(rad)
|
||||||
|
|
||||||
if r / radius < 1.4 then
|
if r / radius < 1.4 then
|
||||||
--nodeupdate_single(s)
|
--nodeupdate_single(s)
|
||||||
core.check_single_for_falling(s)
|
core.check_single_for_falling(s)
|
||||||
@ -858,10 +813,13 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for _, queued_data in pairs(on_blast_queue) do
|
for _, queued_data in pairs(on_blast_queue) do
|
||||||
|
|
||||||
local dist = math.max(1, vector.distance(queued_data.pos, pos))
|
local dist = math.max(1, vector.distance(queued_data.pos, pos))
|
||||||
local intensity = (radius * radius) / (dist * dist)
|
local intensity = (radius * radius) / (dist * dist)
|
||||||
local node_drops = queued_data.on_blast(queued_data.pos, intensity)
|
local node_drops = queued_data.on_blast(queued_data.pos, intensity)
|
||||||
|
|
||||||
if node_drops then
|
if node_drops then
|
||||||
|
|
||||||
for _, item in pairs(node_drops) do
|
for _, item in pairs(node_drops) do
|
||||||
add_drop(drops, item)
|
add_drop(drops, item)
|
||||||
end
|
end
|
||||||
@ -871,16 +829,23 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
return drops, radius
|
return drops, radius
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function tnt_boom_nssm(pos, def)
|
function tnt_boom_nssm(pos, def)
|
||||||
|
|
||||||
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
|
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
|
||||||
minetest.set_node(pos, {name = "tnt:boom"})
|
minetest.set_node(pos, {name = "tnt:boom"})
|
||||||
|
|
||||||
local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection,
|
local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection,
|
||||||
def.ignore_on_blast)
|
def.ignore_on_blast)
|
||||||
|
|
||||||
-- append entity drops
|
-- append entity drops
|
||||||
local damage_radius = (radius / def.radius) * def.damage_radius
|
local damage_radius = (radius / def.radius) * def.damage_radius
|
||||||
|
|
||||||
entity_physics(pos, damage_radius, drops)
|
entity_physics(pos, damage_radius, drops)
|
||||||
|
|
||||||
if not def.disable_drops then
|
if not def.disable_drops then
|
||||||
eject_drops(drops, pos, radius)
|
eject_drops(drops, pos, radius)
|
||||||
end
|
end
|
||||||
|
|
||||||
add_effects(pos, radius, drops)
|
add_effects(pos, radius, drops)
|
||||||
end
|
end
|
||||||
|
@ -38,24 +38,28 @@ local materials = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for k, v in pairs(stats) do
|
for k, v in pairs(stats) do
|
||||||
|
|
||||||
minetest.register_tool("nssm:helmet_"..k, {
|
minetest.register_tool("nssm:helmet_"..k, {
|
||||||
description = v.name.." Helmet",
|
description = v.name.." Helmet",
|
||||||
inventory_image ="inv_helmet_"..k..".png",
|
inventory_image ="inv_helmet_"..k..".png",
|
||||||
groups = {armor_head=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
groups = {armor_head=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
wear = 0,
|
wear = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("nssm:chestplate_"..k, {
|
minetest.register_tool("nssm:chestplate_"..k, {
|
||||||
description = v.name.." Chestplate",
|
description = v.name.." Chestplate",
|
||||||
inventory_image ="inv_chestplate_"..k..".png",
|
inventory_image ="inv_chestplate_"..k..".png",
|
||||||
groups = {armor_torso=math.floor(6*v.armor), armor_heal=v.heal, armor_use=v.use},
|
groups = {armor_torso=math.floor(6*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
wear = 0,
|
wear = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("nssm:leggings_"..k, {
|
minetest.register_tool("nssm:leggings_"..k, {
|
||||||
description = v.name.." Leggings",
|
description = v.name.." Leggings",
|
||||||
inventory_image = "inv_leggings_"..k..".png",
|
inventory_image = "inv_leggings_"..k..".png",
|
||||||
groups = {armor_legs=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
groups = {armor_legs=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||||
wear = 0,
|
wear = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("nssm:boots_"..k, {
|
minetest.register_tool("nssm:boots_"..k, {
|
||||||
description = v.name.." Boots",
|
description = v.name.." Boots",
|
||||||
inventory_image ="inv_boots_"..k..".png",
|
inventory_image ="inv_boots_"..k..".png",
|
||||||
@ -65,6 +69,7 @@ for k, v in pairs(stats) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
for k, v in pairs(materials) do
|
for k, v in pairs(materials) do
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:helmet_"..k,
|
output = "nssm:helmet_"..k,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -73,6 +78,7 @@ for k, v in pairs(materials) do
|
|||||||
{"", "", ""},
|
{"", "", ""},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:chestplate_"..k,
|
output = "nssm:chestplate_"..k,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -81,6 +87,7 @@ for k, v in pairs(materials) do
|
|||||||
{v, v, v},
|
{v, v, v},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:leggings_"..k,
|
output = "nssm:leggings_"..k,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -89,6 +96,7 @@ for k, v in pairs(materials) do
|
|||||||
{v, "", v},
|
{v, "", v},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:boots_"..k,
|
output = "nssm:boots_"..k,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -118,6 +126,7 @@ if minetest.get_modpath("shields") then
|
|||||||
}
|
}
|
||||||
|
|
||||||
for k, v in pairs(stats) do
|
for k, v in pairs(stats) do
|
||||||
|
|
||||||
minetest.register_tool("nssm:shield_"..k, {
|
minetest.register_tool("nssm:shield_"..k, {
|
||||||
description = v.name.." Shield",
|
description = v.name.." Shield",
|
||||||
inventory_image ="inv_shield_"..k..".png",
|
inventory_image ="inv_shield_"..k..".png",
|
||||||
@ -126,6 +135,7 @@ if minetest.get_modpath("shields") then
|
|||||||
})
|
})
|
||||||
|
|
||||||
local m = materials[k]
|
local m = materials[k]
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:shield_"..k,
|
output = "nssm:shield_"..k,
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -146,6 +156,7 @@ local stats = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for k, v in pairs(stats) do
|
for k, v in pairs(stats) do
|
||||||
|
|
||||||
minetest.register_tool("nssm:helmet_"..k, {
|
minetest.register_tool("nssm:helmet_"..k, {
|
||||||
description = v.name.." ",
|
description = v.name.." ",
|
||||||
inventory_image ="inv_helmet_"..k..".png",
|
inventory_image ="inv_helmet_"..k..".png",
|
||||||
@ -169,6 +180,7 @@ minetest.register_craft({
|
|||||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:helmet_masticone",
|
output = "nssm:helmet_masticone",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -177,6 +189,7 @@ minetest.register_craft({
|
|||||||
{"nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments"},
|
{"nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments"},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "nssm:helmet_masticone_crowned",
|
output = "nssm:helmet_masticone_crowned",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
--non eatable craftitems
|
--non eatable craftitems
|
||||||
|
|
||||||
|
|
||||||
local function nssm_craftitem (name, descr)
|
local function nssm_craftitem (name, descr)
|
||||||
|
|
||||||
minetest.register_craftitem("nssm:"..name, {
|
minetest.register_craftitem("nssm:"..name, {
|
||||||
@ -141,7 +140,7 @@ minetest.register_ore({
|
|||||||
y_max = -95,
|
y_max = -95,
|
||||||
})
|
})
|
||||||
|
|
||||||
for i=1,9 do
|
for i = 1, 9 do
|
||||||
|
|
||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "scatter",
|
ore_type = "scatter",
|
||||||
@ -380,21 +379,19 @@ minetest.register_node("nssm:pumpbomb", {
|
|||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"nssm:mese_meteor"},
|
nodenames = {"nssm:mese_meteor"},
|
||||||
neighbors = {"air"},
|
neighbors = {"air"},
|
||||||
interval = 1,
|
interval = 2, -- 1
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--local under = {x=pos.x, y=pos.y-1, z=pos.z}
|
|
||||||
--local n = minetest.get_node(under).name
|
|
||||||
--if n~= "air" then
|
|
||||||
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
|
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
|
||||||
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
|
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
|
||||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name = "fire:basic_flame"})
|
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name = "fire:basic_flame"})
|
||||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name = "fire:basic_flame"})
|
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name = "fire:basic_flame"})
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "fire:basic_flame"})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "fire:basic_flame"})
|
||||||
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -491,7 +488,9 @@ minetest.register_tool('nssm:sun_sword', {
|
|||||||
damage_groups = {fleshy=10},
|
damage_groups = {fleshy=10},
|
||||||
},
|
},
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||||
|
|
||||||
if puncher:get_wielded_item():get_name() == 'nssm:sun_sword' then
|
if puncher:get_wielded_item():get_name() == 'nssm:sun_sword' then
|
||||||
|
|
||||||
if node.name ~= "air" and not minetest.is_protected(pos, "") then
|
if node.name ~= "air" and not minetest.is_protected(pos, "") then
|
||||||
minetest.add_node(pointed_thing.above, {name = "fire:basic_flame"})
|
minetest.add_node(pointed_thing.above, {name = "fire:basic_flame"})
|
||||||
end
|
end
|
||||||
@ -800,12 +799,17 @@ minetest.register_tool("nssm:axe_of_pride", {
|
|||||||
damage_groups = {fleshy=16},
|
damage_groups = {fleshy=16},
|
||||||
},
|
},
|
||||||
on_drop = function(itemstack, dropper, pos)
|
on_drop = function(itemstack, dropper, pos)
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||||
local flag = 0
|
local flag = 0
|
||||||
local part = 0
|
local part = 0
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
|
|
||||||
part = 0
|
part = 0
|
||||||
|
|
||||||
if flag == 0 then
|
if flag == 0 then
|
||||||
|
|
||||||
local pname = dropper:get_player_name()
|
local pname = dropper:get_player_name()
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
|
|
||||||
@ -813,32 +817,45 @@ minetest.register_tool("nssm:axe_of_pride", {
|
|||||||
--minetest.chat_send_all("Inventory empty")
|
--minetest.chat_send_all("Inventory empty")
|
||||||
else
|
else
|
||||||
local found = 0
|
local found = 0
|
||||||
|
|
||||||
for i = 1,32 do
|
for i = 1,32 do
|
||||||
|
|
||||||
local items = player_inv:get_stack('main', i)
|
local items = player_inv:get_stack('main', i)
|
||||||
local n = items:get_name()
|
local n = items:get_name()
|
||||||
|
|
||||||
if n == "nssm:energy_globe" then
|
if n == "nssm:energy_globe" then
|
||||||
found = i
|
found = i
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if found == 0 then
|
if found == 0 then
|
||||||
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
|
||||||
|
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
||||||
|
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if (obj:is_player()) then
|
if (obj:is_player()) then
|
||||||
|
|
||||||
--minetest.chat_send_all("Giocatore")
|
--minetest.chat_send_all("Giocatore")
|
||||||
if (obj:get_player_name()~=dropper:get_player_name()) then
|
if (obj:get_player_name()~=dropper:get_player_name()) then
|
||||||
obj:set_hp(obj:get_hp()-10)
|
|
||||||
dropper:set_hp(dropper:get_hp()+10)
|
obj:set_hp(obj:get_hp() - 10)
|
||||||
|
|
||||||
|
dropper:set_hp(dropper:get_hp() + 10)
|
||||||
--flag = 1
|
--flag = 1
|
||||||
|
|
||||||
local items = player_inv:get_stack('main', found)
|
local items = player_inv:get_stack('main', found)
|
||||||
|
|
||||||
items:take_item()
|
items:take_item()
|
||||||
|
|
||||||
player_inv:set_stack('main', found, items)
|
player_inv:set_stack('main', found, items)
|
||||||
|
|
||||||
part = 1
|
part = 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (obj:get_luaentity().health) then
|
if (obj:get_luaentity().health) then
|
||||||
|
|
||||||
--minetest.chat_send_all("Entity")
|
--minetest.chat_send_all("Entity")
|
||||||
obj:get_luaentity().health = obj:get_luaentity().health -10
|
obj:get_luaentity().health = obj:get_luaentity().health -10
|
||||||
-- check_for_death(obj:get_luaentity())
|
-- check_for_death(obj:get_luaentity())
|
||||||
@ -847,12 +864,17 @@ minetest.register_tool("nssm:axe_of_pride", {
|
|||||||
--flag = 1
|
--flag = 1
|
||||||
|
|
||||||
local items = player_inv:get_stack('main', found)
|
local items = player_inv:get_stack('main', found)
|
||||||
|
|
||||||
items:take_item()
|
items:take_item()
|
||||||
|
|
||||||
player_inv:set_stack('main', found, items)
|
player_inv:set_stack('main', found, items)
|
||||||
|
|
||||||
part = 1
|
part = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if part == 1 then
|
if part == 1 then
|
||||||
|
|
||||||
local s = dropper:get_pos()
|
local s = dropper:get_pos()
|
||||||
local p = obj:get_pos()
|
local p = obj:get_pos()
|
||||||
local m = 2
|
local m = 2
|
||||||
@ -895,34 +917,41 @@ minetest.register_tool("nssm:gratuitousness_battleaxe", {
|
|||||||
damage_groups = {fleshy=18},
|
damage_groups = {fleshy=18},
|
||||||
},
|
},
|
||||||
on_drop = function(itemstack, dropper, pos)
|
on_drop = function(itemstack, dropper, pos)
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||||
local flag = 0
|
local flag = 0
|
||||||
local vec = dropper:get_look_dir()
|
local vec = dropper:get_look_dir()
|
||||||
local pos = dropper:get_pos()
|
local pos = dropper:get_pos()
|
||||||
--vec.y = 0
|
--vec.y = 0
|
||||||
|
|
||||||
for i=1,10 do
|
for i = 1, 10 do
|
||||||
pos = vector.add(pos, vec)
|
pos = vector.add(pos, vec)
|
||||||
end
|
end
|
||||||
|
|
||||||
local pname = dropper:get_player_name()
|
local pname = dropper:get_player_name()
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
local found = 0
|
local found = 0
|
||||||
for i = 1,32 do
|
|
||||||
|
for i = 1, 32 do
|
||||||
local items = player_inv:get_stack('main', i)
|
local items = player_inv:get_stack('main', i)
|
||||||
local n = items:get_name()
|
local n = items:get_name()
|
||||||
|
|
||||||
if n == "nssm:energy_globe" then
|
if n == "nssm:energy_globe" then
|
||||||
found = i
|
found = i
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if found == 0 then
|
if found == 0 then
|
||||||
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local items = player_inv:get_stack('main', found)
|
local items = player_inv:get_stack('main', found)
|
||||||
|
|
||||||
items:take_item()
|
items:take_item()
|
||||||
|
|
||||||
player_inv:set_stack('main', found, items)
|
player_inv:set_stack('main', found, items)
|
||||||
|
|
||||||
tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
|
tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@ -942,11 +971,16 @@ minetest.register_tool("nssm:sword_of_eagerness", {
|
|||||||
damage_groups = {fleshy=14},
|
damage_groups = {fleshy=14},
|
||||||
},
|
},
|
||||||
on_drop = function(itemstack, dropper, pos)
|
on_drop = function(itemstack, dropper, pos)
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
local objects = minetest.get_objects_inside_radius(pos, 10)
|
||||||
local flag = 0
|
local flag = 0
|
||||||
|
|
||||||
for _,obj in ipairs(objects) do
|
for _,obj in ipairs(objects) do
|
||||||
|
|
||||||
local part = 0
|
local part = 0
|
||||||
|
|
||||||
if flag == 0 then
|
if flag == 0 then
|
||||||
|
|
||||||
local pname = dropper:get_player_name()
|
local pname = dropper:get_player_name()
|
||||||
local player_inv = minetest.get_inventory({type='player', name = pname})
|
local player_inv = minetest.get_inventory({type='player', name = pname})
|
||||||
|
|
||||||
@ -954,23 +988,32 @@ minetest.register_tool("nssm:sword_of_eagerness", {
|
|||||||
--minetest.chat_send_all("Inventory empty")
|
--minetest.chat_send_all("Inventory empty")
|
||||||
else
|
else
|
||||||
local found = 0
|
local found = 0
|
||||||
|
|
||||||
for i = 1,32 do
|
for i = 1,32 do
|
||||||
|
|
||||||
local items = player_inv:get_stack('main', i)
|
local items = player_inv:get_stack('main', i)
|
||||||
local n = items:get_name()
|
local n = items:get_name()
|
||||||
|
|
||||||
if n == "nssm:energy_globe" then
|
if n == "nssm:energy_globe" then
|
||||||
found = i
|
found = i
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if found == 0 then
|
if found == 0 then
|
||||||
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local pos = obj:get_pos()
|
local pos = obj:get_pos()
|
||||||
|
|
||||||
pos.y = pos.y + 15
|
pos.y = pos.y + 15
|
||||||
|
|
||||||
if (obj:is_player()) then
|
if (obj:is_player()) then
|
||||||
|
|
||||||
if (obj:get_player_name()~=dropper:get_player_name()) then
|
if (obj:get_player_name()~=dropper:get_player_name()) then
|
||||||
|
|
||||||
part=1
|
part=1
|
||||||
|
|
||||||
obj:set_pos(pos)
|
obj:set_pos(pos)
|
||||||
--flag = 1
|
--flag = 1
|
||||||
|
|
||||||
@ -986,13 +1029,19 @@ minetest.register_tool("nssm:sword_of_eagerness", {
|
|||||||
--flag = 1
|
--flag = 1
|
||||||
|
|
||||||
local items = player_inv:get_stack('main', found)
|
local items = player_inv:get_stack('main', found)
|
||||||
|
|
||||||
items:take_item()
|
items:take_item()
|
||||||
|
|
||||||
player_inv:set_stack('main', found, items)
|
player_inv:set_stack('main', found, items)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if part==1 then
|
if part==1 then
|
||||||
|
|
||||||
local s = pos
|
local s = pos
|
||||||
|
|
||||||
s.y = s.y - 15
|
s.y = s.y - 15
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
25, --amount
|
25, --amount
|
||||||
0.3, --time
|
0.3, --time
|
||||||
|
330
spawn.lua
330
spawn.lua
@ -4,127 +4,311 @@
|
|||||||
local mymapgenis = nssm.mymapgenis
|
local mymapgenis = nssm.mymapgenis
|
||||||
local mm = nssm.multimobs
|
local mm = nssm.multimobs
|
||||||
|
|
||||||
if (mymapgenis~=6) and (mymapgenis~=7) then
|
if (mymapgenis ~= 6) and (mymapgenis ~= 7) then
|
||||||
mymapgenis = 7
|
mymapgenis = 7
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Spawning parameters
|
-- Spawning parameters
|
||||||
|
|
||||||
if mm ~= 0 then
|
if mm ~= 0 then
|
||||||
|
|
||||||
if mymapgenis == 6 then
|
if mymapgenis == 6 then
|
||||||
|
|
||||||
-- ANTS
|
-- ANTS
|
||||||
mobs:spawn_specific("nssm:ant_queen", {"nssm:ant_dirt"}, {"air"}, 0, 20, 60, 200000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:ant_soldier", {"nssm:ant_dirt"}, {"air"}, 0, 20, 7, 30000/mm, 4, -31000, 31000)
|
mobs:spawn_specific("nssm:ant_queen",
|
||||||
mobs:spawn_specific("nssm:ant_worker", {"nssm:ant_dirt"}, {"air"}, 0, 20, 5, 10000/mm, 5, -31000, 31000)
|
{"nssm:ant_dirt"}, {"air"}, 0, 20, 60, 200000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:ant_soldier",
|
||||||
|
{"nssm:ant_dirt"}, {"air"}, 0, 20, 7, 30000/mm, 4, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:ant_worker",
|
||||||
|
{"nssm:ant_dirt"}, {"air"}, 0, 20, 5, 10000/mm, 5, -31000, 31000)
|
||||||
|
|
||||||
-- SPIDERS
|
-- SPIDERS
|
||||||
mobs:spawn_specific("nssm:black_widow", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 20, 1200000/mm, 2, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:daddy_long_legs", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 10, 1200000/mm, 2, -31000, 31000)
|
mobs:spawn_specific("nssm:black_widow",
|
||||||
mobs:spawn_specific("nssm:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 5000000/mm, 1, -31000, 31000)
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 20, 1200000/mm, 1, -31000, 31000)
|
{"air"}, 0, 20, 20, 1200000/mm, 2, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:daddy_long_legs",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 20, 10, 1200000/mm, 2, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:tarantula",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 14, 120, 5000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:uloboros",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 20, 20, 1200000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- DUCKS
|
-- DUCKS
|
||||||
mobs:spawn_specific("nssm:duck", {"default:dirt_with_grass"}, {"group:flora"}, 10, 20, 20, 350000/mm, 1, -31000, 20)
|
|
||||||
mobs:spawn_specific("nssm:duckking", {"default:dirt_with_grass"}, {"group:flora"}, 10, 20, 300, 5000000/mm, 1, -31000, 20)
|
mobs:spawn_specific("nssm:duck", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:enderduck", {"default:dirt_with_grass"}, {"group:flora"}, 0, 10, 45, 900000/mm, 1, -31000, 20)
|
{"group:flora"}, 10, 20, 20, 350000/mm, 1, -31000, 20)
|
||||||
mobs:spawn_specific("nssm:flying_duck", {"air"}, {"group:leaves"}, 10, 20, 120, 24000000/mm, 1, 1, 25)
|
|
||||||
mobs:spawn_specific("nssm:flying_duck", {"air"}, {"group:flora"}, 10, 20, 120, 6000000/mm, 1, 1, 25)
|
mobs:spawn_specific("nssm:duckking", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:spiderduck", {"default:dirt_with_grass"}, {"group:flora"}, 0, 10, 45, 850000/mm, 1, -31000, 20)
|
{"group:flora"}, 10, 20, 300, 5000000/mm, 1, -31000, 20)
|
||||||
mobs:spawn_specific("nssm:swimming_duck", {"default:water_source"}, {"default:water_source"}, 0, 20, 60, 45000000/mm, 1, -31000, 20)
|
|
||||||
|
mobs:spawn_specific("nssm:enderduck", {"default:dirt_with_grass"},
|
||||||
|
{"group:flora"}, 0, 10, 45, 900000/mm, 1, -31000, 20)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:flying_duck", {"air"},
|
||||||
|
{"group:leaves"}, 10, 20, 120, 24000000/mm, 1, 1, 25)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:flying_duck", {"air"},
|
||||||
|
{"group:flora"}, 10, 20, 120, 6000000/mm, 1, 1, 25)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:spiderduck", {"default:dirt_with_grass"},
|
||||||
|
{"group:flora"}, 0, 10, 45, 850000/mm, 1, -31000, 20)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:swimming_duck", {"default:water_source"},
|
||||||
|
{"default:water_source"}, 0, 20, 60, 45000000/mm, 1, -31000, 20)
|
||||||
|
|
||||||
-- MOUNTAINS
|
-- MOUNTAINS
|
||||||
mobs:spawn_specific("nssm:echidna", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 20, 200, 100000000/mm, 1, 22, 31000)
|
|
||||||
mobs:spawn_specific("nssm:manticore", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 10, 20, 60, 12000000/mm, 1, 20, 31000)
|
mobs:spawn_specific("nssm:echidna", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 12000000/mm, 1, 20, 31000)
|
{"default:dirt_with_grass"}, 0, 20, 200, 100000000/mm, 1, 22, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:manticore", {"default:dirt_with_grass"},
|
||||||
|
{"default:dirt_with_grass"}, 10, 20, 60, 12000000/mm, 1, 20, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:werewolf", {"default:dirt_with_grass"},
|
||||||
|
{"default:dirt_with_grass"}, 0, 10, 60, 12000000/mm, 1, 20, 31000)
|
||||||
|
|
||||||
-- ICE
|
-- ICE
|
||||||
mobs:spawn_specific("nssm:icelamander", {"default:snowblock", "default:ice"}, {"default:snowblock", "default:ice"}, 0, 20, 120, 25000000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:icesnake", {"default:snowblock", "default:ice", "default:dirt_with_snow"}, {"default:snowblock", "default:ice", "default:dirt_with_snow"}, 0, 20, 30, 6000000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:icelamander",
|
||||||
mobs:spawn_specific("nssm:white_werewolf", {"default:dirt_with_snow","default:snowblock"}, {"air"}, 0, 20, 60, 9000000/mm, 1, 20, 31000)
|
{"default:snowblock", "default:ice"}, {"default:snowblock", "default:ice"},
|
||||||
mobs:spawn_specific("nssm:snow_biter", {"default:snowblock", "default:ice", "default:dirt_with_snow"}, {"default:snowblock", "default:ice", "default:dirt_with_snow"}, 0, 20, 30, 6000000/mm, 1, -31000, 31000)
|
0, 20, 120, 25000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:icesnake",
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
0, 20, 30, 6000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:white_werewolf",
|
||||||
|
{"default:dirt_with_snow","default:snowblock"},
|
||||||
|
{"air"}, 0, 20, 60, 9000000/mm, 1, 20, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:snow_biter",
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
0, 20, 30, 6000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- FOREST
|
-- FOREST
|
||||||
mobs:spawn_specific("nssm:larva", {"default:dirt_with_grass"}, {"default:tree","default:aspen_tree"}, 0, 20, 40, 200000/mm, 1, -31000, 140)
|
|
||||||
mobs:spawn_specific("nssm:masticone", {"default:dirt_with_grass"}, {"default:tree","default:aspen_tree"}, 0, 20, 120, 5000000/mm, 2, -31000, 140)
|
mobs:spawn_specific("nssm:larva", {"default:dirt_with_grass"},
|
||||||
|
{"default:tree","default:aspen_tree"}, 0, 20, 40, 200000/mm, 1, -31000, 140)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:masticone", {"default:dirt_with_grass"},
|
||||||
|
{"default:tree","default:aspen_tree"}, 0, 20, 120, 5000000/mm, 2, -31000, 140)
|
||||||
|
|
||||||
-- PINE FOREST
|
-- PINE FOREST
|
||||||
mobs:spawn_specific("nssm:pumpboom_small", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 30, 600000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:pumpboom_medium", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 30, 800000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:pumpboom_small",
|
||||||
mobs:spawn_specific("nssm:pumpboom_large", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 30, 1000000/mm, 1, -31000, 31000)
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
mobs:spawn_specific("nssm:pumpking", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_needles", "default:pine_tree"}, 0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 30, 600000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpboom_medium",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 30, 800000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpboom_large",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 30, 1000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpking",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_needles", "default:pine_tree"},
|
||||||
|
0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
-- SPIDERS
|
-- SPIDERS
|
||||||
mobs:spawn_specific("nssm:black_widow", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 30, 4400000/mm, 2, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:daddy_long_legs", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 30, 10, 4400000/mm, 2, -31000, 31000)
|
mobs:spawn_specific("nssm:black_widow",
|
||||||
mobs:spawn_specific("nssm:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 50000000/mm, 1, -31000, 31000)
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 30, 4400000/mm, 1, -31000, 31000)
|
{"air"}, 0, 20, 30, 4400000/mm, 2, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:daddy_long_legs",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 30, 10, 4400000/mm, 2, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:tarantula",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 14, 120, 50000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:uloboros",
|
||||||
|
{"default:dirt_with_rainforest_litter", "default:jungletree", "nssm:web" },
|
||||||
|
{"air"}, 0, 20, 30, 4400000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- DUCKS
|
-- DUCKS
|
||||||
mobs:spawn_specific("nssm:duck", {"default:dirt_with_grass"}, {"group:flora"}, 10, 20, 50, 1500000/mm, 1, -31000, 40)
|
|
||||||
mobs:spawn_specific("nssm:duckking", {"default:dirt_with_grass"}, {"group:flora"}, 10, 20, 400, 120000000/mm, 1, -31000, 40)
|
mobs:spawn_specific("nssm:duck", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:enderduck", {"default:dirt_with_grass"}, {"group:flora"}, 0, 10, 120, 5000000/mm, 1, -31000, 40)
|
{"group:flora"}, 10, 20, 50, 1500000/mm, 1, -31000, 40)
|
||||||
mobs:spawn_specific("nssm:flying_duck", {"air"}, {"group:leaves"}, 10, 20, 120, 8000000/mm, 1, 1, 40)
|
|
||||||
mobs:spawn_specific("nssm:flying_duck", {"air"}, {"group:flora"}, 10, 20, 120, 25000000/mm, 1, 1, 40)
|
mobs:spawn_specific("nssm:duckking", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:spiderduck", {"default:dirt_with_grass"}, {"group:flora"}, 0, 10, 120, 5000000/mm, 1, -31000, 45)
|
{"group:flora"}, 10, 20, 400, 120000000/mm, 1, -31000, 40)
|
||||||
mobs:spawn_specific("nssm:swimming_duck", {"default:water_source"}, {"default:water_source"}, 0, 20, 60, 45000000/mm, 1, -31000, 40)
|
|
||||||
mobs:spawn_specific("nssm:swimming_duck", {"default:river_water_source"}, {"default:sand","default:river_water_source"}, 0, 20, 60, 3000000/mm, 1, -31000, 300)
|
mobs:spawn_specific("nssm:enderduck", {"default:dirt_with_grass"},
|
||||||
|
{"group:flora"}, 0, 10, 120, 5000000/mm, 1, -31000, 40)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:flying_duck", {"air"},
|
||||||
|
{"group:leaves"}, 10, 20, 120, 8000000/mm, 1, 1, 40)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:flying_duck", {"air"},
|
||||||
|
{"group:flora"}, 10, 20, 120, 25000000/mm, 1, 1, 40)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:spiderduck", {"default:dirt_with_grass"},
|
||||||
|
{"group:flora"}, 0, 10, 120, 5000000/mm, 1, -31000, 45)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:swimming_duck", {"default:water_source"},
|
||||||
|
{"default:water_source"}, 0, 20, 60, 45000000/mm, 1, -31000, 40)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:swimming_duck", {"default:river_water_source"},
|
||||||
|
{"default:sand","default:river_water_source"},
|
||||||
|
0, 20, 60, 3000000/mm, 1, -31000, 300)
|
||||||
|
|
||||||
-- MOUNTAINS
|
-- MOUNTAINS
|
||||||
mobs:spawn_specific("nssm:echidna", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 20, 200, 100000000/mm, 1, 50, 31000)
|
|
||||||
mobs:spawn_specific("nssm:manticore", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 10, 20, 60, 13000000/mm, 1, 40, 31000)
|
mobs:spawn_specific("nssm:echidna", {"default:dirt_with_grass"},
|
||||||
mobs:spawn_specific("nssm:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 13000000/mm, 1, 40, 31000)
|
{"default:dirt_with_grass"}, 0, 20, 200, 100000000/mm, 1, 50, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:manticore", {"default:dirt_with_grass"},
|
||||||
|
{"default:dirt_with_grass"}, 10, 20, 60, 13000000/mm, 1, 40, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:werewolf", {"default:dirt_with_grass"},
|
||||||
|
{"default:dirt_with_grass"}, 0, 10, 60, 13000000/mm, 1, 40, 31000)
|
||||||
|
|
||||||
-- ICE
|
-- ICE
|
||||||
mobs:spawn_specific("nssm:icelamander", {"default:snowblock", "default:ice"}, {"default:snowblock", "default:ice"}, 0, 20, 180, 120000000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:icesnake", {"default:snowblock", "default:ice", "default:dirt_with_snow"}, {"default:snowblock", "default:ice", "default:dirt_with_snow"}, 0, 20, 40, 20000000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:icelamander",
|
||||||
mobs:spawn_specific("nssm:white_werewolf", {"default:dirt_with_snow","default:snowblock"}, {"air"}, 0, 20, 35, 22000000/mm, 1, 50, 31000)
|
{"default:snowblock", "default:ice"}, {"default:snowblock", "default:ice"},
|
||||||
mobs:spawn_specific("nssm:snow_biter", {"default:snowblock", "default:ice", "default:dirt_with_snow"}, {"default:snowblock", "default:ice", "default:dirt_with_snow"}, 0, 20, 40, 20000000/mm, 1, -31000, 31000)
|
0, 20, 180, 120000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:icesnake",
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
0, 20, 40, 20000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:white_werewolf",
|
||||||
|
{"default:dirt_with_snow","default:snowblock"},
|
||||||
|
{"air"}, 0, 20, 35, 22000000/mm, 1, 50, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:snow_biter",
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
{"default:snowblock", "default:ice", "default:dirt_with_snow"},
|
||||||
|
0, 20, 40, 20000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- FOREST
|
-- FOREST
|
||||||
mobs:spawn_specific("nssm:larva", {"default:dirt_with_grass"}, {"default:tree","default:aspen_tree"}, 0, 20, 40, 800000/mm, 1, -31000, 140)
|
|
||||||
mobs:spawn_specific("nssm:masticone", {"default:dirt_with_grass"}, {"default:tree","default:aspen_tree"}, 0, 20, 180, 6000000/mm, 2, -31000, 140)
|
mobs:spawn_specific("nssm:larva", {"default:dirt_with_grass"},
|
||||||
|
{"default:tree","default:aspen_tree"}, 0, 20, 40, 800000/mm, 1, -31000, 140)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:masticone", {"default:dirt_with_grass"},
|
||||||
|
{"default:tree","default:aspen_tree"}, 0, 20, 180, 6000000/mm, 2, -31000, 140)
|
||||||
|
|
||||||
-- PINE FOREST
|
-- PINE FOREST
|
||||||
mobs:spawn_specific("nssm:pumpboom_small", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 80, 1400000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:pumpboom_medium", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 80, 1600000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:pumpboom_small",
|
||||||
mobs:spawn_specific("nssm:pumpboom_large", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_tree"}, 0, 20, 80, 1800000/mm, 1, -31000, 31000)
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
mobs:spawn_specific("nssm:pumpking", {"default:dirt_with_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_needles", "default:pine_tree"}, 0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 80, 1400000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpboom_medium",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 80, 1600000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpboom_large",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_tree"},
|
||||||
|
0, 20, 80, 1800000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:pumpking",
|
||||||
|
{"default:dirt_with_coniferous_litter", "default:dirt_with_snow",
|
||||||
|
"default:snowblock"}, {"default:pine_needles", "default:pine_tree"},
|
||||||
|
0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- SAVANNA
|
-- SAVANNA
|
||||||
mobs:spawn_specific("nssm:felucco", {"default:dirt_with_dry_grass"}, {"default:dirt_with_dry_grass"}, 0, 20, 80, 20000000/mm, 1, -200, 31000)
|
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:felucco", {"default:dirt_with_dry_grass",
|
||||||
|
"default:dry_dirt_with_dry_grass"}, {"default:dirt_with_dry_grass"},
|
||||||
|
0, 20, 80, 20000000/mm, 1, -200, 31000)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- NSSB SPECIAL
|
-- NSSB SPECIAL
|
||||||
|
|
||||||
if minetest.get_modpath("nssb") then
|
if minetest.get_modpath("nssb") then
|
||||||
mobs:spawn_specific("nssm:xgaloctopus", {"default:water_source"}, {"nssb:marine_brick"}, 0, 20, 20, 800000/mm, 1, -31000, 0)
|
|
||||||
|
mobs:spawn_specific("nssm:xgaloctopus", {"default:water_source"},
|
||||||
|
{"nssb:marine_brick"}, 0, 20, 20, 800000/mm, 1, -31000, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- CAVES
|
-- CAVES
|
||||||
mobs:spawn_specific("nssm:bloco", {"default:stone", "default:desert_stone"}, {"default:stone", "default:desert_stone"}, 0, 20, 30, 500000/mm, 3, -31000, -20)
|
|
||||||
mobs:spawn_specific("nssm:lava_titan", {"default:stone", "default:desert_stone"}, {"air"}, 0, 120, 12, 22000000/mm, 1, -31000, -100)
|
mobs:spawn_specific("nssm:bloco", {"default:stone", "default:desert_stone"},
|
||||||
mobs:spawn_specific("nssm:stone_eater", {"default:stone", "default:desert_stone"}, {"default:stone", "default:desert_stone"}, 0, 20, 40, 700000/mm, 2, -31000, -20)
|
{"default:stone", "default:desert_stone"}, 0, 20, 30, 500000/mm, 3, -31000, -20)
|
||||||
mobs:spawn_specific("nssm:signosigno", {"default:stone", "default:desert_stone"}, {"default:stone", "default:desert_stone"}, 0, 10, 20, 400000/mm, 2, -31000, -20)
|
|
||||||
mobs:spawn_specific("nssm:signosigno", {"bones:bones"}, {"air"}, 0, 15, 20, 5000/mm, 5, -31000, 31000)
|
mobs:spawn_specific("nssm:lava_titan", {"default:stone", "default:desert_stone"},
|
||||||
|
{"air"}, 0, 120, 12, 22000000/mm, 1, -31000, -100)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:stone_eater", {"default:stone", "default:desert_stone"},
|
||||||
|
{"default:stone", "default:desert_stone"}, 0, 20, 40, 700000/mm, 2, -31000, -20)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:signosigno", {"default:stone", "default:desert_stone"},
|
||||||
|
{"default:stone", "default:desert_stone"}, 0, 10, 20, 400000/mm, 2, -31000, -20)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:signosigno", {"bones:bones"},
|
||||||
|
{"air"}, 0, 15, 20, 5000/mm, 5, -31000, 31000)
|
||||||
|
|
||||||
-- SEA
|
-- SEA
|
||||||
mobs:spawn_specific("nssm:crab", {"default:sand"}, {"default:water_source"}, 0, 20, 60, 4000000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:crocodile", {"default:sand","default:water_source"}, {"default:water_source"}, 0, 20, 100, 35000000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:crab", {"default:sand"},
|
||||||
mobs:spawn_specific("nssm:crocodile", {"default:sand","default:river_water_source"}, {"default:river_water_source"}, 0, 20, 60, 12000000/mm, 1, -31000, 31000)
|
{"default:water_source"}, 0, 20, 60, 4000000/mm, 1, -31000, 31000)
|
||||||
mobs:spawn_specific("nssm:dolidrosaurus", {"default:water_source"}, {"default:water_source"}, 0, 20, 100, 35000000/mm, 1, -31000, -1)
|
|
||||||
mobs:spawn_specific("nssm:kraken", {"default:water_source"}, {"default:water_source"}, 0, 20, 400, 500000000/mm, 1, -31000, 0)
|
mobs:spawn_specific("nssm:crocodile", {"default:sand","default:water_source"},
|
||||||
mobs:spawn_specific("nssm:octopus", {"default:water_source"}, {"default:water_source"}, 0, 20, 80, 38000000/mm, 1, -31000, 0)
|
{"default:water_source"}, 0, 20, 100, 35000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:crocodile", {"default:sand","default:river_water_source"},
|
||||||
|
{"default:river_water_source"}, 0, 20, 60, 12000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:dolidrosaurus", {"default:water_source"},
|
||||||
|
{"default:water_source"}, 0, 20, 100, 35000000/mm, 1, -31000, -1)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:kraken", {"default:water_source"},
|
||||||
|
{"default:water_source"}, 0, 20, 400, 500000000/mm, 1, -31000, 0)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:octopus", {"default:water_source"},
|
||||||
|
{"default:water_source"}, 0, 20, 80, 38000000/mm, 1, -31000, 0)
|
||||||
|
|
||||||
-- DESERT
|
-- DESERT
|
||||||
mobs:spawn_specific("nssm:sandworm", {"default:desert_sand", "default:desert_stone"}, {"air"}, 0, 20, 100, 28000000/mm, 1, -31000, 31000)
|
|
||||||
mobs:spawn_specific("nssm:giant_sandworm", {"default:desert_sand", "default:desert_stone"}, {"air"}, 0, 20, 400, 600000000/mm, 1, -31000, 31000)
|
mobs:spawn_specific("nssm:sandworm", {"default:desert_sand", "default:desert_stone"},
|
||||||
mobs:spawn_specific("nssm:sand_bloco", {"default:desert_sand", "default:desert_stone"}, {"air"}, 0, 20, 90, 20000000/mm, 1, -31000, 31000)
|
{"air"}, 0, 20, 100, 28000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:giant_sandworm", {"default:desert_sand",
|
||||||
|
"default:desert_stone"}, {"air"}, 0, 20, 400, 600000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:sand_bloco", {"default:desert_sand",
|
||||||
|
"default:desert_stone"}, {"air"}, 0, 20, 90, 20000000/mm, 1, -31000, 31000)
|
||||||
|
|
||||||
-- SKY
|
-- SKY
|
||||||
mobs:spawn_specific("nssm:moonheron", {"air"}, {"air"}, 0, 10, 110, 950000000/mm, 1, 10, 180)
|
|
||||||
mobs:spawn_specific("nssm:night_master", {"air"}, {"air"}, 0, 7, 400, 4500000000/mm, 2, 10, 180)
|
mobs:spawn_specific("nssm:moonheron", {"air"}, {"air"},
|
||||||
mobs:spawn_specific("nssm:phoenix", {"air"}, {"air"}, 10, 20, 400, 10000000000/mm, 1, 10, 180)
|
0, 10, 110, 950000000/mm, 1, 10, 180)
|
||||||
mobs:spawn_specific("nssm:scrausics", {"air"}, {"air"}, 10, 20, 110, 950000000/mm, 1, 10, 180)
|
|
||||||
|
mobs:spawn_specific("nssm:night_master", {"air"}, {"air"},
|
||||||
|
0, 7, 400, 4500000000/mm, 2, 10, 180)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:phoenix", {"air"}, {"air"},
|
||||||
|
10, 20, 400, 10000000000/mm, 1, 10, 180)
|
||||||
|
|
||||||
|
mobs:spawn_specific("nssm:scrausics", {"air"}, {"air"},
|
||||||
|
10, 20, 110, 950000000/mm, 1, 10, 180)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user