tweak and tidy code, add nyancat check
This commit is contained in:
parent
e85b8447b0
commit
ca9d00e2ca
205
darts.lua
205
darts.lua
@ -1,27 +1,5 @@
|
||||
-- arrow (duck_arrow)
|
||||
mobs:register_arrow("nssm:duck_father", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"duck_egg.png"},
|
||||
velocity = 8,
|
||||
-- direct hit
|
||||
hit_player = function(self, player)
|
||||
local pos = self.object:get_pos()
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
local pos = self.object:get_pos()
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
function duck_explosion(pos)
|
||||
local function duck_explosion(pos)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
@ -68,6 +46,46 @@ function duck_explosion(pos)
|
||||
end)
|
||||
end
|
||||
|
||||
-- arrow (duck_arrow)
|
||||
mobs:register_arrow("nssm:duck_father", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"duck_egg.png"},
|
||||
velocity = 8,
|
||||
-- direct hit
|
||||
hit_player = function(self, player)
|
||||
local pos = self.object:get_pos()
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
local pos = self.object:get_pos()
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
duck_explosion(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
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 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
|
||||
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({x=i, y=j, z=k}, {name="default:ice"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- snow_arrow
|
||||
mobs:register_arrow("nssm:snow_arrow", {
|
||||
visual = "sprite",
|
||||
@ -89,20 +107,6 @@ mobs:register_arrow("nssm:snow_arrow", {
|
||||
end,
|
||||
})
|
||||
|
||||
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 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
|
||||
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({x=i, y=j, z=k}, {name="default:ice"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- arrow manticore
|
||||
mobs:register_arrow("nssm:spine", {
|
||||
@ -126,6 +130,7 @@ mobs:register_arrow("nssm:spine", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
--morbat arrow
|
||||
mobs:register_arrow("nssm:morarrow", {
|
||||
visual = "sprite",
|
||||
@ -141,6 +146,32 @@ mobs:register_arrow("nssm:morarrow", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
local function explosion_web(pos)
|
||||
pos.y = round(pos.y)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
for i=pos.x-1, pos.x+1, 1 do
|
||||
for j=pos.y-3, pos.y, 1 do
|
||||
for k=pos.z-1, pos.z+1, 1 do
|
||||
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 ontop = minetest.get_node(k).name
|
||||
if (current ~= "air") and
|
||||
(current ~= "nssm:web") and
|
||||
(ontop == "air") and not
|
||||
minetest.is_protected(p,"") and not
|
||||
minetest.is_protected(k,"") then
|
||||
minetest.set_node(k, {name="nssm:web"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- web arrow
|
||||
mobs:register_arrow("nssm:webball", {
|
||||
visual = "sprite",
|
||||
@ -165,34 +196,31 @@ mobs:register_arrow("nssm:webball", {
|
||||
end
|
||||
})
|
||||
|
||||
function explosion_web(pos)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
|
||||
function explosion_thickweb(pos)
|
||||
pos.y = round(pos.y)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
for i=pos.x-1, pos.x+1, 1 do
|
||||
for j=pos.y-3, pos.y, 1 do
|
||||
for k=pos.z-1, pos.z+1, 1 do
|
||||
for i=pos.x+0, pos.x+0, 1 do
|
||||
for j=pos.y-2, pos.y, 1 do
|
||||
for k=pos.z+0, pos.z+0, 1 do
|
||||
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 ontop = minetest.get_node(k).name
|
||||
if (current ~= "air") and
|
||||
(current ~= "nssm:web") and
|
||||
(current ~= "nssm:thick_web") and
|
||||
(ontop == "air") and not
|
||||
minetest.is_protected(p,"") and not
|
||||
minetest.is_protected(k,"") then
|
||||
minetest.set_node(k, {name="nssm:web"})
|
||||
minetest.set_node(k, {name="nssm:thick_web"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- thick_web arrow
|
||||
mobs:register_arrow("nssm:thickwebball", {
|
||||
visual = "sprite",
|
||||
@ -217,32 +245,6 @@ mobs:register_arrow("nssm:thickwebball", {
|
||||
end
|
||||
})
|
||||
|
||||
function explosion_thickweb(pos)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
pos.y = round(pos.y)
|
||||
if minetest.is_protected(pos, "") then
|
||||
return
|
||||
end
|
||||
for i=pos.x+0, pos.x+0, 1 do
|
||||
for j=pos.y-2, pos.y, 1 do
|
||||
for k=pos.z+0, pos.z+0, 1 do
|
||||
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 ontop = minetest.get_node(k).name
|
||||
if (current ~= "air") and
|
||||
(current ~= "nssm:thick_web") and
|
||||
(ontop == "air") and not
|
||||
minetest.is_protected(p,"") and not
|
||||
minetest.is_protected(k,"") then
|
||||
minetest.set_node(k, {name="nssm:thick_web"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- arrow=>phoenix arrow
|
||||
mobs:register_arrow("nssm:phoenix_arrow", {
|
||||
@ -267,7 +269,8 @@ mobs:register_arrow("nssm:phoenix_arrow", {
|
||||
self.timer = os.time()
|
||||
end
|
||||
|
||||
if os.time() - self.timer > 5 or minetest.is_protected(pos, "") or ((n~="air") and (n~="nssm:phoenix_fire")) then
|
||||
if os.time() - self.timer > 5 or minetest.is_protected(pos, "")
|
||||
or ((n~="air") and (n~="nssm:phoenix_fire")) then
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
@ -289,22 +292,6 @@ mobs:register_arrow("nssm:phoenix_arrow", {
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_arrow("nssm:super_gas", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"transparent.png"},
|
||||
velocity = 8,
|
||||
-- direct hit
|
||||
hit_player = function(self, player)
|
||||
local p = player:get_pos()
|
||||
gas_explosion(p)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
gas_explosion(pos)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
function gas_explosion(pos)
|
||||
if minetest.is_protected(pos, "") then
|
||||
@ -326,7 +313,23 @@ function gas_explosion(pos)
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
mobs:register_arrow("nssm:super_gas", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"transparent.png"},
|
||||
velocity = 8,
|
||||
-- direct hit
|
||||
hit_player = function(self, player)
|
||||
local p = player:get_pos()
|
||||
gas_explosion(p)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
gas_explosion(pos)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
mobs:register_arrow("nssm:roar_of_the_dragon", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
@ -348,17 +351,18 @@ mobs:register_arrow("nssm:roar_of_the_dragon", {
|
||||
end
|
||||
|
||||
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()
|
||||
if name~="nssm:roar_of_the_dragon" 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()) and name ~= self.object:get_luaentity().name then
|
||||
obj:remove()
|
||||
end
|
||||
end
|
||||
obj:set_hp(obj:get_hp()-0.05)
|
||||
if (obj:get_hp() <= 0) then
|
||||
if (not obj:is_player())
|
||||
and name ~= self.object:get_luaentity().name then
|
||||
obj:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.set_node(pos, {name="air"})
|
||||
if math.random(1,2)==1 then
|
||||
@ -391,7 +395,8 @@ mobs:register_arrow("nssm:lava_arrow", {
|
||||
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
|
||||
if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
|
||||
if n~="default:lava_flowing"
|
||||
and not minetest.is_protected(p, "") then
|
||||
minetest.set_node(p, {name="default:lava_flowing"})
|
||||
end
|
||||
end
|
||||
|
12
init.lua
12
init.lua
@ -63,10 +63,18 @@ dofile(path.."/mobs/white_werewolf.lua")
|
||||
dofile(path.."/mobs/mese_dragon.lua")
|
||||
|
||||
--Others
|
||||
dofile(path.."/rainbow_staff.lua")
|
||||
dofile(path.."/darts.lua")
|
||||
dofile(path.."/nssm_materials.lua")
|
||||
dofile(path.."/nssm_spears.lua")
|
||||
dofile(path.."/nssm_api.lua")
|
||||
dofile(path.."/nssm_weapons.lua")
|
||||
dofile(path.."/nssm_armor.lua")
|
||||
|
||||
if minetest.registered_nodes["nyancat:nyancat_rainbow"] then
|
||||
dofile(path.."/rainbow_staff.lua") ; print ("NYAN!!!!!")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("3d_armor") then
|
||||
dofile(path.."/nssm_armor.lua")
|
||||
end
|
||||
|
||||
print("[MOD] NSSM loaded")
|
||||
|
184
nssm_api.lua
184
nssm_api.lua
@ -120,47 +120,47 @@ function round(n)
|
||||
end
|
||||
|
||||
function explosion_particles(pos, exp_radius)
|
||||
minetest.add_particlespawner(
|
||||
100*exp_radius/2, --amount
|
||||
0.1, --time
|
||||
{x=pos.x-exp_radius, y=pos.y-exp_radius, z=pos.z-exp_radius}, --minpos
|
||||
{x=pos.x+exp_radius, y=pos.y+exp_radius, z=pos.z+exp_radius}, --maxpos
|
||||
{x=0, y=0, z=0}, --minvel
|
||||
{x=0.1, y=0.3, z=0.1}, --maxvel
|
||||
{x=-0.5,y=1,z=-0.5}, --minacc
|
||||
{x=0.5,y=1,z=0.5}, --maxacc
|
||||
0.1, --minexptime
|
||||
4, --maxexptime
|
||||
6, --minsize
|
||||
12, --maxsize
|
||||
false, --collisiondetection
|
||||
"tnt_smoke.png" --texture
|
||||
)
|
||||
minetest.add_particlespawner(
|
||||
100*exp_radius/2, --amount
|
||||
0.1, --time
|
||||
{x=pos.x-exp_radius, y=pos.y-exp_radius, z=pos.z-exp_radius}, --minpos
|
||||
{x=pos.x+exp_radius, y=pos.y+exp_radius, z=pos.z+exp_radius}, --maxpos
|
||||
{x=0, y=0, z=0}, --minvel
|
||||
{x=0.1, y=0.3, z=0.1}, --maxvel
|
||||
{x=-0.5,y=1,z=-0.5}, --minacc
|
||||
{x=0.5,y=1,z=0.5}, --maxacc
|
||||
0.1, --minexptime
|
||||
4, --maxexptime
|
||||
6, --minsize
|
||||
12, --maxsize
|
||||
false, --collisiondetection
|
||||
"tnt_smoke.png" --texture
|
||||
)
|
||||
end
|
||||
--[[
|
||||
function explosion(pos, exp_radius, fire, kamehameha_bad)
|
||||
local radius = exp_radius
|
||||
-- if area protected or near map limits then no blast damage
|
||||
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,
|
||||
})
|
||||
--sound
|
||||
minetest.sound_play("boom", {
|
||||
pos = pos,
|
||||
max_hear_distance = exp_radius*4,
|
||||
})
|
||||
|
||||
--particles:
|
||||
explosion_particles(pos, exp_radius)
|
||||
--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
|
||||
--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
|
||||
@ -168,7 +168,7 @@ function explosion(pos, exp_radius, fire, kamehameha_bad)
|
||||
elseif obj:get_luaentity().health then
|
||||
obj:get_luaentity().health = obj:get_luaentity().health - damage
|
||||
check_for_death(obj:get_luaentity())
|
||||
end
|
||||
end
|
||||
else
|
||||
if (obj:get_luaentity()) then
|
||||
local name = obj:get_luaentity().name
|
||||
@ -178,86 +178,86 @@ function explosion(pos, exp_radius, fire, kamehameha_bad)
|
||||
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
|
||||
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))
|
||||
--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}
|
||||
--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
|
||||
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
|
||||
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 on_blast then
|
||||
return on_blast(p)
|
||||
end
|
||||
|
||||
if minetest.get_item_group(n, "unbreakable") ~= 1 then
|
||||
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
|
||||
-- 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()
|
||||
local meta = minetest.get_meta(p)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
for i = 1, inv:get_size("main") do
|
||||
for i = 1, inv:get_size("main") do
|
||||
|
||||
local m_stack = inv:get_stack("main", i)
|
||||
local obj = minetest.add_item(p, m_stack)
|
||||
local m_stack = inv:get_stack("main", i)
|
||||
local obj = minetest.add_item(p, m_stack)
|
||||
|
||||
if obj then
|
||||
if obj then
|
||||
|
||||
obj:set_velocity({
|
||||
x = math.random(-2, 2),
|
||||
y = 7,
|
||||
z = math.random(-2, 2)
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
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
|
||||
-- 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
|
||||
]]
|
||||
|
||||
|
356
nssm_armor.lua
356
nssm_armor.lua
@ -1,193 +1,187 @@
|
||||
if minetest.get_modpath("3d_armor") then
|
||||
|
||||
|
||||
--Armors
|
||||
local stats = {
|
||||
wolf = {name="Werewolf", armor=2.8, heal=0, use=800},
|
||||
whitewolf = {name="White Werewolf", armor=2.8, heal=0, use=800},
|
||||
bloco = {name="Bloco", armor=3.2, heal=0, use=500},
|
||||
croco = {name="Crocodile", armor=3, heal=0, use=450},
|
||||
ant = {name="Ant", armor=3, heal=0, use=400},
|
||||
ice = {name="Ice Teeth", armor=3.2, heal=0, use=410},
|
||||
felucco = {name="Felucco", armor=2.8, heal=0, use=800},
|
||||
manticore = {name="Manticore", armor=3.4, heal=0, use=440},
|
||||
duck = {name="Duck", armor=1.5, heal=0, use=1000},
|
||||
black_duck = {name="Black Duck", armor=1.5, heal=0, use=900},
|
||||
mor = {name="Morlu", armor=5.3, heal=0, use=30},
|
||||
sky = {name="Sky", armor=4.2, heal=0, use=100},
|
||||
sandworm = {name="Sandworm", armor=3.4, heal=0, use=400},
|
||||
sandbloco = {name="Sand Bloco", armor=3.2, heal=0, use=500},
|
||||
web = {name="Cobweb String", armor=2.4, heal=0, use=900},
|
||||
denseweb = {name="Dense Cobweb String", armor=3.5, heal=0, use=400},
|
||||
}
|
||||
local materials = {
|
||||
wolf="nssm:wolf_fur",
|
||||
whitewolf="nssm:white_wolf_fur",
|
||||
bloco="nssm:bloco_skin",
|
||||
croco="nssm:crocodile_skin",
|
||||
ant="nssm:ant_hard_skin",
|
||||
ice="nssm:little_ice_tooth",
|
||||
felucco="nssm:felucco_fur",
|
||||
manticore="nssm:manticore_fur",
|
||||
duck="nssm:duck_feather",
|
||||
black_duck="nssm:black_duck_feather",
|
||||
mor= "nssm:lustful_moranga",
|
||||
sandbloco= "nssm:sand_bloco_skin",
|
||||
sandworm="nssm:sandworm_skin",
|
||||
sky="nssm:sky_iron",
|
||||
web="nssm:web_string",
|
||||
denseweb="nssm:dense_web_string",
|
||||
}
|
||||
local stats = {
|
||||
wolf = {name="Werewolf", armor=2.8, heal=0, use=800},
|
||||
whitewolf = {name="White Werewolf", armor=2.8, heal=0, use=800},
|
||||
bloco = {name="Bloco", armor=3.2, heal=0, use=500},
|
||||
croco = {name="Crocodile", armor=3, heal=0, use=450},
|
||||
ant = {name="Ant", armor=3, heal=0, use=400},
|
||||
ice = {name="Ice Teeth", armor=3.2, heal=0, use=410},
|
||||
felucco = {name="Felucco", armor=2.8, heal=0, use=800},
|
||||
manticore = {name="Manticore", armor=3.4, heal=0, use=440},
|
||||
duck = {name="Duck", armor=1.5, heal=0, use=1000},
|
||||
black_duck = {name="Black Duck", armor=1.5, heal=0, use=900},
|
||||
mor = {name="Morlu", armor=5.3, heal=0, use=30},
|
||||
sky = {name="Sky", armor=4.2, heal=0, use=100},
|
||||
sandworm = {name="Sandworm", armor=3.4, heal=0, use=400},
|
||||
sandbloco = {name="Sand Bloco", armor=3.2, heal=0, use=500},
|
||||
web = {name="Cobweb String", armor=2.4, heal=0, use=900},
|
||||
denseweb = {name="Dense Cobweb String", armor=3.5, heal=0, use=400},
|
||||
}
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." Helmet",
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_head=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:chestplate_"..k, {
|
||||
description = v.name.." Chestplate",
|
||||
inventory_image ="inv_chestplate_"..k..".png",
|
||||
groups = {armor_torso=math.floor(6*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:leggings_"..k, {
|
||||
description = v.name.." Leggings",
|
||||
inventory_image = "inv_leggings_"..k..".png",
|
||||
groups = {armor_legs=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:boots_"..k, {
|
||||
description = v.name.." Boots",
|
||||
inventory_image ="inv_boots_"..k..".png",
|
||||
groups = {armor_feet=math.floor(3*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
end
|
||||
local materials = {
|
||||
wolf="nssm:wolf_fur",
|
||||
whitewolf="nssm:white_wolf_fur",
|
||||
bloco="nssm:bloco_skin",
|
||||
croco="nssm:crocodile_skin",
|
||||
ant="nssm:ant_hard_skin",
|
||||
ice="nssm:little_ice_tooth",
|
||||
felucco="nssm:felucco_fur",
|
||||
manticore="nssm:manticore_fur",
|
||||
duck="nssm:duck_feather",
|
||||
black_duck="nssm:black_duck_feather",
|
||||
mor= "nssm:lustful_moranga",
|
||||
sandbloco= "nssm:sand_bloco_skin",
|
||||
sandworm="nssm:sandworm_skin",
|
||||
sky="nssm:sky_iron",
|
||||
web="nssm:web_string",
|
||||
denseweb="nssm:dense_web_string",
|
||||
}
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." Helmet",
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_head=math.floor(4*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:chestplate_"..k, {
|
||||
description = v.name.." Chestplate",
|
||||
inventory_image ="inv_chestplate_"..k..".png",
|
||||
groups = {armor_torso=math.floor(6*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:leggings_"..k, {
|
||||
description = v.name.." Leggings",
|
||||
inventory_image = "inv_leggings_"..k..".png",
|
||||
groups = {armor_legs=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
minetest.register_tool("nssm:boots_"..k, {
|
||||
description = v.name.." Boots",
|
||||
inventory_image ="inv_boots_"..k..".png",
|
||||
groups = {armor_feet=math.floor(3*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
end
|
||||
|
||||
for k, v in pairs(materials) do
|
||||
minetest.register_craft({
|
||||
output = "nssm:helmet_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
{v, "", v},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:chestplate_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
||||
{v, v, v},
|
||||
{v, v, v},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:leggings_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
{v, "", v},
|
||||
{v, "", v},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:boots_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
||||
{v, "", v},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
for k, v in pairs(materials) do
|
||||
minetest.register_craft({
|
||||
output = "nssm:helmet_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
{v, "", v},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:chestplate_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
||||
{v, v, v},
|
||||
{v, v, v},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:leggings_"..k,
|
||||
recipe = {
|
||||
{v, v, v},
|
||||
{v, "", v},
|
||||
{v, "", v},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:boots_"..k,
|
||||
recipe = {
|
||||
{v, "", v},
|
||||
{v, "", v},
|
||||
},
|
||||
})
|
||||
end
|
||||
--shields
|
||||
if minetest.get_modpath("shields") then
|
||||
local stats = {
|
||||
crab = {name="Crab", armor=4, heal=0, use=500},
|
||||
ice ={name="Ice Teeth", armor=3.5, heal=0, use=600},
|
||||
mor ={name="Morlu", armor=5, use=100},
|
||||
masticone ={name="Masticone", armor=4.5, use=300},
|
||||
mantis ={name="Mantis", armor=3, use=500},
|
||||
}
|
||||
local materials = {
|
||||
crab="nssm:crab_carapace_fragment",
|
||||
ice="nssm:little_ice_tooth",
|
||||
mor="nssm:lustful_moranga",
|
||||
masticone="nssm:masticone_skull_fragments",
|
||||
mantis="nssm:mantis_skin",
|
||||
}
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:shield_"..k, {
|
||||
description = v.name.." Shield",
|
||||
inventory_image ="inv_shield_"..k..".png",
|
||||
groups = {armor_head=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
if minetest.get_modpath("shields") then
|
||||
|
||||
local m = materials[k]
|
||||
minetest.register_craft({
|
||||
output = "nssm:shield_"..k,
|
||||
recipe = {
|
||||
{m, m, m},
|
||||
{m, m, m},
|
||||
{"", m, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
local stats = {
|
||||
crab = {name="Crab", armor=4, heal=0, use=500},
|
||||
ice ={name="Ice Teeth", armor=3.5, heal=0, use=600},
|
||||
mor ={name="Morlu", armor=5, use=100},
|
||||
masticone ={name="Masticone", armor=4.5, use=300},
|
||||
mantis ={name="Mantis", armor=3, use=500},
|
||||
}
|
||||
|
||||
local materials = {
|
||||
crab="nssm:crab_carapace_fragment",
|
||||
ice="nssm:little_ice_tooth",
|
||||
mor="nssm:lustful_moranga",
|
||||
masticone="nssm:masticone_skull_fragments",
|
||||
mantis="nssm:mantis_skin",
|
||||
}
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:shield_"..k, {
|
||||
description = v.name.." Shield",
|
||||
inventory_image ="inv_shield_"..k..".png",
|
||||
groups = {armor_head=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
local m = materials[k]
|
||||
minetest.register_craft({
|
||||
output = "nssm:shield_"..k,
|
||||
recipe = {
|
||||
{m, m, m},
|
||||
{m, m, m},
|
||||
{"", m, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
--Special objects (pumpking helmet, masticone helmet, crowned masticone helmet, crown,)
|
||||
if minetest.get_modpath("3d_armor") then
|
||||
|
||||
|
||||
local stats = {
|
||||
pumpking = {name="Pumpking Head", armor=4, heal=0, use=100},
|
||||
masticone ={name="Masticone Head", armor=4, heal=0, use=100},
|
||||
crown ={name="Dukking Crown", armor=2, heal=0, use=50},
|
||||
masticone_crowned ={name="Masticone Crowned Head", armor=6, heal=0, use=20},
|
||||
}
|
||||
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." ",
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
pumpking = {name="Pumpking Head", armor=4, heal=0, use=100},
|
||||
masticone ={name="Masticone Head", armor=4, heal=0, use=100},
|
||||
crown ={name="Dukking Crown", armor=2, heal=0, use=50},
|
||||
masticone_crowned ={name="Masticone Crowned Head", armor=6, heal=0, use=20},
|
||||
}
|
||||
|
||||
minetest.register_tool("nssm:chestplate_snake", {
|
||||
description = "Snake Scute Chestplate",
|
||||
inventory_image ="inv_chestplate_snake.png",
|
||||
groups = {armor_torso=40, armor_heal=0, armor_use=100},
|
||||
wear = 0,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "nssm:chestplate_snake",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "nssm:snake_scute", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:helmet_masticone",
|
||||
recipe = {
|
||||
{"nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments"},
|
||||
{"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({
|
||||
output = "nssm:helmet_masticone_crowned",
|
||||
recipe = {
|
||||
{"", "nssm:helmet_crown", ""},
|
||||
{"", "nssm:helmet_masticone", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
for k, v in pairs(stats) do
|
||||
minetest.register_tool("nssm:helmet_"..k, {
|
||||
description = v.name.." ",
|
||||
inventory_image ="inv_helmet_"..k..".png",
|
||||
groups = {armor_shield=math.floor(5*v.armor), armor_heal=v.heal, armor_use=v.use},
|
||||
wear = 0,
|
||||
})
|
||||
|
||||
minetest.register_tool("nssm:chestplate_snake", {
|
||||
description = "Snake Scute Chestplate",
|
||||
inventory_image ="inv_chestplate_snake.png",
|
||||
groups = {armor_torso=40, armor_heal=0, armor_use=100},
|
||||
wear = 0,
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "nssm:chestplate_snake",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "nssm:snake_scute", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "nssm:helmet_masticone",
|
||||
recipe = {
|
||||
{"nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments", "nssm:masticone_skull_fragments"},
|
||||
{"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({
|
||||
output = "nssm:helmet_masticone_crowned",
|
||||
recipe = {
|
||||
{"", "nssm:helmet_crown", ""},
|
||||
{"", "nssm:helmet_masticone", ""},
|
||||
{"", "", ""},
|
||||
},
|
||||
})
|
||||
|
File diff suppressed because it is too large
Load Diff
102
nssm_spears.lua
102
nssm_spears.lua
@ -1,6 +1,7 @@
|
||||
|
||||
--function
|
||||
function spears_shot (itemstack, player)
|
||||
--functions
|
||||
|
||||
local function spears_shot (itemstack, player)
|
||||
local spear = itemstack:get_name() .. '_entity'
|
||||
local playerpos = player:get_pos()
|
||||
local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, spear)
|
||||
@ -22,7 +23,7 @@ function spears_shot (itemstack, player)
|
||||
end
|
||||
|
||||
|
||||
function spears_set_entity(kind, eq, toughness)
|
||||
local function spears_set_entity(kind, eq, toughness)
|
||||
local SPEAR_ENTITY={
|
||||
physical = false,
|
||||
timer=0,
|
||||
@ -86,11 +87,11 @@ end
|
||||
|
||||
--Tools
|
||||
|
||||
function spears_register_spear(kind, desc, eq, toughness, material)
|
||||
local function spears_register_spear(kind, desc, eq, toughness, material)
|
||||
|
||||
minetest.register_tool("nssm:spear_" .. kind, {
|
||||
description = desc .. " Spear",
|
||||
wield_image = "spear_" .. kind .. ".png",
|
||||
wield_image = "spear_" .. kind .. ".png",
|
||||
inventory_image = "spear_" .. kind .. ".png^[transform4",
|
||||
wield_scale= {x=2,y=1,z=1},
|
||||
on_drop = function(itemstack, user, pointed_thing)
|
||||
@ -116,18 +117,18 @@ function spears_register_spear(kind, desc, eq, toughness, material)
|
||||
damage_groups = {fleshy=eq},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local SPEAR_ENTITY=spears_set_entity(kind, eq, toughness)
|
||||
|
||||
|
||||
minetest.register_entity("nssm:spear_" .. kind .. "_entity", SPEAR_ENTITY)
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'nssm:spear_' .. kind,
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood', material},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'nssm:spear_' .. kind,
|
||||
recipe = {
|
||||
@ -153,36 +154,36 @@ spears_register_spear('felucco_horn', 'Felucco Horn', 7, 9, 'nssm:felucco_horn')
|
||||
|
||||
|
||||
--Spear of peace
|
||||
minetest.register_tool("nssm:spear_of_peace", {
|
||||
description = "Spear of Peace",
|
||||
wield_image = "spear_of_peace.png",
|
||||
inventory_image = "spear_of_peace.png^[transform4",
|
||||
wield_scale= {x=4,y=2,z=2},
|
||||
on_drop = function(itemstack, user, pointed_thing)
|
||||
spears_shot(itemstack, user)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
minetest.add_item(pointed_thing.above, itemstack)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy = {times={[3]=0.2, [2]=0.2, [1]=0.2}, uses=500, maxlevel=1},
|
||||
minetest.register_tool("nssm:spear_of_peace", {
|
||||
description = "Spear of Peace",
|
||||
wield_image = "spear_of_peace.png",
|
||||
inventory_image = "spear_of_peace.png^[transform4",
|
||||
wield_scale= {x=4,y=2,z=2},
|
||||
on_drop = function(itemstack, user, pointed_thing)
|
||||
spears_shot(itemstack, user)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
minetest.add_item(pointed_thing.above, itemstack)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.7,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
snappy = {times={[3]=0.2, [2]=0.2, [1]=0.2}, uses=500, maxlevel=1},
|
||||
},
|
||||
damage_groups = {fleshy=18},
|
||||
}
|
||||
})
|
||||
|
||||
function spears_set_sentity(kind, eq, toughness)
|
||||
damage_groups = {fleshy=18},
|
||||
}
|
||||
})
|
||||
|
||||
local function spears_set_sentity(kind, eq, toughness)
|
||||
local SUPERSPEAR_ENTITY={
|
||||
physical = false,
|
||||
timer=0,
|
||||
@ -204,7 +205,7 @@ spears_register_spear('felucco_horn', 'Felucco Horn', 7, 9, 'nssm:felucco_horn')
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
SUPERSPEAR_ENTITY.on_step = function(self, dtime)
|
||||
self.timer=self.timer+dtime
|
||||
local pos = self.object:get_pos()
|
||||
@ -244,15 +245,14 @@ spears_register_spear('felucco_horn', 'Felucco Horn', 7, 9, 'nssm:felucco_horn')
|
||||
end
|
||||
return SUPERSPEAR_ENTITY
|
||||
end
|
||||
|
||||
SUPERSPEAR_ENTITY=spears_set_sentity("of_peace", 30, 300)
|
||||
|
||||
minetest.register_entity("nssm:spear_of_peace_entity", SUPERSPEAR_ENTITY)
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'nssm:spear_of_peace',
|
||||
recipe = {
|
||||
{'nssm:wrathful_moranga', 'group:wood', 'group:wood'},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
SUPERSPEAR_ENTITY=spears_set_sentity("of_peace", 30, 300)
|
||||
|
||||
minetest.register_entity("nssm:spear_of_peace_entity", SUPERSPEAR_ENTITY)
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'nssm:spear_of_peace',
|
||||
recipe = {
|
||||
{'nssm:wrathful_moranga', 'group:wood', 'group:wood'},
|
||||
}
|
||||
})
|
||||
|
1524
nssm_weapons.lua
1524
nssm_weapons.lua
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,6 @@
|
||||
|
||||
--rainbow!
|
||||
|
||||
minetest.register_entity("nssm:rainbow", {
|
||||
textures = {"transparent.png"},
|
||||
velocity = 10,
|
||||
|
129
spawn.lua
129
spawn.lua
@ -1,4 +1,5 @@
|
||||
--Before starting a new game write 6 or 7 in order to regulate the spawns (7 works also with flat and fractal).
|
||||
--Before starting a new game write 6 or 7 in order to regulate the spawns
|
||||
-- (7 works also with flat and fractal).
|
||||
|
||||
local mymapgenis = nssm.mymapgenis
|
||||
local mm = nssm.multimobs
|
||||
@ -11,87 +12,87 @@ end
|
||||
if mm ~= 0 then
|
||||
if mymapgenis == 6 then
|
||||
|
||||
-- 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_worker", {"nssm:ant_dirt"}, {"air"}, 0, 20, 5, 10000/mm, 5, -31000, 31000)
|
||||
-- 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_worker", {"nssm:ant_dirt"}, {"air"}, 0, 20, 5, 10000/mm, 5, -31000, 31000)
|
||||
|
||||
-- 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:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 5000000/mm, 1, -31000, 31000)
|
||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 20, 1200000/mm, 1, -31000, 31000)
|
||||
-- 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:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 5000000/mm, 1, -31000, 31000)
|
||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 20, 1200000/mm, 1, -31000, 31000)
|
||||
|
||||
-- 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: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)
|
||||
-- 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: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)
|
||||
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
|
||||
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:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 12000000/mm, 1, 20, 31000)
|
||||
-- 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:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 12000000/mm, 1, 20, 31000)
|
||||
|
||||
-- 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: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)
|
||||
-- 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: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
|
||||
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)
|
||||
-- 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)
|
||||
|
||||
-- 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_large", {"default:dirt_with_grass", "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_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_needles", "default:pine_tree"}, 0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
||||
-- 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_large", {"default:dirt_with_grass", "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_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_needles", "default:pine_tree"}, 0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
||||
|
||||
else
|
||||
|
||||
-- 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:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 50000000/mm, 1, -31000, 31000)
|
||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 30, 4400000/mm, 1, -31000, 31000)
|
||||
-- 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:tarantula", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 14, 120, 50000000/mm, 1, -31000, 31000)
|
||||
mobs:spawn_specific("nssm:uloboros", {"default:jungle_grass", "default:jungletree", "nssm:web" }, {"air"}, 0, 20, 30, 4400000/mm, 1, -31000, 31000)
|
||||
|
||||
-- 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: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)
|
||||
-- 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: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: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
|
||||
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:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 13000000/mm, 1, 40, 31000)
|
||||
-- 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:werewolf", {"default:dirt_with_grass"}, {"default:dirt_with_grass"}, 0, 10, 60, 13000000/mm, 1, 40, 31000)
|
||||
|
||||
-- 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: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)
|
||||
-- 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: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
|
||||
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)
|
||||
-- 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)
|
||||
|
||||
-- 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_large", {"default:dirt_with_grass", "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_grass", "default:dirt_with_snow","default:snowblock"}, {"default:pine_needles", "default:pine_tree"}, 0, 12, 120, 8000000/mm, 1, -31000, 31000)
|
||||
-- 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_large", {"default:dirt_with_grass", "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_grass", "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)
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user