Merge branch 'development'

Solved conflicts
master
npx 2016-11-23 00:51:51 +01:00
commit 8c67d6ee5d
452 changed files with 334421 additions and 3850 deletions

View File

@ -1,15 +1,27 @@
Not so simple mobs by NPX team
Not So Simple Mobs by NPX team
Starting from version 3.0 the mod depends on mobs_redo api: https://github.com/tenplus1/mobs_redo
We suggest that you play nssm with:
- nssb (Not So Simple Buildings, our second mod that adds many blocks and Morlendor, the new dimension):
- 3d_armors (with which you can use nssm armors):
- unified_inventory (useful to discover all the new recipes and to use the armors):
- a throwing mod (a mod that add bows) if compatible with the Tenplus1's damage_system
We would like to thank:
- PilzAdam, for his wonderful simple-mobs mod;
- Tenplus1, for his hard work in making mobs_redo;
- rnd, for his pathfinding;
- Echoes91, for Spears: simple but amazing;
- and obviously Celeron-55 and all the people who contributed to Minetest and its community;
- Denise and Ponzi_Duro for the revision of the guide
- Double P and Ponzi_Duro for the beta testing
- and obviously Celeron-55 and all the people who contributed to Minetest and its community (and Paramat in particular);
- Denise and Ponzi_Duro for the revision of the guide;
- Double_P, Ponzi_Duro, Andrey01 and Taikedz for the beta testing;
- Taikedz for his support and for hosting a server dedicated to nssm (Not So Simple Server: https://forum.minetest.net/viewtopic.php?f=10&t=15435&hilit=nsss);
License LGPL
License for the code: LGPL
License for all the models, textures and sound: CC BY-SA 4.0
The mod makes the game really hard, please read the Guide before playing:
https://dl.orangedox.com/a9tDekhYmWRkJt0J0a
The mod makes the game really hard, please read the wiki before playing: http://wiki.minetest.net/Mods/Not_So_Simple_Mobs (which will be updated as soon as possible) or the old guide for the 2.4 version.
Here are the trailers of the mod:
- nssm 2.1: https://www.youtube.com/watch?v=ccLUt58mo0k
- nssm 3.0: https://www.youtube.com/watch?v=ZBuAi1sQJxQ

2963
api.lua

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,14 @@
v3.0 (22-11-16):
- rewritten to add the dependency from mobs_redo. The mobs now directly use the mobs api;
- added the mobs Morlu, Morvy, Morgut, Mode, Mordain, Morwa, Morgre and Morvalar for the "Morlendor" dimension (that you can find playing with nssb);
- added the "Felucco", to spawn in the savannah;
- added the armors made from the drops of mobs (you need 3d_armor to use them);
- added two new sets of weapons:
-> bombs: you can throw and when they hit the ground they activate special functions;
-> normal weapons (like swords and axes) with special functions you can enable by typing "q";
- new tools (picks, shovels...) and drops;
- a lot of other things (new explosion function, parameters to set difficulty)...
v2.4 (01-05-16):
- new energy weapon: hellzone_grenade (It follows the target: you can shoot some of them and then activate them by pressing q);
- the mobs now honors the protected blocks and areas (Thanks to TenPlus1 for his suggestion);

146
darts.lua
View File

@ -1,5 +1,5 @@
-- arrow (duck_arrow)
nssm:register_arrow("nssm:duck_father", {
mobs:register_arrow("nssm:duck_father", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"duck_egg.png"},
@ -7,21 +7,21 @@ nssm:register_arrow("nssm:duck_father", {
-- direct hit
hit_player = function(self, player)
local pos = self.object:getpos()
nssm:duck_explosion(pos)
duck_explosion(pos)
end,
hit_mob = function(self, player)
local pos = self.object:getpos()
nssm:duck_explosion(pos)
duck_explosion(pos)
end,
hit_node = function(self, pos, node)
nssm:duck_explosion(pos)
duck_explosion(pos)
end,
})
function nssm:duck_explosion(pos)
function duck_explosion(pos)
pos.y = pos.y+1;
minetest.add_particlespawner({
amount = 10,
@ -41,7 +41,7 @@ function nssm:duck_explosion(pos)
texture = "duck_egg_fragments.png",
})
core.after(0.4, function()
for dx = -2,2 do
for dx = -1,1 do
pos = {x = pos.x+dx, y=pos.y; z=pos.z+dx}
minetest.add_particlespawner({
amount = 100,
@ -66,7 +66,7 @@ function nssm:duck_explosion(pos)
end
-- snow_arrow
nssm:register_arrow("nssm:snow_arrow", {
mobs:register_arrow("nssm:snow_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
@ -74,30 +74,35 @@ nssm:register_arrow("nssm:snow_arrow", {
-- direct hit
hit_player = function(self, player)
local pos = self.object:getpos()
nssm:ice_explosion(pos)
ice_explosion(pos)
end,
hit_mob = function(self, player)
local pos = self.object:getpos()
nssm:ice_explosion(pos)
ice_explosion(pos)
end,
hit_node = function(self, pos, node)
nssm:ice_explosion(pos)
ice_explosion(pos)
end,
})
function nssm:ice_explosion(pos)
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
minetest.set_node({x=i, y=j, z=k}, {name="default:ice"})
local p = {x=i, y=j, z=k}
local n = minetest.env: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
nssm:register_arrow("nssm:spine", {
mobs:register_arrow("nssm:spine", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"manticore_spine_flying.png"},
@ -118,8 +123,23 @@ nssm:register_arrow("nssm:spine", {
end,
})
--morbat arrow
mobs:register_arrow("nssm:morarrow", {
visual = "sprite",
visual_size = {x=0.5, y=0.5},
textures = {"morarrow.png"},
velocity= 13,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 3},
}, nil)
end,
})
-- web arrow
nssm:register_arrow("nssm:webball", {
mobs:register_arrow("nssm:webball", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"web_ball.png"},
@ -127,7 +147,7 @@ nssm:register_arrow("nssm:webball", {
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
nssm:explosion_web(p)
explosion_web(p)
end,
hit_mob = function(self, player)
@ -138,15 +158,15 @@ nssm:register_arrow("nssm:webball", {
end,
hit_node = function(self, pos, node)
nssm:explosion_web(pos)
explosion_web(pos)
end
})
function nssm:explosion_web(pos)
function explosion_web(pos)
if minetest.is_protected(pos, "") then
return
end
pos.y = nssm:round(pos.y)
pos.y = round(pos.y)
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
@ -166,8 +186,57 @@ function nssm:explosion_web(pos)
end
end
-- thick_web arrow
mobs:register_arrow("nssm:thickwebball", {
visual = "sprite",
visual_size = {x = 2, y = 2},
textures = {"thick_web_ball.png"},
velocity = 8,
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
explosion_thickweb(p)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6},
}, nil)
end,
hit_node = function(self, pos, node)
explosion_thickweb(pos)
end
})
function explosion_thickweb(pos)
if minetest.is_protected(pos, "") then
return
end
pos.y = round(pos.y)
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.env:get_node(p).name
local ontop = minetest.env: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
nssm:register_arrow("nssm:phoenix_arrow", {
mobs:register_arrow("nssm:phoenix_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
@ -186,12 +255,12 @@ nssm: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~="fire:basic_flame")) 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
if math.random(1,2)==2 then
minetest.env:set_node(pos, {name="fire:basic_flame"})
minetest.env:set_node(pos, {name="nssm:phoenix_fire"})
end
if math.random(1,6)==1 then
@ -201,14 +270,14 @@ nssm:register_arrow("nssm:phoenix_arrow", {
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n=="air" then
minetest.env:set_node(p, {name="fire:basic_flame"})
minetest.env:set_node(p, {name="nssm:phoenix_fire"})
end
end
end,
})
nssm:register_arrow("nssm:super_gas", {
mobs:register_arrow("nssm:super_gas", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
@ -216,16 +285,16 @@ nssm:register_arrow("nssm:super_gas", {
-- direct hit
hit_player = function(self, player)
local p = player:getpos()
nssm:gas_explosion(p)
gas_explosion(p)
end,
hit_node = function(self, pos, node)
nssm:gas_explosion(pos)
gas_explosion(pos)
end
})
function nssm:gas_explosion(pos)
function gas_explosion(pos)
if minetest.is_protected(pos, "") then
return
end
@ -246,7 +315,7 @@ function nssm:gas_explosion(pos)
end
--
nssm:register_arrow("nssm:roar_of_the_dragon", {
mobs:register_arrow("nssm:roar_of_the_dragon", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
@ -289,3 +358,26 @@ nssm:register_arrow("nssm:roar_of_the_dragon", {
end
end
})
mobs:register_arrow("nssm:lava_arrow", {
visual = "sprite",
visual_size = {x = 1, y = 1},
textures = {"transparent.png"},
velocity = 10,
-- direct hit
hit_player = function(self, player)
local pos = self.object:getpos()
for dy=-1, 6, 1 do
for dx=-1, 1, 2 do
for dz=-1, 1, 2 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if n~="default:lava_flowing" and not minetest.is_protected(p, "") then
minetest.set_node(p, {name="default:lava_flowing"})
end
end
end
end
end,
})

View File

@ -1 +1,6 @@
default
mobs
farming?
3d_armor?
fire
tnt

BIN
guide/source/nssm guide.odt Normal file

Binary file not shown.

102
init.lua
View File

@ -1,53 +1,66 @@
local path = minetest.get_modpath("nssm")
dofile(path.."/api.lua")
nssm = {}
nssm.mymapgenis = tonumber(minetest.setting_get('mymapgenis')) or 7
nssm.multimobs = tonumber(minetest.setting_get('multimobs')) or 1000
dofile(path.."/spawn.lua")
--Mobs
dofile(path.."/ant_queen.lua")
dofile(path.."/ant_soldier.lua")
dofile(path.."/ant_worker.lua")
dofile(path.."/black_widow.lua")
dofile(path.."/bloco.lua")
dofile(path.."/crab.lua")
dofile(path.."/crocodile.lua")
dofile(path.."/daddy_long_legs.lua")
dofile(path.."/dolidrosaurus.lua")
dofile(path.."/duck.lua")
dofile(path.."/duckking.lua")
dofile(path.."/echidna.lua")
dofile(path.."/enderduck.lua")
dofile(path.."/flying_duck.lua")
dofile(path.."/giant_sandworm.lua")
dofile(path.."/icelamander.lua")
dofile(path.."/icesnake.lua")
dofile(path.."/kraken.lua")
dofile(path.."/larva.lua")
dofile(path.."/lava_titan.lua")
dofile(path.."/manticore.lua")
dofile(path.."/mantis_beast.lua")
dofile(path.."/mantis.lua")
dofile(path.."/masticone.lua")
dofile(path.."/moonheron.lua")
dofile(path.."/night_master.lua")
dofile(path.."/octopus.lua")
dofile(path.."/phoenix.lua")
dofile(path.."/pumpboom.lua")
dofile(path.."/pumpking.lua")
dofile(path.."/sandworm.lua")
dofile(path.."/scrausics.lua")
dofile(path.."/sand_bloco.lua")
dofile(path.."/signosigno.lua")
dofile(path.."/snow_biter.lua")
dofile(path.."/spiderduck.lua")
dofile(path.."/stone_eater.lua")
dofile(path.."/swimming_duck.lua")
dofile(path.."/tarantula.lua")
dofile(path.."/uloboros.lua")
dofile(path.."/werewolf.lua")
dofile(path.."/white_werewolf.lua")
dofile(path.."/mobs/ant_queen.lua")
dofile(path.."/mobs/ant_soldier.lua")
dofile(path.."/mobs/ant_worker.lua")
dofile(path.."/mobs/black_widow.lua")
dofile(path.."/mobs/bloco.lua")
dofile(path.."/mobs/crab.lua")
dofile(path.."/mobs/crocodile.lua")
dofile(path.."/mobs/daddy_long_legs.lua")
dofile(path.."/mobs/dolidrosaurus.lua")
dofile(path.."/mobs/duck.lua")
dofile(path.."/mobs/duckking.lua")
dofile(path.."/mobs/echidna.lua")
dofile(path.."/mobs/enderduck.lua")
dofile(path.."/mobs/flying_duck.lua")
dofile(path.."/mobs/felucco.lua")
dofile(path.."/mobs/giant_sandworm.lua")
dofile(path.."/mobs/icelamander.lua")
dofile(path.."/mobs/icesnake.lua")
dofile(path.."/mobs/kraken.lua")
dofile(path.."/mobs/larva.lua")
dofile(path.."/mobs/lava_titan.lua")
dofile(path.."/mobs/manticore.lua")
dofile(path.."/mobs/mantis_beast.lua")
dofile(path.."/mobs/mantis.lua")
dofile(path.."/mobs/masticone.lua")
dofile(path.."/mobs/moonheron.lua")
dofile(path.."/mobs/mordain.lua")
dofile(path.."/mobs/morgre.lua")
dofile(path.."/mobs/morde.lua")
dofile(path.."/mobs/morgut.lua")
dofile(path.."/mobs/morlu.lua")
dofile(path.."/mobs/morvalar.lua")
dofile(path.."/mobs/morvy.lua")
dofile(path.."/mobs/morwa.lua")
dofile(path.."/mobs/night_master.lua")
dofile(path.."/mobs/octopus.lua")
dofile(path.."/mobs/phoenix.lua")
dofile(path.."/mobs/pumpboom.lua")
dofile(path.."/mobs/pumpking.lua")
dofile(path.."/mobs/sandworm.lua")
dofile(path.."/mobs/scrausics.lua")
dofile(path.."/mobs/sand_bloco.lua")
dofile(path.."/mobs/signosigno.lua")
dofile(path.."/mobs/snow_biter.lua")
dofile(path.."/mobs/spiderduck.lua")
dofile(path.."/mobs/stone_eater.lua")
dofile(path.."/mobs/swimming_duck.lua")
dofile(path.."/mobs/tarantula.lua")
dofile(path.."/mobs/uloboros.lua")
dofile(path.."/mobs/werewolf.lua")
dofile(path.."/mobs/white_werewolf.lua")
--Final Boss
dofile(path.."/mese_dragon.lua")
dofile(path.."/mobs/mese_dragon.lua")
--Others
dofile(path.."/rainbow_staff.lua")
@ -56,3 +69,4 @@ 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")

View File

@ -1,48 +0,0 @@
nssm:register_mob("nssm:larva", {
type = "monster",
hp_max = 10,
hp_min = 8,
collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3},
visual = "mesh",
mesh = "larva.x",
textures = {{"larva.png"}},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
view_range = 10,
rotate = 90,
jump = false,
fear_height = 4,
jump_height =0,
walk_velocity = 0.4,
run_velocity = 0.4,
sounds = {
random = "sand",
},
damage = 1,
drops = {
{name = "nssm:life_energy",
chance = 3,
min = 1,
max = 1,},
},
metamorphosis = true,
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 4,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 0,
stand_end = 80,
walk_start = 100,
walk_end = 160,
run_start = 100,
run_end = 160,
punch_start = 180,
punch_end = 230,
}
})

View File

@ -1,82 +0,0 @@
nssm:register_mob("nssm:masticone", {
type = "monster",
hp_max = 15,
hp_min = 14,
collisionbox = {-0.45, 0.00, -0.45, 0.45, 0.40, 0.45},
visual = "mesh",
mesh = "masticone.x",
textures = {{"masticone.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 15,
lifetimer = 500,
fear_height = 4,
rotate = 270,
walk_velocity = 1.5,
run_velocity = 2.5,
sounds = {
random = "masticone",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 7,
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,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
floats=0,
hydra = true,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
reach =1.5,
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 80,
stand_end = 140,
walk_start = 20,
walk_end = 40,
run_start = 20,
run_end = 40,
punch_start = 150,
punch_end = 180,
},
on_die = function(self, pos)
core.after(2, function()
minetest.add_particlespawner(
200, --amount
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}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
local pos1 = {x=pos.x+math.random(-1,1), y=pos.y+0.5, z=pos.z+math.random(-1,1)}
local pos2 = {x=pos.x+math.random(-1,1), y=pos.y+0.5, z=pos.z+math.random(-1,1)}
minetest.add_entity(pos1, "nssm:masticone")
minetest.add_entity(pos2, "nssm:masticone")
end)
end,
})

View File

@ -1,8 +1,8 @@
nssm:register_mob("nssm:ant_queen", {
mobs:register_mob("nssm:ant_queen", {
type = "monster",
hp_max = 120,
hp_min = 120,
collisionbox = {-1, 0.00, -1, 1, 1, 1},
hp_max = 220,
hp_min = 220,
collisionbox = {-0.6, 0.00, -0.6, 0.6, 1, 0.6},
visual = "mesh",
mesh = "ant_queen.x",
textures = {{"ant_queen.png"}},
@ -39,11 +39,16 @@ nssm:register_mob("nssm:ant_queen", {
max = 2,},
},
reach = 8,
armor = 70,
armor = 40,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
light_damage = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=50,
stepheight=2.1,
knock_back=0,
jump_height=12,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -60,8 +65,10 @@ nssm:register_mob("nssm:ant_queen", {
},
custom_attack = function(self)
if self.timer >4 then
self.timer = 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:getpos()
local p = self.attack:getpos()
@ -78,12 +85,21 @@ nssm:register_mob("nssm:ant_queen", {
end
local pos1 = {x=s.x+math.random(-3,3), y=s.y-1, z=s.z+math.random(-3,3)}
if pos1.x~=s.x and pos1.z~=s.z then
nssm:explosion_particles(pos1, 1)
local objects = minetest.env:get_objects_inside_radius(s, 10)
for _,obj in ipairs(objects) do
if (obj:get_luaentity() and obj:get_luaentity().name == "nssm:ant_soldier") then
counter = counter + 1
end
end
if ((pos1.x~=s.x) and (pos1.z~=s.z))
and (minetest.env:get_node(pos1).name == "air")
and (counter < 4)
then
explosion_particles(pos1, 1)
minetest.add_entity(pos1, "nssm:ant_soldier")
end
end
end
end
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:ant_soldier", {
mobs:register_mob("nssm:ant_soldier", {
type = "monster",
hp_max = 20,
hp_min = 20,
hp_max = 32,
hp_min = 24,
collisionbox = {-0.49, 0.00, -0.49, 0.49, 0.9, 0.49},
visual = "mesh",
mesh = "ant_soldier.x",
@ -10,13 +10,13 @@ nssm:register_mob("nssm:ant_soldier", {
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 1.5,
walk_velocity = 0.5,
run_velocity = 3,
rotate = 270,
rotate = 270,
sounds = {
random = "ant",
},
damage = 4,
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -31,14 +31,23 @@ nssm:register_mob("nssm:ant_soldier", {
chance = 3,
min = 1,
max = 2,},
{name = "nssm:ant_hard_skin",
chance = 3,
min = 1,
max = 2,},
},
reach = 2,
armor = 90,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
light_damage = 0,
on_rightclick = nil,
group_attack=true,
attack_animals=false,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
attack_type = "dogfight",
animation = {
speed_normal = 20,

View File

@ -1,7 +1,8 @@
nssm:register_mob("nssm:ant_worker", {
type = "animal",
hp_max = 13,
hp_min = 13,
mobs:register_mob("nssm:ant_worker", {
type = "monster",
passive = true,
hp_max = 24,
hp_min = 18,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.5, 0.4},
visual = "mesh",
mesh = "ant_worker.x",
@ -10,13 +11,14 @@ nssm:register_mob("nssm:ant_worker", {
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 1.5,
walk_velocity = 0.5,
run_velocity = 2,
rotate = 270,
rotate = 270,
sounds = {
random = "ant",
},
damage = 2,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -31,14 +33,21 @@ nssm:register_mob("nssm:ant_worker", {
chance = 3,
min = 1,
max = 2,},
{name = "nssm:ant_hard_skin",
chance = 3,
min = 1,
max = 2,},
},
armor = 90,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
light_damage = 0,
on_rightclick = nil,
group_attack=true,
knock_back=4,
attack_animals=false,
blood_texture="nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 20,

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:black_widow", {
mobs:register_mob("nssm:black_widow", {
type = "monster",
hp_max = 20,
hp_max = 26,
hp_min = 19,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
@ -10,13 +10,14 @@ nssm:register_mob("nssm:black_widow", {
makes_footstep_sound = true,
view_range = 15,
fear_height = 4,
walk_velocity = 1,
walk_velocity = 0.8,
run_velocity = 2.5,
rotate = 270,
sounds = {
sounds = {
random = "black_widow",
},
damage = 3,
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -24,18 +25,27 @@ nssm:register_mob("nssm:black_widow", {
min = 1,
max = 2,},
{name = "nssm:spider_leg",
chance = 2,
chance = 3,
min = 1,
max = 8,},
{name = "nssm:web",
chance = 2,
{name = "nssm:silk_gland",
chance = 4,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 100,
armor = 70,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
@ -52,6 +62,6 @@ nssm:register_mob("nssm:black_widow", {
punch_end = 160,
},
do_custom = function(self)
nssm:webber_ability(self, "nssm:web", 3)
webber_ability(self, "nssm:web", 2)
end,
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:bloco", {
mobs:register_mob("nssm:bloco", {
type = "monster",
hp_max = 15,
hp_max = 24,
hp_min = 14,
collisionbox = {-0.56, -0.2, -0.56, 0.56, 1.2, 0.56},
visual = "mesh",
@ -10,13 +10,14 @@ nssm:register_mob("nssm:bloco", {
makes_footstep_sound = true,
view_range = 8,
fear_height = 4,
walk_velocity = 1,
walk_velocity = 0.6,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "bloco",
},
damage = 2,
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -27,12 +28,22 @@ nssm:register_mob("nssm:bloco", {
chance = 1,
min = 2,
max = 3,},
{name = "nssm:bloco_skin",
chance = 3,
min = 1,
max = 2,},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 3,
lava_damage = 1,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=0,
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}},
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,12 +1,12 @@
nssm:register_mob("nssm:crab", {
mobs:register_mob("nssm:crab", {
type = "monster",
hp_max = 17,
hp_min = 15,
hp_max = 32,
hp_min = 19,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.55, 0.5},
visual = "mesh",
mesh = "crab.x",
textures = {{"crab1.png"},{"crab2.png"}},
sounds = {
sounds = {
random = "crab",
},
visual_size = {x=3, y=3},
@ -16,7 +16,8 @@ nssm:register_mob("nssm:crab", {
fear_height = 4,
walk_velocity = 1,
run_velocity = 2,
damage = 3,
damage = 5,
reach = 2,
floats = 0,
jump = true,
drops = {
@ -32,12 +33,21 @@ nssm:register_mob("nssm:crab", {
chance = 4,
min = 1,
max = 2,},
{name = "nssm:crab_carapace_fragment",
chance = 4,
min = 1,
max = 1,},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,12 +1,12 @@
nssm:register_mob("nssm:crocodile", {
mobs:register_mob("nssm:crocodile", {
type = "monster",
hp_max = 20,
hp_max = 30,
hp_min = 15,
collisionbox = {-0.45, -0.30, -0.45, 0.45, 0.3, 0.45},
visual = "mesh",
mesh = "crocodile.x",
textures = {{"croco.png"}},
sounds = {
sounds = {
random = "crocod",
},
visual_size = {x=4, y=4},
@ -14,25 +14,34 @@ nssm:register_mob("nssm:crocodile", {
view_range = 15,
walk_velocity = 1,
run_velocity = 1,
damage = 3,
damage = 5,
floats = 1,
jump = true,
drops = {
{name = "nssm:life_energy",
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:crocodile_tail",
chance = 2,
min = 1,
max = 1,},
chance = 2,
min = 1,
max = 1,},
{name = "nssm:crocodile_skin",
chance = 3,
min = 1,
max = 1,},
},
armor = 90,
armor = 60,
drawtype = "front",
reach = 2,
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=3,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:daddy_long_legs", {
mobs:register_mob("nssm:daddy_long_legs", {
type = "monster",
hp_max = 19,
hp_max = 22,
hp_min = 16,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
visual = "mesh",
@ -9,7 +9,7 @@ nssm:register_mob("nssm:daddy_long_legs", {
visual_size = {x=8, y=8},
makes_footstep_sound = true,
view_range = 12,
walk_velocity = 1.5,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3.3,
rotate = 90,
@ -27,12 +27,21 @@ nssm:register_mob("nssm:daddy_long_legs", {
chance = 3,
min = 1,
max = 8,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 100,
armor = 70,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:dolidrosaurus", {
mobs:register_mob("nssm:dolidrosaurus", {
type = "monster",
hp_max = 26,
hp_max = 46,
hp_min = 23,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.52, 0.5},
visual = "mesh",
@ -12,27 +12,35 @@ nssm:register_mob("nssm:dolidrosaurus", {
fly = true,
fly_in = "default:water_source",
fall_speed = -20,
walk_velocity = 2,
run_velocity = 3,
damage = 4,
walk_velocity = 1.5,
run_velocity = 3.3,
damage = 5,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "quo",
random = "crocod",
},
drops = {
{name = "nssm:life_energy",
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
{name = "nssm:dolidrosaurus_fin",
chance = 2,
min = 1,
max = 3,},
},
armor = 80,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=3,
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:duck", {
mobs:register_mob("nssm:duck", {
type = "monster",
hp_max = 10,
hp_max = 12,
hp_min = 7,
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.95, 0.3},
visual = "mesh",
@ -12,7 +12,7 @@ nssm:register_mob("nssm:duck", {
walk_velocity = 1,
reach =1.5,
run_velocity = 2,
damage = 1,
damage = 2,
jump = true,
sounds = {
random = "duck",
@ -30,6 +30,10 @@ nssm:register_mob("nssm:duck", {
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 3,
min = 2,
max = 4,},
},
armor = 100,
drawtype = "front",
@ -38,6 +42,10 @@ nssm:register_mob("nssm:duck", {
floats = 1,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=5,
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -52,4 +60,5 @@ nssm:register_mob("nssm:duck", {
punch_start = 40,
punch_end = 60,
}
--pathfinding = 1,
})

View File

@ -1,8 +1,8 @@
nssm:register_mob("nssm:duckking", {
mobs:register_mob("nssm:duckking", {
type = "monster",
hp_max = 80,
hp_min = 77,
collisionbox = {-1.5, -0.25, -1.5, 1.5, 4.95, 1.5},
hp_max = 180,
hp_min = 180,
collisionbox = {-1.2, -0.25, -1.2, 1.2, 4, 1.2},
visual = "mesh",
mesh = "king_duck.x",
textures = {{"king_duck.png"}},
@ -15,7 +15,7 @@ nssm:register_mob("nssm:duckking", {
walk_velocity = 1,
fear_height = 4,
run_velocity = 2,
damage = 5,
damage = 8,
jump = true,
sounds = {
random = "duckking",
@ -30,16 +30,20 @@ nssm:register_mob("nssm:duckking", {
chance = 1,
min = 40,
max = 50,},
{name = "nssm:king_duck_crown",
{name = "nssm:helmet_crown",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:duck_beak",
chance = 5,
chance = 4,
min = 10,
max = 20,},
{name = "nssm:duck_feather",
chance = 3,
min = 20,
max = 40,},
},
armor = 80,
armor = 50,
drawtype = "front",
water_damage = 0,
floats = 1,
@ -47,11 +51,16 @@ nssm:register_mob("nssm:duckking", {
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_stop = true,
arrow = "nssm:duck_father";
reach = 3,
shoot_interval=3,
shoot_offset =-1,
dogshoot_switch = true,
dogshoot_count_max = 9,
blood_texture="nssm_blood.png",
blood_amount=50,
stepheight=2.1,
knock_back=0,
jump_height=12,
arrow = "nssm:duck_father",
shoot_interval=3,
shoot_offset =-1,
animation = {
speed_normal = 15,
speed_run = 25,
@ -63,7 +72,7 @@ nssm:register_mob("nssm:duckking", {
run_end = 40,
punch_start = 190,
punch_end = 220,
dattack_start = 160,
dattack_end = 180,
shoot_start = 160,
shoot_end = 180,
}
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:echidna", {
mobs:register_mob("nssm:echidna", {
type = "monster",
hp_max = 90,
hp_min = 90,
hp_max = 240,
hp_min = 240,
collisionbox = {-0.6, 0.00, -0.6, 0.6, 2, 0.6},
visual = "mesh",
mesh = "echidna.x",
@ -14,7 +14,7 @@ nssm:register_mob("nssm:echidna", {
fear_height = 4,
walk_velocity = 2,
run_velocity = 3.5,
damage = 10,
damage = 12,
jump = true,
sounds = {
random = "echidna",
@ -29,15 +29,20 @@ nssm:register_mob("nssm:echidna", {
min = 1,
max = 1,},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 0,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="nssm_blood.png",
blood_amount=10,
stepheight=1.1,
knock_back=0,
jump_height=8,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_stop = true,
dogshoot_switch = true,
arrow = "nssm:super_gas";
reach = 5,
shoot_interval=3,
@ -52,7 +57,7 @@ nssm:register_mob("nssm:echidna", {
run_end = 40,
punch_start = 160,
punch_end = 190,
dattack_start = 200,
dattack_end = 240,
shoot_start = 200,
shoot_end = 240,
}
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:enderduck", {
mobs:register_mob("nssm:enderduck", {
type = "monster",
hp_max = 20,
hp_max = 28,
hp_min = 18,
collisionbox = {-0.28, 0.00, -0.28, 0.28, 1.8, 0.28},
visual = "mesh",
@ -13,10 +13,11 @@ nssm:register_mob("nssm:enderduck", {
fear_height = 4,
run_velocity = 3.9,
rotate = 270,
sounds = {
sounds = {
random = "duck",
},
damage = 3,
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -27,17 +28,27 @@ nssm:register_mob("nssm:enderduck", {
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 = 100,
armor = 80,
drawtype = "front",
water_damage = 1,
floats=1,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
jump_height=12,
stepheight=2.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

62
mobs/felucco.lua Normal file
View File

@ -0,0 +1,62 @@
mobs:register_mob("nssm:felucco", {
type = "monster",
hp_max = 36,
hp_min = 27,
collisionbox = {-0.5, 0, -0.5, 0.5, 1.2, 0.5},
visual = "mesh",
mesh = "felucco.x",
textures = {{"felucco.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 1,
fear_height = 4,
run_velocity = 5,
sounds = {
random = "felucco",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4},
{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,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 20,
stand_end = 80,
walk_start = 90,
walk_end = 130,
run_start = 140,
run_end = 160,
punch_start = 200,
punch_end = 240,
}
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:flying_duck", {
mobs:register_mob("nssm:flying_duck", {
type = "monster",
hp_max = 15,
hp_min = 14,
hp_max = 20,
hp_min = 10,
collisionbox = {-0.3, -0.2, -0.3, 0.3, 0.2, 0.3},
visual = "mesh",
mesh = "nathan_petrelli.x",
@ -10,12 +10,13 @@ nssm:register_mob("nssm:flying_duck", {
view_range = 30,
walk_velocity = 2,
run_velocity = 2.5,
fall_speed = 0,
stepheight = 3,
sounds = {
fall_speed = 0,
stepheight = 3,
sounds = {
random = "duck",
},
damage = 2,
damage = 3,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -30,14 +31,22 @@ nssm:register_mob("nssm:flying_duck", {
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 2,
min = 4,
max = 8,},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=5,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:giant_sandworm", {
mobs:register_mob("nssm:giant_sandworm", {
type = "monster",
hp_max = 130,
hp_min = 120,
hp_max = 330,
hp_min = 330,
collisionbox = {-1.2, 0, -1.2, 1.2, 4.5, 1.2},
visual = "mesh",
mesh = "giant_sandworm.x",
@ -13,27 +13,35 @@ nssm:register_mob("nssm:giant_sandworm", {
reach = 8,
walk_velocity = 0,
run_velocity = 0,
damage = 8,
damage = 12,
jump = false,
drops = {
{name = "nssm:worm_flesh",
chance = 1,
min = 20,
max = 30,},
{name = "nssm:sandworm_skin",
chance = 2,
min = 3,
max = 12,},
{name = "nssm:life_energy",
chance = 1,
min = 7,
max = 8,},
{name = "nssm:black_sand",
{name = "nssm:digested_sand",
chance = 1,
min = 1,
max = 1,},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 5,
lava_damage = 3,
light_damage = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=50,
knock_back=0,
jump_height=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -48,5 +56,4 @@ nssm:register_mob("nssm:giant_sandworm", {
punch_start = 150,
punch_end = 180,
},
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:icelamander", {
mobs:register_mob("nssm:icelamander", {
type = "monster",
hp_max = 90,
hp_min = 90,
hp_max = 230,
hp_min = 230,
collisionbox = {-0.5, 0, -0.5, 0.5, 2.3, 0.5},
visual = "mesh",
mesh = "icelamander.x",
@ -16,7 +16,7 @@ nssm:register_mob("nssm:icelamander", {
sounds = {
random = "icelamander",
},
damage = 8,
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -35,17 +35,26 @@ nssm:register_mob("nssm:icelamander", {
chance = 1,
min = 0,
max = 20},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 1},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
light_damage = 0,
on_rightclick = nil,
dogshoot_stop = true,
attack_type = "dogshoot",
dogshoot_switch = true,
blood_texture="nssm_blood.png",
blood_amount=20,
stepheight=1.1,
knock_back=0,
jump_height=8,
dogshoot_count_max = 7,
arrow = "nssm:snow_arrow",
reach = 3,
shoot_interval = 2,
animation = {
speed_normal = 15,
@ -58,10 +67,10 @@ nssm:register_mob("nssm:icelamander", {
run_end = 80,
punch_start = 160,
punch_end = 190,
dattack_start = 190,
dattack_end = 210,
shoot_start = 190,
shoot_end = 210,
},
do_custom = function(self)
nssm:midas_ability(self, "default:ice", self.run_velocity,1, 3)
midas_ability(self, "default:ice", self.run_velocity,1, 3)
end,
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:icesnake", {
mobs:register_mob("nssm:icesnake", {
type = "monster",
hp_max = 17,
hp_min = 13,
hp_max = 27,
hp_min = 17,
collisionbox = {-0.7, 0, -0.7, 0.7, 0.50, 0.7},
visual = "mesh",
mesh = "icesnake.x",
@ -13,10 +13,11 @@ nssm:register_mob("nssm:icesnake", {
fear_height = 3,
walk_velocity = 1.2,
run_velocity = 3,
sounds = {
sounds = {
random = "icesnake",
},
damage = 3,
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -24,19 +25,28 @@ nssm:register_mob("nssm:icesnake", {
min = 1,
max = 2},
{name = "nssm:frosted_amphibian_heart",
chance = 1,
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 = 100,
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 20,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -52,6 +62,6 @@ nssm:register_mob("nssm:icesnake", {
punch_end = 160,
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
putting_ability(self, "default:ice", self.run_velocity)
end,
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:kraken", {
mobs:register_mob("nssm:kraken", {
type = "monster",
hp_max = 150,
hp_min = 150,
hp_max = 350,
hp_min = 350,
collisionbox = {-2, 0, -2, 2, 4, 2},
visual = "mesh",
mesh = "kraken.x",
@ -15,12 +15,12 @@ nssm:register_mob("nssm:kraken", {
fall_speed = -1,
walk_velocity = 3.5,
run_velocity = 4.5,
damage = 8,
damage = 14,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
sounds = {
random = "kraken",
},
drops = {
@ -37,11 +37,14 @@ nssm:register_mob("nssm:kraken", {
min = 1,
max = 1,},
},
armor = 70,
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
blood_texture="nssm_blood_blue.png",
blood_amount=100,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
reach=8,

87
mobs/larva.lua Normal file
View File

@ -0,0 +1,87 @@
mobs:register_mob("nssm:larva", {
type = "monster",
hp_max = 12,
hp_min = 8,
collisionbox = {-0.3, 0, -0.3, 0.3, 0.41, 0.3},
visual = "mesh",
mesh = "larva.x",
textures = {{"larva.png"}},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
view_range = 10,
rotate = 90,
jump = false,
fear_height = 4,
jump_height =0,
walk_velocity = 0.4,
run_velocity = 0.4,
sounds = {
random = "sand",
},
damage = 1,
reach = 1,
drops = {
{name = "nssm:life_energy",
chance = 3,
min = 1,
max = 1,},
{name = "nssm:larva_meat",
chance = 2,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 4,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 0,
stand_end = 80,
walk_start = 100,
walk_end = 160,
run_start = 100,
run_end = 160,
punch_start = 180,
punch_end = 230,
},
do_custom = function (self)
self.metatimer = (self.metatimer) or os.time()
if os.time() - self.metatimer >20 then
minetest.log("action",
"metatimer expired, metamorphosis! ")
local pos=self.object:getpos()
self.object:remove()
minetest.add_particlespawner(
200, --amount
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}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"tnt_smoke.png" --texture
)
if math.random(1,2)==1 then
minetest.add_entity(pos, "nssm:mantis")
else
minetest.add_entity(pos, "nssm:mantis_beast")
end
return
end
end
})

View File

@ -1,23 +1,23 @@
nssm:register_mob("nssm:lava_titan", {
mobs:register_mob("nssm:lava_titan", {
type = "monster",
hp_max = 80,
hp_min = 80,
collisionbox = {-0.6, -0.05, -0.6, 0.6, 4.0, 0.6},
hp_max = 180,
hp_min = 180,
collisionbox = {-0.45, -0.05, -0.45, 0.45, 1.8, 0.45},
visual = "mesh",
mesh = "lava_titan.x",
textures = {{"lava_titan.png"}},
visual_size = {x=4, y=4},
visual_size = {x=2.7, y=2.7},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
lifetimer = 500,
walk_velocity = 1,
run_velocity = 2,
walk_velocity = 0.5,
run_velocity = 1.3,
floats = 1,
sounds = {
sounds = {
random = "lava_titan",
},
damage = 7,
damage = 8,
jump = false,
jump_height=0,
drops = {
@ -34,22 +34,23 @@ nssm:register_mob("nssm:lava_titan", {
min = 1,
max = 3,},
},
armor = 40,
armor = 20,
drawtype = "front",
water_damage = 4,
water_damage = 25,
rotate = 270,
melter = true,
light_damage = 0,
lava_damage = 0,
on_rightclick = nil,
floats = 1,
floats = 0,
blood_texture="stone_blood.png",
blood_amount=50,
knock_back=0,
attack_type = "dogshoot",
dogshoot_stop = true,
dogshoot_switch = true,
arrow = "nssm:lava_arrow",
reach = 3,
shoot_interval = 2,
shoot_offset = -1,
true_dist_attack = true,
shoot_offset = 0,
--[[
on_dist_attack = function(self, player)
local pos = player:getpos()
for dy=-1, 6, 1 do
@ -64,9 +65,10 @@ nssm:register_mob("nssm:lava_titan", {
end
end
end,
]]
animation = {
speed_normal = 25,
speed_run = 25,
speed_run = 45,
stand_start = 120,
stand_end = 300,
walk_start = 10,
@ -75,11 +77,41 @@ nssm:register_mob("nssm:lava_titan", {
run_end = 110,
punch_start = 301,
punch_end = 340,
dattack_start =340,
dattack_end=400,
shoot_start =340,
shoot_end=400,
},
do_custom = function (self)
nssm:digging_ability(self, nil, self.run_velocity, {x=0, y=5, z=0})
nssm:putting_ability(self, "default:lava_source", self.run_velocity)
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})
--putting_ability(self, "default:lava_source", self.run_velocity)
end,
--[[
custom_attack = function (self)
digging_attack
set_animation(self, "punch")
local p2 = p
local s2 = s
p2.y = p2.y + 1.5
s2.y = s2.y + 1.5
if line_of_sight_water(self, p2, s2) == true then
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
end,
]]--
})

View File

@ -1,21 +1,21 @@
nssm:register_mob("nssm:manticore", {
mobs:register_mob("nssm:manticore", {
type = "monster",
hp_max = 25,
hp_min = 24,
hp_max = 55,
hp_min = 34,
collisionbox = {-0.8, -0.85, -0.8, 0.8, 1.9, 0.8},
visual = "mesh",
mesh = "manticore.x",
textures = {{"manticore.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 25,
view_range = 35,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
sounds = {
sounds = {
random = "manticore",
},
damage = 4,
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -26,19 +26,27 @@ nssm:register_mob("nssm:manticore", {
chance = 3,
min = 2,
max = 5,},
{name = "nssm:manticore_fur",
chance = 3,
min = 1,
max = 2,},
},
armor = 100,
armor = 60,
drawtype = "front",
water_damage = 2,
rotate = 270,
rotate = 270,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_stop = true,
dogshoot_switch = true,
arrow = "nssm:spine",
reach = 3,
shoot_interval = 2,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
shoot_offset = 1,
animation = {
speed_normal = 25,
@ -51,7 +59,7 @@ nssm:register_mob("nssm:manticore", {
run_end = 108,
punch_start = 110,
punch_end = 143,
dattack_start =180,
dattack_end=230,
shoot_start =180,
shoot_end=230,
}
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:mantis", {
mobs:register_mob("nssm:mantis", {
type = "monster",
hp_max = 15,
hp_min = 14,
hp_max = 31,
hp_min = 24,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 2.30, 0.5},
visual = "mesh",
mesh = "mantis.x",
@ -15,7 +15,7 @@ nssm:register_mob("nssm:mantis", {
sounds = {
random = "manti",
},
damage = 2,
damage = 4,
jump = true,
drops = {
{name = "nssm:mantis_claw",
@ -26,14 +26,27 @@ nssm:register_mob("nssm:mantis", {
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 = 100,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
mele_number =2,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
double_melee_attack = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -46,7 +59,7 @@ nssm:register_mob("nssm:mantis", {
run_end = 80,
punch_start = 120,
punch_end = 140,
punch1_start = 145,
punch1_end = 165,
punch2_start = 145,
punch2_end = 165,
}
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:mantis_beast", {
mobs:register_mob("nssm:mantis_beast", {
type = "monster",
hp_max = 20,
hp_min = 17,
hp_max = 30,
hp_min = 27,
collisionbox = {-0.65, 0.00, -0.65, 0.65, 1.50, 0.65},
visual = "mesh",
mesh = "mantis_beast.x",
@ -15,7 +15,8 @@ nssm:register_mob("nssm:mantis_beast", {
sounds = {
random = "manti",
},
damage = 3,
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:mantis_claw",
@ -26,12 +27,25 @@ nssm:register_mob("nssm:mantis_beast", {
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 = 100,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

121
mobs/masticone.lua Normal file
View File

@ -0,0 +1,121 @@
mobs:register_mob("nssm:masticone", {
type = "monster",
hp_max = 25,
hp_min = 24,
collisionbox = {-0.45, 0.00, -0.45, 0.45, 0.40, 0.45},
visual = "mesh",
mesh = "masticone.x",
textures = {{"masticone.png"}},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 15,
lifetimer = 500,
fear_height = 4,
rotate = 270,
walk_velocity = 1.5,
run_velocity = 2.5,
sounds = {
random = "masticone",
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 7,
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,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
floats=0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
reach =1.5,
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 80,
stand_end = 140,
walk_start = 20,
walk_end = 40,
run_start = 20,
run_end = 40,
punch_start = 150,
punch_end = 180,
},
on_die = function(self, pos)
self.object:remove()
core.after(2, function()
minetest.add_particlespawner(
200, --amount
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}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=1, y=1, z=1}, --maxvel
{x=-0.5,y=5,z=-0.5}, --minacc
{x=0.5,y=5,z=0.5}, --maxacc
0.1, --minexptime
1, --maxexptime
3, --minsize
4, --maxsize
false, --collisiondetection
"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)}
local n = minetest.env:get_node(pos).name
if n == "air" then
minetest.add_entity(pos, "nssm:masticone")
end
end
end)
end,
do_custom = function (self)
local pos = self.object:getpos()
local n = minetest.env: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:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end
end
end,
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:mese_dragon", {
mobs:register_mob("nssm:mese_dragon", {
type = "monster",
hp_max = 333,
hp_min = 333,
hp_max = 666,
hp_min = 666,
collisionbox = {-1, 0, -1, 1, 5, 1},
visual = "mesh",
mesh = "mese_dragon.x",
@ -18,7 +18,7 @@ nssm:register_mob("nssm:mese_dragon", {
attack = "mese_dragon",
distance = 60,
},
damage = 16,
damage = 18,
jump = true,
jump_height = 10,
drops = {
@ -31,14 +31,20 @@ nssm:register_mob("nssm:mese_dragon", {
min = 99,
max = 99},
},
armor = 60,
armor = 30,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_stop = true,
dogshoot_switch = true,
blood_texture="mese_blood.png",
blood_amount=30,
stepheight=3.1,
knock_back=0,
jump_height=12,
dogshoot_count_max = 9,
arrow = "nssm:roar_of_the_dragon",
reach = 5,
shoot_interval = 3,
@ -54,13 +60,13 @@ nssm:register_mob("nssm:mese_dragon", {
run_end = 242,
punch_start = 242,
punch_end = 275,
punch1_start = 330,
punch1_end = 370,
dattack_start = 120,
dattack_end = 160,
punch2_start = 330,
punch2_end = 370,
dattack_start = 120,
dattack_end = 160,
},
do_custom = function(self)
nssm:midas_ability(self, "default:mese_block", self.run_velocity,2, 3)
midas_ability(self, "default:mese_block", self.run_velocity,2, 3)
end,
custom_attack = function(self)

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:moonheron", {
mobs:register_mob("nssm:moonheron", {
type = "monster",
hp_max = 23,
hp_max = 33,
hp_min = 22,
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.3, 0.45},
visual = "mesh",
@ -11,13 +11,13 @@ nssm:register_mob("nssm:moonheron", {
rotate = 270,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
sounds = {
fall_speed = 0,
stepheight = 3,
sounds = {
random = "moonheron",
distance =40,
},
damage = 3,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -29,11 +29,15 @@ nssm:register_mob("nssm:moonheron", {
min = 1,
max = 1,},
},
armor = 100,
armor = 70,
floats = 1,
drawtype = "front",
water_damage = 5,
lava_damage = 5,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
attack_type = "dogfight",

123
mobs/mordain.lua Normal file
View File

@ -0,0 +1,123 @@
mobs:register_mob("nssm:mordain", {
type = "monster",
hp_max = 32,
hp_min = 23,
collisionbox = {-0.5, -0.3, -0.5, 0.5, 2.7, 0.5},
visual = "mesh",
mesh = "mordain.x",
textures = {{"mordain.png"}},
visual_size = {x=3.5, y=3.5},
makes_footstep_sound = false,
view_range = 30,
fear_height = 4,
walk_velocity = 1,
run_velocity = 3.5,
rotate = 270,
sounds = {
random = "mordain",
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 1,},
{name = "nssm:slothful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 1,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
--light_damage = 2,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 20,
stand_start = 10,
stand_end = 90,
walk_start = 100,
walk_end = 140,
run_start = 170,
run_end = 200,
punch_start = 210,
punch_end = 225,
},
--pathfinding = 1,
custom_attack = function(self)
self.mordain_timer = (self.mordain_timer or os.time())
if (os.time() - self.mordain_timer) > 1 then
self.mordain_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
minetest.after(1, function()
local ty = s.y
local flag = 0
local m = 3
local v = {x=(p.x-s.x)*m, y = ty, z = (p.z-s.z)*m}
local d = {x=s.x+v.x, y = ty, z = s.z+v.z}
d.y = ty
for j = -3,3 do
ty = d.y + j
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j+1.5
flag = 1
break
end
end
while flag ~= 1 do
d.x = p.x + math.random(-m,m)
d.z = p.z + math.random(-m,m)
d.y = p.y
local dist = dist_pos(d, p)
if dist>=2 then
for j = -3,3 do
ty = d.y + j
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j+1.5
flag = 1
break
end
end
end
end
self.object:setpos(d)
end)
end
end
})

172
mobs/morde.lua Normal file
View File

@ -0,0 +1,172 @@
mobs:register_mob("nssm:morde", {
type = "monster",
hp_max = 47,
hp_min = 37,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.6, 0.4},
visual = "mesh",
rotate= 270,
mesh = "morde.x",
textures = {{"morde.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 20,
walk_velocity = 0.5,
reach =3,
run_velocity = 3.5,
damage = 6,
jump = true,
sounds = {
random = "morde",
},
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 4,},
{name = "nssm:proud_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 100,
run_end = 120,
punch_start = 130,
punch_end = 160,
},
custom_attack = function (self)
self.morde_timer = (self.morde_timer or os.time())
if (os.time() - self.morde_timer) > 1 then
self.morde_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
self.health = self.health + (self.damage*2)
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
minetest.add_particlespawner(
6, --amount
1, --time
{x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
{x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y+1)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y+1)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y+1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y+1, z=s.z-p.z}, --maxacc
0.2, --minexptime
0.3, --maxexptime
2, --minsize
3, --maxsize
false, --collisiondetection
"morparticle.png" --texture
)
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "nssm:mortick")
end,
})
minetest.register_entity("nssm:mortick", {
textures = {"mortick.png"},
hp_min = 10000,
hp_max = 10000,
armor = 100,
visual = "mesh",
mesh = "mortick.x",
visual_size = {x=3, y=3},
--lifetime = 10,
damage = 1,
on_step = function(self, dtime)
self.mortick_timer = self.mortick_timer or os.time()
self.timer = self.timer or 0
self.timer = self.timer+dtime
local s = self.object:getpos()
local s1 = {x=s.x, y = s.y-1, z = s.z}
--[[
if (os.time()-self.mortick_timer > self.lifetime) then
self.object:remove()
end
]]
--The mortick dies when he finds himself in the fire
local name = minetest.env:get_node(s1).name
if name == "fire:basic_flame" then
self.object:remove()
end
--Find player to attack:
self.attack = (self.attack or 0)
local objects = minetest.env:get_objects_inside_radius(s, 8)
for _,obj in ipairs(objects) do
if (obj:is_player()) then
self.attack = obj
end
end
--If found a player follow him
if self.attack ~= 0 then
local p = self.attack:getpos()
local yawp = self.attack:get_look_yaw()
local pi = math.pi
p.y = p.y + 1
p.x = p.x-math.cos(yawp)/2.5
p.z = p.z-math.sin(yawp)/2.5
local m = 10
local v = {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:
self.object:setvelocity(v)
self.object:setyaw(yaws)
--damage player every ten seconds:
if (self.timer>10) then
self.timer = 0
self.attack:set_hp(self.attack:get_hp() - self.damage)
end
end
end
})

57
mobs/morgre.lua Normal file
View File

@ -0,0 +1,57 @@
mobs:register_mob("nssm:morgre", {
type = "monster",
hp_max = 33,
hp_min = 17,
collisionbox = {-0.20, -0.1, -0.20, 0.20, 1.60, 0.20},
visual = "mesh",
mesh = "morgre.x",
rotate = 270,
textures = {{"morgre.png"}},
visual_size = {x=5, y=5},
explosion_radius = 4,
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 3.5,
sounds = {
explode = "tnt_explode",
random = "morgre1",
},
damage = 1,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:greedy_soul_fragment",
chance = 5,
min = 1,
max = 1,},
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 120,
run_end = 140,
punch_start = 100,
punch_end = 110,
}
})

187
mobs/morgut.lua Normal file
View File

@ -0,0 +1,187 @@
mobs:register_mob("nssm:morgut", {
type = "monster",
hp_max = 35,
hp_min = 28,
collisionbox = {-0.3, -0.1, -0.3, 0.3, 1.8, 0.3},
visual = "mesh",
rotate= 270,
mesh = "morgut.x",
textures = {{"morgut.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 26,
walk_velocity = 0.5,
reach =2,
run_velocity = 4,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morgut",
},
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 3,},
{name = "nssm:gluttonous_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 70,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 100,
run_end = 120,
punch_start = 130,
punch_end = 160,
},
do_custom = function (self)
self.flag = (self.flag or 0)
if self.inv_flag ~= 1 then
self.inventory = {}
for i=1,32 do
self.inventory[i]={name = '', num = 0}
end
end
self.inv_flag = (self.inv_flag or 1)
if self.flag == 1 then
self.state = ""
set_animation(self, "run")
self.object:setyaw(self.dir)
set_velocity(self, 4)
if os.time() - self.morgut_timer > 3 then
self.flag = 0
self.state = "stand"
end
end
end,
custom_attack = function (self)
self.curr_attack = (self.curr_attack or self.attack)
self.morgut_timer = (self.morgut_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morgut_timer) > 1 then
if self.attack then
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 2
minetest.add_particlespawner(
6, --amount
1, --time
{x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
{x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --maxacc
0.2, --minexptime
0.3, --maxexptime
2, --minsize
3, --maxsize
false, --collisiondetection
"roasted_duck_legs.png" --texture
)
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
--minetest.chat_send_all("Inventory empty")
else
for i = 1,32 do
--minetest.chat_send_all("Inventory is not empty")
local items = player_inv:get_stack('main', i)
local n = items:get_name()
if minetest.get_item_group(n, "eatable")==1 then
local index
local found = 0
for j = 1,32 do
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
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
set_animation(self, "run")
self.flag = 1
self.morgut_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_yaw()
self.dir = pyaw
self.object:setyaw(pyaw)
if self then
set_velocity(self, 4)
end
end
end
end,self)
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
if (self.inventory ~= nil) then
local elem
for i = 1,32 do
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)
obj:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end,
})

243
mobs/morlu.lua Normal file
View File

@ -0,0 +1,243 @@
mobs:register_mob("nssm:morlu", {
type = "monster",
hp_max = 36,
hp_min = 26,
collisionbox = {-0.3, -0.1, -0.3, 0.3, 0.6, 0.3},
visual = "mesh",
rotate= 270,
mesh = "morlu.x",
textures = {{"morlu.png"}},
visual_size = {x=7, y=7},
makes_footstep_sound = true,
view_range = 28,
walk_velocity = 0.5,
reach =2,
run_velocity = 4,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morlu1",
random = "morlu2"
},
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:lustful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 40,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 50,
run_end = 90,
punch_start = 100,
punch_end = 130,
},
do_custom = function (self)
self.flag = (self.flag or 0)
if self.inv_flag ~= 1 then
self.inventory = {}
self.invnum = 0
for i=1,6 do
self.inventory[i]={name = ''}
end
end
self.inv_flag = (self.inv_flag or 1)
if self.flag == 1 then
self.state = ""
set_animation(self, "run")
self.object:setyaw(self.dir)
set_velocity(self, 4)
if os.time() - self.morlu_timer > 3 then
self.flag = 0
self.state = "stand"
end
end
end,
custom_attack = function (self)
self.curr_attack = (self.curr_attack or self.attack)
self.morlu_timer = (self.morlu_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morlu_timer) > 1 then
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 1
if self.attack:is_player() 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 player_inv = minetest.get_inventory({type='player', name = pname})
if player_inv:is_empty('armor') then
-- punch player if he doesn't own an armor
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
else
local armor_elements = {}
local armor_num = 0
local steal_pos
for i=1,6 do
local armor_stack = player_inv:get_stack("armor", i)
local armor_item = armor_stack:get_name()
if armor_stack:get_count() > 0 then
armor_elements[armor_num]={name=armor_item, pos=i}
armor_num = armor_num + 1
end
end
if armor_num > 0 then
steal_pos = math.random(1,armor_num)
steal_pos = steal_pos-1
--[[for i=0,armor_num-1 do
minetest.chat_send_all("Posizione: "..armor_elements[i].pos.." Oggetto: "..armor_elements[i].name)
end
]]
--minetest.chat_send_all("Selezionato: pos: "..armor_elements[steal_pos].pos.." nome: "..armor_elements[steal_pos].name)
local cpos = string.find(armor_elements[steal_pos].name, ":")
--minetest.chat_send_all("Posizione dei due punti: "..cpos)
local mod_name = string.sub(armor_elements[steal_pos].name, 0, cpos-1)
local nname = string.sub(armor_elements[steal_pos].name, cpos+1)
--minetest.chat_send_all("Armor Mod name: "..mod_name)
if mod_name == "3d_armor" then
nname = "3d_armor_inv_"..nname..".png"
elseif mod_name == "nssm" then
nname = "inv_"..nname..".png"
else
nname = "3d_armor_inv_chestplate_diamond.png"
end
--minetest.chat_send_all("Nome della texture: "..nname)
minetest.add_particlespawner(
1, --amount
1, --time
{x=p.x, y=p.y+1, z=p.z}, --minpos
{x=p.x, y=p.y+1, z=p.z}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --maxacc
0.5, --minexptime
0.5, --maxexptime
10, --minsize
10, --maxsize
false, --collisiondetection
nname --texture
)
minetest.after(1, function (self)
if self then
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
armor_stack:take_item()
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:set_player_armor(self.attack, self.attack)
--armor:update_armor(self.attack)
armor:update_inventory(self.attack)
--armor:update_player_visuals(self.attack)
--Update personal inventory of armors:
if (self.invnum ~= nil) and (self.invnum <= 5) then
--minetest.chat_send_all("Invnum: "..self.invnum)
--minetest.chat_send_all("Salvo: "..armor_elements[steal_pos].name)
self.invnum = self.invnum + 1
self.inventory[self.invnum].name = armor_elements[steal_pos].name
end
set_animation(self, "run")
self.flag = 1
self.morlu_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_yaw()
self.dir = pyaw
self.object:setyaw(pyaw)
if self then
set_velocity(self, 4)
end
end
end,self)
end
end
else
local s = self.object:getpos()
local p = self.attack:getpos()
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
end
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
if (self.inventory ~= nil) then
if self.invnum > 0 then
for i=1,self.invnum do
local items = ItemStack(self.inventory[i].name.." 1")
local obj = minetest.add_item(pos, items)
obj:setvelocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end,
})

925
mobs/morvalar.lua Normal file
View File

@ -0,0 +1,925 @@
local time_limit = 120
posmorvalarblock = {x=827, y=-30094, z=-817}
function respawn_block(self)
--start a timer if it doesn't exist
self.stop_timer = self.stop_timer or os.time()
--create a variable to record the hp if it doesn't exist
self.hp_record = self.hp_record or self.health
if self.hp_record ~= self.health then
self.stop_timer = os.time()
self.hp_record = self.health
else
if os.time() - self.stop_timer > time_limit then
minetest.chat_send_all("Time is over!")
self.object:remove()
minetest.set_node(posmorvalarblock, {name="nssb:morvalar_block"})
end
end
end
mobs:register_mob("nssm:morvalar", {
type = "monster",
hp_max = 100,
hp_min = 100,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach =3,
run_velocity = 3.2,
damage = 8,
runaway = true,
jump = true,
sounds = {
random = "morvalar7",
},
armor = 50,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 5,
stand_end = 6,
walk_start = 10,
walk_end = 50,
run_start = 10,
run_end = 50,
punch_start = 55,
punch_end = 80,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function (self)
self.curr_attack = (self.curr_attack or self.attack)
self.morvalar_timer = (self.morvalar_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morvalar_timer) > 2 then
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 1
if self.attack:is_player() 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 player_inv = minetest.get_inventory({type='player', name = pname})
if player_inv:is_empty('armor') then
-- punch player if he doesn't own an armor
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
else
local armor_elements = {}
local armor_num = 0
local steal_pos
for i=1,6 do
local armor_stack = player_inv:get_stack("armor", i)
local armor_item = armor_stack:get_name()
if armor_stack:get_count() > 0 then
armor_elements[armor_num]={name=armor_item, pos=i}
armor_num = armor_num + 1
end
end
if armor_num > 0 then
steal_pos = math.random(1,armor_num)
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 nname = string.sub(armor_elements[steal_pos].name, cpos+1)
if mod_name == "3d_armor" then
nname = "3d_armor_inv_"..nname..".png"
elseif mod_name == "nssm" then
nname = "inv_"..nname..".png"
else
nname = "3d_armor_inv_chestplate_diamond.png"
end
minetest.add_particlespawner(
1, --amount
1, --time
{x=p.x, y=p.y+1, z=p.z}, --minpos
{x=p.x, y=p.y+1, z=p.z}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --maxacc
0.5, --minexptime
0.5, --maxexptime
10, --minsize
10, --maxsize
false, --collisiondetection
nname --texture
)
minetest.after(1, function (self)
local armor_stack = player_inv:get_stack("armor", armor_elements[steal_pos].pos)
armor_stack:take_item()
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:set_player_armor(self.attack, self.attack)
armor:update_inventory(self.attack)
end,self)
end
end
else
local s = self.object:getpos()
local p = self.attack:getpos()
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
end
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar6", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar6", {
type = "monster",
hp_max = 120,
hp_min = 120,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach =4,
run_velocity = 3.2,
damage = 8,
runaway = true,
jump = true,
sounds = {
random = "morvalar6",
},
armor = 50,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 85,
stand_end = 86,
walk_start = 90,
walk_end = 130,
run_start = 90,
run_end = 130,
punch_start = 132,
punch_end = 162,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function (self)
self.morvalar6_timer = (self.morvalar6_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morvalar6_timer) > 1 then
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 2
minetest.after(1, function (self)
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
--minetest.chat_send_all("Inventory empty")
else
local imhungry = 0
for i = 1,32 do
--minetest.chat_send_all("Inventory is not empty")
local items = player_inv:get_stack('main', i)
local n = items:get_name()
if minetest.get_item_group(n, "eatable")==1 then
imhungry = 1
for t = 0,2 do
items:take_item()
end
player_inv:set_stack('main', i, items)
end
end
if imhungry == 0 then
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
else
s.y = s.y+1.8
minetest.add_particlespawner(
1, --amount
1, --time
{x=p.x, y=p.y+1, z=p.z}, --minpos
{x=p.x, y=p.y+1, z=p.z}, --maxpos
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
{x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --minacc
{x=s.x-p.x, y=s.y-p.y-1, z=s.z-p.z}, --maxacc
0.5, --minexptime
0.5, --maxexptime
10, --minsize
10, --maxsize
false, --collisiondetection
"roasted_duck_legs.png" --texture
)
end
self.morvalar6_timer = os.time()
end
end
end,self)
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar5", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar5", {
type = "monster",
hp_max = 130,
hp_min = 130,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach =6,
run_velocity = 3.2,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morvalar5",
},
armor = 40,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 165,
stand_end = 166,
walk_start = 170,
walk_end = 210,
run_start = 170,
run_end = 210,
punch_start = 215,
punch_end = 245,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function (self)
self.morvalar5_timer = (self.morvalar5_timer or os.time())
self.dir = (self.dir or 0)
if (os.time() - self.morvalar5_timer) > 2 then
local s = self.object:getpos()
local p = self.attack:getpos()
minetest.after(2, function(self)
set_animation(self, "punch")
tnt_boom_nssm(p, {damage_radius=6,radius=5,ignore_protection=false})
self.morvalar5_timer = os.time()
end,self)
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar4", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar4", {
type = "monster",
hp_max = 100,
hp_min = 100,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach = 3,
run_velocity = 3.2,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morvalar4",
},
armor = 30,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 250,
stand_end = 251,
walk_start = 255,
walk_end = 295,
run_start = 255,
run_end = 295,
punch_start = 300,
punch_end = 320,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function(self)
self.morvalar4_timer = (self.morvalar4_timer or os.time())
if (os.time() - self.morvalar4_timer) > 1 then
self.morvalar4_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
minetest.after(1.4, function()
local ty = s.y
local flag = 0
local m = 3
local v = {x=(p.x-s.x)*m, y = ty, z = (p.z-s.z)*m}
local d = {x=s.x+v.x, y = ty, z = s.z+v.z}
d.y = ty
for j = -3,3 do
ty = d.y + j
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j+1.5
flag = 1
break
end
end
while flag ~= 1 do
d.x = p.x + math.random(-m,m)
d.z = p.z + math.random(-m,m)
d.y = p.y
local dist = dist_pos(d, p)
if dist>=2 then
for j = -3,3 do
ty = d.y + j
local current = minetest.env:get_node({x = d.x, y = ty, z = d.z}).name
local up = minetest.env:get_node({x = d.x, y = ty+1, z = d.z}).name
if up == "air" and current ~= "air" then
d.y = d.y + j+1.5
flag = 1
break
end
end
end
end
self.object:setpos(d)
end)
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar3", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar3", {
type = "monster",
hp_max = 120,
hp_min = 120,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach = 3,
run_velocity = 3.2,
damage = 16,
runaway = true,
jump = true,
sounds = {
random = "morvalar3",
},
armor = 30,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:morarrow",
shoot_interval = 2,
shoot_offset = 0,
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 325,
stand_end = 326,
walk_start = 330,
walk_end = 370,
run_start = 330,
run_end = 370,
punch_start = 375,
punch_end = 395,
shoot_start = 400,
shoot_end = 450,
},
do_custom = function(self)
respawn_block(self)
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar2", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar2", {
type = "monster",
hp_max = 90,
hp_min = 90,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach = 6,
run_velocity = 3.2,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morvalar2",
},
armor = 50,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 455,
stand_end = 456,
walk_start = 460,
walk_end = 500,
run_start = 460,
run_end = 500,
punch_start = 505,
punch_end = 545,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function(self)
self.morvalar2_timer = (self.morvalar2_timer or os.time())
if (os.time() - self.morvalar2_timer) > 1 then
self.morvalar2_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
local counter = 0
local objects = minetest.env:get_objects_inside_radius(s, 7)
for _,obj in ipairs(objects) do
if obj:get_luaentity() then
local name = obj:get_luaentity().name
if (name == "nssm:mordain" or name == "nssm:morde" or name == "nssm:morgut" or name == "nssm:morgre" or name == "nssm:morlu" or name == "nssm:morwa" or name == "nssm:morvy") then
counter = counter + 1
end
end
end
minetest.chat_send_all("Ne ho contati: "..counter)
if counter < 2 then
set_animation(self, "punch")
local v = vector.subtract(p,s)
--local v = {x = s.x-p.x, y = s.y-p.y , z= s.z-p.z}
v = vector.normalize(v)
local per = perpendicular_vector(v)
local p1 = vector.add(s,v)
p1 = vector.subtract(p1,vector.multiply(per,4))
add_entity_and_particles("nssm:morwa", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:mordain", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:morgre", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:morlu", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:morgut", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:morde", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
add_entity_and_particles("nssm:morvy", p1, "morparticle.png", 1)
p1 = vector.add(p1,per)
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar1", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar1", {
type = "monster",
hp_max = 160,
hp_min = 160,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach = 6,
run_velocity = 3.2,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "morvalar1",
},
armor = 20,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 550,
stand_end = 551,
walk_start = 560,
walk_end = 600,
run_start = 560,
run_end = 600,
punch_start = 610,
punch_end = 640,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function (self)
self.morvalar1_timer = (self.morvalar1_timer or os.time())
if (os.time() - self.morvalar1_timer) > 3 then
self.morvalar1_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
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
-- play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
end
-- punch player
self.health = self.health + (self.damage*3)
self.attack:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=self.damage}
}, nil)
end
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
add_entity_and_particles("nssm:morvalar0", pos, "morparticle.png", 10)
end,
})
mobs:register_mob("nssm:morvalar0", {
type = "monster",
hp_max = 100,
hp_min = 100,
collisionbox = {-0.4, -0.1, -0.4, 0.4, 1.8, 0.4},
visual = "mesh",
--rotate= 270,
mesh = "morvalar.x",
textures = {{"morvalar.png"}},
visual_size = {x=5, y=5},
makes_footstep_sound = true,
view_range = 50,
walk_velocity = 1.6,
reach = 16,
run_velocity = 3.2,
damage = 4,
runaway = true,
jump = true,
sounds = {
random = "kamehameha",
},
drops = {
{name = "nssm:death_scythe",
chance = 1,
min = 1,
max = 1,},
},
armor = 30,
drawtype = "front",
water_damage = 0,
fear_height = 4,
floats = 1,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
blood_amount=10,
knock_back=0,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 645,
stand_end = 646,
walk_start = 650,
walk_end = 690,
run_start = 650,
run_end = 690,
punch_start = 700,
punch_end = 750,
},
do_custom = function(self)
respawn_block(self)
end,
custom_attack = function (self)
self.morvalar1_timer = (self.morvalar1_timer or os.time())
if (os.time() - self.morvalar1_timer) > 1 then
self.morvalar1_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
set_animation(self, "punch")
local m = 5 --velocity of the kamehameha
local obj = minetest.add_entity(s, "nssm:kamehameha_bad")
s.y = s.y+0.5
p.y = p.y+0.9
local dir = {x=(p.x-s.x)*m, y=(p.y-s.y)*m, z=(p.z-s.z)*m} --direction of the kamehameha
obj:setvelocity(dir)
end
end,
on_die = function(self)
local pos = self.object:getpos()
self.object:remove()
minetest.add_particlespawner({
amount = 500,
time = 2,
minpos = {x=pos.x-2, y=pos.y-1, z=pos.z-2},
maxpos = {x=pos.x+2, y=pos.y+4, z=pos.z+2},
minvel = {x=0, y=0, z=0},
maxvel = {x=1, y=2, z=1},
minacc = {x=-0.5,y=0.6,z=-0.5},
maxacc = {x=0.5,y=0.7,z=0.5},
minexptime = 2,
maxexptime = 3,
minsize = 3,
maxsize = 5,
collisiondetection = false,
vertical = false,
texture = "morparticle.png",
})
minetest.set_node(posmorvalarblock, {name="nssb:dis_morvalar_block"})
--minetest.add_entity(pos, "nssm:morvalar3")
end,
})
minetest.register_entity("nssm:kamehameha_bad", {
textures = {"kamehameha.png"},
on_step = function(self, dtime)
local pos = self.object:getpos();
if self.timer == 0 then
self.timer = os.time()
end
if os.time() - self.timer > self.life_time then
self.object:remove()
end
local objects = minetest.env:get_objects_inside_radius(pos, 2)
for _,obj in ipairs(objects) do
if obj:is_player() then
minetest.chat_send_all("Dentro il raggio grande")
obj:set_hp(obj:get_hp()-5)
end
if obj:get_luaentity() then
local name = obj:get_luaentity().name
if name ~= "nssm:morvalar0" and name ~="nssm:kamehameha_bad" then
obj:set_hp(obj:get_hp()-5)
if (obj:get_hp() <= 0) then
if (not obj:is_player()) then
obj:remove()
end
end
end
end
end
local objects = minetest.env:get_objects_inside_radius(pos, 1)
for _,obj in ipairs(objects) do
if obj:is_player() then
tnt_boom_nssm(pos, {damage_radius=6,radius=5,ignore_protection=false})
self.object:remove()
minetest.chat_send_all("Dentro il raggio piccolo")
end
if obj:get_luaentity() then
local name = obj:get_luaentity().name
if name ~= "nssm:morvalar0" and name ~="nssm:kamehameha_bad" then
tnt_boom_nssm(pos, {damage_radius=6,radius=5,ignore_protection=false})
self.object:remove()
end
end
end
local nodename = minetest.env:get_node(pos).name
if nodename ~= "air" then
explosion(pos, 5, 0, 1, true)
self.object:remove()
end
end,
life_time = 40,
timer = 0,
custom_timer = 0,
})
--[[
7 code: ruba l'armatura come il morlu, ma poi non scappa e ti attacca normalmente. O un po' un po' o prima ruba e poi ti ara e basta.
6 code: stand: 85-86 walk: 90-130 attack: 132-162
Attacca come prima con 7 ma ruba il cibo come il morvalar6 al posto dell'armatura, e non scappa ma attacca.
5 code: stand: 165-166 walk: 170-210 attack: 215-245
Fa esplodere un po' la sua coda come un Morgre fa esplodere se stesso.
4 code: stand: 250-251 walk: 255-295 attack: 300-320
Attacca esattamente come un Mordain
3 code: stand: 325-326 walk: 330-370 attack: 375-395(punch) 400-450(shoot)
Dogshoot con lo stesso intervel del Morwa, che mi pare sia 2.
2 code: stand: 455-456 walk: 460-500 attack: 505-545
Evoca intorno a s<EFBFBD> i 7 mostri del Morlendor contemporaneamente, non fa nulla fino a quando sono nel suo raggio visivo, quando muoiono ne evoca altri 7 e cos<EFBFBD> via fino a che non lo abbatti, sei libero di reinterpretare questo attacco in base alle tue capacit<EFBFBD>.
1 code: stand: 550-551 walk: 560-600 attack: 610-640
Attacca assorbendo la vita come un morde, si ricarica in questo modo, ma di pi<EFBFBD> del numero che assorbe.
0 code: stand: 645-646 walk: 650-690 attack: 700-750
Shoota delle kamehameha
]]--

280
mobs/morvy.lua Normal file
View File

@ -0,0 +1,280 @@
mobs:register_mob("nssm:morvy", {
type = "monster",
hp_max = 39,
hp_min = 21,
collisionbox = {-0.3, -0.1, -0.3, 0.3, 2.3, 0.3},
visual = "mesh",
mesh = "morvy.x",
textures = {{"morvy.png"}},
visual_size = {x=6, y=6},
makes_footstep_sound = true,
view_range = 35,
fear_height = 5,
walk_velocity = 0.7,
run_velocity = 2,
rotate = 270,
damage = 4,
sounds = {
random = "morvy",
},
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 5,
max = 7,},
{name = "nssm:envious_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
reach = 8,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 50,
run_end = 90,
punch_start = 100,
punch_end = 130,
},
custom_attack = function(self)
set_animation(self, "stand")
self.morvy_counter = (self.morvy_counter or 0) + 1
if self.morvy_counter == 4 then
set_animation(self, "punch")
self.morvy_counter = 0
local counter = 0
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if line_of_sight_water(self, p, s) == true then
--[[play attack sound
if self.sounds.attack then
minetest.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
})
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 objects = minetest.env:get_objects_inside_radius(s, 10)
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
counter = counter + 1
end
end
if (minetest.env:get_node(pos1).name == "air")
and (counter < 5)
then
local bat
local which = math.random(1,3)
if which == 1 then
bat = "nssm:morbat1"
elseif which == 2 then
bat = "nssm:morbat2"
elseif which == 3 then
bat = "nssm:morbat3"
end
if (bat=="nssm:morbat3") then
pos1.y=pos1.y+1.5
end
minetest.add_entity(pos1, bat)
minetest.add_particlespawner(
20, --amount
0.1, --time
{x=pos1.x-0.2, y=pos1.y-0.2, z=pos1.z-0.2}, --minpos
{x=pos1.x+0.2, y=pos1.y+0.2, z=pos1.z+0.2}, --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
2, --minsize
6, --maxsize
false, --collisiondetection
"morparticle.png" --texture
)
end
end
end
end
})
--Morbats
mobs:register_mob("nssm:morbat1", {
type = "monster",
hp_max = 15,
hp_min = 13,
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {{"morbat1.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
damage = 4,
reach = 2,
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
on_rightclick = nil,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 90,
walk_start = 10,
walk_end = 50,
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115,
}
})
mobs:register_mob("nssm:morbat2", {
type = "monster",
hp_max = 13,
hp_min = 5,
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {{"morbat2.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
damage = 4,
reach = 1,
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
on_rightclick = nil,
fly = true,
attack_type = "explode",
explosion_radius = 3,
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 90,
walk_start = 10,
walk_end = 50,
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115,
}
})
mobs:register_mob("nssm:morbat3", {
type = "monster",
hp_max = 13,
hp_min = 12,
collisionbox = {-0.1, 0.2, -0.1, 0.1, 0.4, 0.1},
visual = "mesh",
mesh = "morbat.x",
textures = {{"morbat3.png"}},
visual_size = {x=2, y=2},
view_range = 40,
walk_velocity = 0.5,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
--[[ sounds = {
random = "duck",
},]]
damage = 4,
reach = 1,
jump = true,
rotate = 270,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
on_rightclick = nil,
fly = true,
attack_type = "shoot",
arrow = "nssm:morarrow",
shoot_interval = 3,
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 90,
walk_start = 10,
walk_end = 50,
run_start = 10,
run_end = 50,
punch_start = 100,
punch_end = 115,
}
})

71
mobs/morwa.lua Normal file
View File

@ -0,0 +1,71 @@
mobs:register_mob("nssm:morwa", {
type = "monster",
hp_max = 56,
hp_min = 49,
collisionbox = {-1, -0.1, -1, 1, 3, 1},
visual = "mesh",
mesh = "morwa.x",
textures = {{"morwa.png"}},
visual_size = {x=10, y=10},
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 4,
sounds = {
random = "morwa",
},
damage = 8,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,},
{name = "nssm:wrathful_soul_fragment",
chance = 3,
min = 1,
max = 1,},
},
armor = 50,
drawtype = "front",
water_damage = 0,
reach =4,
rotate = 270,
lava_damage = 0,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=1,
blood_texture="morparticle.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:morarrow",
shoot_interval = 2,
shoot_offset = 0,
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 10,
stand_end = 40,
walk_start = 50,
walk_end = 90,
run_start = 100,
run_end = 120,
punch_start = 130,
punch_end = 160,
shoot_start =176,
shoot_end=226,
},
do_custom = function (self)
local pos = self.object:getpos()
local light = minetest.get_node_light(pos)
--minetest.chat_send_all("Luce: "..light)
if (light < 8) then
self.object:remove()
minetest.env:set_node(pos, {name="nssm:morwa_statue"})
end
end,
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:night_master", {
mobs:register_mob("nssm:night_master", {
type = "monster",
hp_max = 30,
hp_min = 30,
hp_max = 60,
hp_min = 60,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "moonherontrio.x",
@ -13,23 +13,24 @@ nssm:register_mob("nssm:night_master", {
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
},
damage = 8,
damage = 10,
jump = false,
armor = 70,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
blood_texture="nssm_blood.png",
blood_amount=50,
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "dogfight",
reach = 3,
animation = {
speed_normal = 25,
speed_run = 35,
@ -59,14 +60,15 @@ nssm:register_mob("nssm:night_master", {
false, --collisiondetection
"tnt_smoke.png" --texture
)
self.object:remove()
minetest.add_entity(pos, "nssm:night_master_2")
end,
})
nssm:register_mob("nssm:night_master_2", {
mobs:register_mob("nssm:night_master_2", {
type = "monster",
hp_max = 30,
hp_min = 30,
hp_max = 60,
hp_min = 60,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "night_master_2.x",
@ -78,23 +80,22 @@ nssm:register_mob("nssm:night_master_2", {
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
},
damage = 8,
damage = 10,
jump = false,
armor = 70,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "dogfight",
reach = 3,
animation = {
speed_normal = 25,
speed_run = 35,
@ -124,14 +125,15 @@ nssm:register_mob("nssm:night_master_2", {
false, --collisiondetection
"tnt_smoke.png" --texture
)
self.object:remove()
minetest.add_entity(pos, "nssm:night_master_1")
end,
})
nssm:register_mob("nssm:night_master_1", {
mobs:register_mob("nssm:night_master_1", {
type = "monster",
hp_max = 30,
hp_min = 30,
hp_max = 70,
hp_min = 70,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "night_master_1.x",
@ -143,13 +145,13 @@ nssm:register_mob("nssm:night_master_1", {
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45,
},
damage = 8,
damage = 12,
jump = false,
drops = {
{name = "nssm:life_energy",
@ -165,15 +167,14 @@ nssm:register_mob("nssm:night_master_1", {
min = 1,
max = 1,},
},
armor = 70,
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
light_damage = 0,
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "dogfight",
reach = 3,
animation = {
speed_normal = 25,
speed_run = 35,

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:octopus", {
mobs:register_mob("nssm:octopus", {
type = "monster",
hp_max = 22,
hp_min = 15,
hp_max = 32,
hp_min = 25,
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
visual = "mesh",
mesh = "octopus.x",
@ -13,12 +13,13 @@ nssm:register_mob("nssm:octopus", {
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3,
damage = 3,
damage = 5,
reach = 2,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
sounds = {
random = "octopus",
},
drops = {
@ -31,11 +32,15 @@ nssm:register_mob("nssm:octopus", {
min = 1,
max = 8,},
},
armor = 100,
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -52,7 +57,7 @@ nssm:register_mob("nssm:octopus", {
}
})
nssm:register_mob("nssm:xgaloctopus", {
mobs:register_mob("nssm:xgaloctopus", {
type = "monster",
hp_max = 30,
hp_min = 27,
@ -73,7 +78,7 @@ nssm:register_mob("nssm:xgaloctopus", {
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
sounds = {
random = "octopus",
},
drops = {
@ -92,6 +97,10 @@ nssm:register_mob("nssm:xgaloctopus", {
lava_damage = 10,
light_damage = 0,
on_rightclick = nil,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 25,
@ -109,4 +118,4 @@ nssm:register_mob("nssm:xgaloctopus", {
replace_what = {"default:torch"},
replace_with = "default:water_source",
replace_offset = 0,
})
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:phoenix", {
mobs:register_mob("nssm:phoenix", {
type = "monster",
hp_max = 60,
hp_min = 60,
hp_max = 160,
hp_min = 160,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "phoenix.x",
@ -13,9 +13,9 @@ nssm:register_mob("nssm:phoenix", {
rotate = 270,
walk_velocity = 2,
run_velocity = 2.5,
fall_speed = 0,
stepheight = 3,
sounds = {
fall_speed = 0,
stepheight = 3,
sounds = {
random = "phoenix",
distance = 45,
},
@ -39,17 +39,19 @@ nssm:register_mob("nssm:phoenix", {
min = 10,
max = 20,},
},
armor = 60,
armor = 40,
drawtype = "front",
water_damage = 5,
lava_damage = 0,
light_damage = 0,
blood_texture="nssm_blood.png",
blood_amount=50,
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "shoot",
arrow = "nssm:phoenix_arrow",
reach = 1,
shoot_interval = 4,
arrow = "nssm:phoenix_arrow",
reach = 1,
shoot_interval = 4,
animation = {
speed_normal = 25,
speed_run = 25,
@ -61,7 +63,7 @@ nssm:register_mob("nssm:phoenix", {
run_end = 210,
punch_start = 80,
punch_end = 110,
dattack_start = 80,
dattack_end = 110,
shoot_start = 80,
shoot_end = 110,
}
})

View File

@ -1,4 +1,4 @@
nssm:register_mob("nssm:pumpboom_small", {
mobs:register_mob("nssm:pumpboom_small", {
type = "monster",
hp_max = 15,
hp_min = 14,
@ -23,13 +23,22 @@ nssm:register_mob("nssm:pumpboom_small", {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,}
max = 2,},
{name = "nssm:black_powder",
chance = 2,
min = 1,
max = 2,},
},
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
@ -46,7 +55,7 @@ nssm:register_mob("nssm:pumpboom_small", {
}
})
nssm:register_mob("nssm:pumpboom_medium", {
mobs:register_mob("nssm:pumpboom_medium", {
type = "monster",
hp_max = 18,
hp_min = 17,
@ -70,13 +79,22 @@ nssm:register_mob("nssm:pumpboom_medium", {
{name = "nssm:life_energy",
chance = 1,
min = 2,
max = 3,}
max = 3,},
{name = "nssm:black_powder",
chance = 2,
min = 1,
max = 3,},
},
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
@ -93,7 +111,7 @@ nssm:register_mob("nssm:pumpboom_medium", {
}
})
nssm:register_mob("nssm:pumpboom_large", {
mobs:register_mob("nssm:pumpboom_large", {
type = "monster",
hp_max = 20,
hp_min = 19,
@ -117,17 +135,26 @@ nssm:register_mob("nssm:pumpboom_large", {
{name = "nssm:life_energy",
chance = 1,
min = 3,
max = 4,}
max = 4,},
{name = "nssm:black_powder",
chance = 2,
min = 2,
max = 4,},
},
armor = 100,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "explode",
animation = {
speed_normal = 25,
speed_normal = 25,
speed_run = 25,
stand_start = 1,
stand_end = 30,

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:pumpking", {
mobs:register_mob("nssm:pumpking", {
type = "monster",
hp_max = 100,
hp_min = 100,
hp_max = 220,
hp_min = 220,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 3.2, 0.4},
visual = "mesh",
mesh = "pumpking.x",
@ -18,7 +18,7 @@ nssm:register_mob("nssm:pumpking", {
random = "king",
explode = "tnt_explode",
},
damage = 9,
damage = 13,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -29,12 +29,21 @@ nssm:register_mob("nssm:pumpking", {
chance = 1,
min = 1,
max = 1,},
{name = "nssm:black_powder",
chance = 1,
min = 9,
max = 12,},
},
armor =50,
armor =40,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
blood_texture="nssm_blood.png",
blood_amount=25,
stepheight=2.1,
knock_back=0,
jump_height=12,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -45,11 +54,16 @@ nssm:register_mob("nssm:pumpking", {
speed_normal = 15, speed_run = 15,
},
on_die=function(self,pos)
nssm:explosion(pos, 3, 0, 1, self.sounds.explode)
self.object:remove()
minetest.after(0.2, function(pos)
tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
end, pos)
end,
custom_attack = function(self)
if self.timer >3 then
self.timer = 0
self.pumpking_timer = (self.pumpking_timer or os.time())
if (os.time() - self.pumpking_timer) >3 then
set_animation(self, "punch")
self.pumpking_timer = os.time()
local s = self.object:getpos()
local p = self.attack:getpos()
p.y = p.y + 1.5
@ -63,8 +77,11 @@ nssm:register_mob("nssm:pumpking", {
})
end
local pos1 = {x=s.x+math.random(-1,1), y=s.y-1.5, z=s.z+math.random(-1,1)}
minetest.set_node(pos1, {name="nssm:pumpbomb"})
minetest.get_node_timer(pos1):start(2)
minetest.after(1, function(pos1)
minetest.set_node(pos1, {name="nssm:pumpbomb"})
minetest.get_node_timer(pos1):start(2)
end,
pos1)
end
end
end

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:sand_bloco", {
mobs:register_mob("nssm:sand_bloco", {
type = "monster",
hp_max = 23,
hp_max = 24,
hp_min = 17,
collisionbox = {-0.5, -0.2, -0.5, 0.5, 1.3, 0.5},
visual = "mesh",
@ -10,13 +10,14 @@ nssm:register_mob("nssm:sand_bloco", {
makes_footstep_sound = true,
view_range = 14,
fear_height = 4,
walk_velocity = 1,
walk_velocity = 0.8,
run_velocity = 2,
rotate = 270,
sounds = {
random = "bloco",
},
damage = 3,
damage = 4,
reach = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -27,12 +28,20 @@ nssm:register_mob("nssm:sand_bloco", {
chance = 1,
min = 2,
max = 3,},
{name = "nssm:sand_bloco_skin",
chance = 2,
min = 1,
max = 3,},
},
armor = 70,
armor = 40,
drawtype = "front",
water_damage = 10,
lava_damage = 1,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="stone_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:sandworm", {
mobs:register_mob("nssm:sandworm", {
type = "monster",
hp_max = 30,
hp_max = 40,
hp_min = 25,
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
visual = "mesh",
@ -10,14 +10,22 @@ nssm:register_mob("nssm:sandworm", {
makes_footstep_sound = false,
view_range = 17,
rotate = 270,
reach = 4,
reach = 2,
fear_height = 3,
walk_velocity = 2,
run_velocity = 2,
damage = 4,
damage = 6,
sounds = {
random = "sandworm",
distance = 40,
},
jump = false,
drops = {
{name = "nssm:worm_flesh",
chance = 2,
min = 1,
max = 3,},
{name = "nssm:sandworm_skin",
chance = 2,
min = 1,
max = 3,},
@ -26,11 +34,16 @@ nssm:register_mob("nssm:sandworm", {
min = 2,
max = 3,},
},
armor = 90,
armor = 60,
drawtype = "front",
water_damage = 5,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -46,6 +59,6 @@ nssm:register_mob("nssm:sandworm", {
punch_end = 180,
},
do_custom = function(self)
nssm:digging_ability(self, "sand", self.run_velocity, {x=0, y=2, z=0})
digging_attack(self, "sand", self.run_velocity, {x=0, y=3, z=0})
end,
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:scrausics", {
mobs:register_mob("nssm:scrausics", {
type = "monster",
hp_max = 23,
hp_max = 33,
hp_min = 22,
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
@ -11,14 +11,14 @@ nssm:register_mob("nssm:scrausics", {
rotate = 270,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
fall_speed = 0,
stepheight = 3,
floats=1,
sounds = {
random = "scrausic",
sounds = {
random = "scrausics",
distance = 40,
},
damage = 3,
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -30,13 +30,17 @@ nssm:register_mob("nssm:scrausics", {
min = 1,
max = 2,},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 5,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
on_rightclick = nil,
fly = true,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:signosigno", {
mobs:register_mob("nssm:signosigno", {
type = "monster",
hp_max = 10,
hp_max = 20,
hp_min = 8,
collisionbox = {-0.2, 0.00, -0.2, 0.2, 1.6, 0.2},
visual = "mesh",
@ -12,20 +12,29 @@ nssm:register_mob("nssm:signosigno", {
walk_velocity = 1.5,
fear_height = 4,
run_velocity = 2.5,
rotate = 270,
damage = 3,
rotate = 270,
damage = 4,
reach = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
{name = "nssm:slothful_soul_fragment",
chance = 20,
min = 1,
max = 1,},
},
armor = 70,
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 2,
light_damage = 1,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="morparticle.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -40,5 +49,4 @@ nssm:register_mob("nssm:signosigno", {
punch_start = 160,
punch_end = 190,
}
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:snow_biter", {
mobs:register_mob("nssm:snow_biter", {
type = "monster",
hp_max = 20,
hp_max = 30,
hp_min = 15,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
visual = "mesh",
@ -19,7 +19,7 @@ nssm:register_mob("nssm:snow_biter", {
random = "snow_biter",
},
--pathfinding = true,
damage = 5,
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -27,7 +27,11 @@ nssm:register_mob("nssm:snow_biter", {
min = 2,
max = 3},
{name = "nssm:frosted_amphibian_heart",
chance = 1,
chance = 2,
min = 1,
max = 1},
{name = "nssm:amphibian_ribs",
chance = 2,
min = 1,
max = 1},
{name = "nssm:little_ice_tooth",
@ -35,13 +39,19 @@ nssm:register_mob("nssm:snow_biter", {
min = 0,
max = 4},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
double_melee_attack = true,
animation = {
speed_normal = 20,
speed_run = 25,
@ -53,10 +63,10 @@ nssm:register_mob("nssm:snow_biter", {
run_end = 100,
punch_start = 175,
punch_end = 190,
punch1_start = 200,
punch1_end = 215
punch2_start = 200,
punch2_end = 215
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
putting_ability(self, "default:ice", self.run_velocity)
end,
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:spiderduck", {
mobs:register_mob("nssm:spiderduck", {
type = "monster",
hp_max = 25,
hp_max = 35,
hp_min = 24,
collisionbox = {-0.6, -0.8, -0.6, 0.6, 0.4, 0.5},
visual = "mesh",
@ -16,7 +16,7 @@ nssm:register_mob("nssm:spiderduck", {
sounds = {
random = "duck",
},
damage = 4,
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -27,22 +27,31 @@ nssm:register_mob("nssm:spiderduck", {
chance = 1,
min = 1,
max = 8,},
{name = "nssm:web",
{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 = 100,
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.5,
on_rightclick = nil,
dogshoot_stop = true,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:webball",
reach = 2,
@ -59,7 +68,7 @@ nssm:register_mob("nssm:spiderduck", {
run_end = 260,
punch_start = 20,
punch_end = 46,
dattack_start = 150,
dattack_end = 200,
shoot_start = 150,
shoot_end = 200,
}
})

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:stone_eater", {
mobs:register_mob("nssm:stone_eater", {
type = "monster",
hp_max = 17,
hp_min = 15,
hp_max = 27,
hp_min = 19,
collisionbox = {-0.3, -0.05, -0.3, 0.3, 0.65, 0.3},
visual = "mesh",
mesh = "stone_eater.x",
@ -10,13 +10,13 @@ nssm:register_mob("nssm:stone_eater", {
makes_footstep_sound = false,
view_range = 16,
rotate = 270,
worm=true,
fear_height = 4,
jump = false,
jump_height =0,
walk_velocity = 1,
run_velocity = 1.5,
damage = 3,
damage = 5,
reach = 1.5,
drops = {
{name = "default:stone",
chance = 2,
@ -31,10 +31,15 @@ nssm:register_mob("nssm:stone_eater", {
min = 1,
max = 4,},
},
armor = 50,
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 1,
group_attack=true,
attack_animals=true,
knock_back=0,
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}},
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
@ -51,6 +56,7 @@ nssm:register_mob("nssm:stone_eater", {
punch_end = 185,
},
do_custom = function(self)
nssm: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})
end,
})

View File

@ -1,17 +1,18 @@
nssm:register_mob("nssm:swimming_duck", {
mobs:register_mob("nssm:swimming_duck", {
type = "monster",
hp_max = 20,
hp_max = 25,
hp_min = 15,
collisionbox = {-0.55, -0.30, -0.55, 0.55, 1, 0.55},
collisionbox = {-0.35, -0.30, -0.35, 0.35, 0.7, 0.35},
visual = "mesh",
mesh = "swimming_duck.x",
textures = {{"swimming_duck.png"}},
visual_size = {x=2, y=2},
view_range = 15,
visual_size = {x=1.5, y=1.5},
view_range = 25,
floats=1,
walk_velocity = 1,
run_velocity = 1,
damage = 2,
damage = 3,
reach = 1.5,
jump = false,
jump_chance = 0,
jump_height = 0,
@ -31,12 +32,20 @@ nssm:register_mob("nssm:swimming_duck", {
chance = 5,
min = 1,
max = 1,},
{name = "nssm:duck_feather",
chance = 6,
min = 1,
max = 2,},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=4,
blood_texture="nssm_blood.png",
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,7 +1,7 @@
nssm:register_mob("nssm:tarantula", {
mobs:register_mob("nssm:tarantula", {
type = "monster",
hp_max = 30,
hp_min = 30,
hp_max = 50,
hp_min = 50,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.9, 0.5},
visual = "mesh",
mesh = "tarantula.x",
@ -10,23 +10,36 @@ nssm:register_mob("nssm:tarantula", {
makes_footstep_sound = true,
view_range = 20,
lifetimer = 500,
walk_velocity = 1.5,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3,
rotate = 270,
sounds = {
random = "tarry",
},
damage = 5,
damage = 8,
jump = true,
armor = 80,
drops = {
{name = "nssm:super_silk_gland",
chance = 1,
min = 3,
max = 5,},
},
armor = 60,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
reach = 3,
knock_back=0,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:thickwebball",
shoot_interval = 2,
shoot_offset = 1,
animation = {
speed_normal = 20,
speed_run = 25,
@ -38,8 +51,11 @@ nssm:register_mob("nssm:tarantula", {
run_end = 160,
punch_start = 180,
punch_end = 200,
shoot_start = 180,
shoot_end = 200,
},
on_die = function(self, pos)
self.object:remove()
minetest.add_particlespawner(
200, --amount
0.1, --time
@ -61,10 +77,10 @@ nssm:register_mob("nssm:tarantula", {
})
nssm:register_mob("nssm:tarantula_propower", {
mobs:register_mob("nssm:tarantula_propower", {
type = "monster",
hp_max = 70,
hp_min = 70,
hp_max = 90,
hp_min = 90,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 1, 0.5},
visual = "mesh",
mesh = "tarantula_propower.x",
@ -79,13 +95,13 @@ nssm:register_mob("nssm:tarantula_propower", {
sounds = {
random = "tarry",
},
damage = 10,
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
min = 16,
max = 18,},
{name = "nssm:spider_leg",
chance = 1,
min = 1,
@ -94,12 +110,23 @@ nssm:register_mob("nssm:tarantula_propower", {
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 = 60,
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 3,
reach = 4,
knock_back=0,
blood_texture="nssm_blood_blue.png",
stepheight=2.1,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogfight",
@ -115,5 +142,4 @@ nssm:register_mob("nssm:tarantula_propower", {
punch_start = 180,
punch_end = 200,
}
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:uloboros", {
mobs:register_mob("nssm:uloboros", {
type = "monster",
hp_max = 18,
hp_max = 28,
hp_min = 17,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.8, 0.5},
visual = "mesh",
@ -12,31 +12,41 @@ nssm:register_mob("nssm:uloboros", {
walk_velocity = 1.5,
fear_height = 4,
run_velocity = 2.5,
rotate = 270,
sounds = {
rotate = 270,
sounds = {
random = "uloboros",
},
damage = 3,
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy",
chance = 1,
min = 1,
max = 2,},
max = 4,},
{name = "nssm:spider_leg",
chance = 2,
min = 1,
max = 8,},
{name = "nssm:web",
chance = 2,
{name = "nssm:silk_gland",
chance = 4,
min = 1,
max = 3,},
{name = "nssm:spider_meat",
chance = 4,
min = 1,
max = 2,},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood_blue.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {
@ -52,6 +62,6 @@ nssm:register_mob("nssm:uloboros", {
punch_end = 110,
},
do_custom = function(self)
nssm:webber_ability(self, "nssm:web", 3)
webber_ability(self, "nssm:web", 2)
end,
})

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:werewolf", {
mobs:register_mob("nssm:werewolf", {
type = "monster",
hp_max = 30,
hp_max = 40,
hp_min = 25,
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
@ -15,7 +15,7 @@ nssm:register_mob("nssm:werewolf", {
sounds = {
random = "werewolf",
},
damage = 4,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -31,11 +31,16 @@ nssm:register_mob("nssm:werewolf", {
min = 1,
max = 1},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

View File

@ -1,6 +1,6 @@
nssm:register_mob("nssm:white_werewolf", {
mobs:register_mob("nssm:white_werewolf", {
type = "monster",
hp_max = 30,
hp_max = 40,
hp_min = 25,
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
@ -15,7 +15,7 @@ nssm:register_mob("nssm:white_werewolf", {
sounds = {
random = "werewolf",
},
damage = 4,
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy",
@ -31,11 +31,16 @@ nssm:register_mob("nssm:white_werewolf", {
min = 1,
max = 1},
},
armor = 100,
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
light_damage = 0,
group_attack=true,
attack_animals=true,
knock_back=2,
blood_texture="nssm_blood.png",
stepheight=1.1,
on_rightclick = nil,
attack_type = "dogfight",
animation = {

51052
models/felucco.x Normal file

File diff suppressed because it is too large Load Diff

14423
models/morbat.x Normal file

File diff suppressed because it is too large Load Diff

22640
models/mordain.x Normal file

File diff suppressed because it is too large Load Diff

20141
models/morde.x Normal file

File diff suppressed because it is too large Load Diff

10042
models/morgre.x Normal file

File diff suppressed because it is too large Load Diff

26028
models/morgut.x Normal file

File diff suppressed because it is too large Load Diff

22832
models/morlu.x Normal file

File diff suppressed because it is too large Load Diff

23121
models/mortick.x Normal file

File diff suppressed because it is too large Load Diff

95643
models/morvalar.x Normal file

File diff suppressed because it is too large Load Diff

22664
models/morvy.x Normal file

File diff suppressed because it is too large Load Diff

18315
models/morwa.x Normal file

File diff suppressed because it is too large Load Diff

BIN
models/morwa_statue.b3d Normal file

Binary file not shown.

953
models/morwa_statue.x Normal file
View File

@ -0,0 +1,953 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000,-0.000000, 1.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube {
FrameTransformMatrix {
0.433013, 0.000000, 0.000000, 0.000000,
0.000000, 0.687771, 0.000000, 0.000000,
0.000000, 0.000000, 0.414217, 0.000000,
0.000000, 0.000000, 2.316839, 1.000000;;
}
Mesh { // Cube mesh
408;
0.857818; 0.415456; 1.318132;,
0.857818;-0.415456; 1.318132;,
-0.361042;-0.415456; 1.318132;,
-0.361042; 0.415456; 1.318132;,
0.857818; 0.415456; 1.489767;,
-0.361042; 0.415456; 1.489767;,
-0.361043;-0.415456; 1.489767;,
0.857817;-0.415456; 1.489767;,
0.857818; 0.415456; 1.318132;,
0.857818; 0.415456; 1.489767;,
0.857817;-0.415456; 1.489767;,
0.857818;-0.415456; 1.318132;,
0.857818;-0.415456; 1.318132;,
0.857817;-0.415456; 1.489767;,
-0.361043;-0.415456; 1.489767;,
-0.361042;-0.415456; 1.318132;,
-0.361042;-0.415456; 1.318132;,
-0.361043;-0.415456; 1.489767;,
-0.361042; 0.415456; 1.489767;,
-0.361042; 0.415456; 1.318132;,
0.857818; 0.415456; 1.489767;,
0.857818; 0.415456; 1.318132;,
-0.361042; 0.415456; 1.318132;,
-0.361042; 0.415456; 1.489767;,
0.857818; 0.415456; 1.512615;,
0.857818;-0.415456; 1.512615;,
-0.361042;-0.415456; 1.512615;,
-0.361042; 0.415456; 1.512615;,
0.857818; 0.415456; 2.779115;,
-0.361042; 0.415456; 2.779115;,
-0.361043;-0.415456; 2.779115;,
0.857817;-0.415456; 2.779115;,
0.857818; 0.415456; 1.512615;,
0.857818; 0.415456; 2.779115;,
0.857817;-0.415456; 2.779115;,
0.857818;-0.415456; 1.512615;,
0.857818;-0.415456; 1.512615;,
0.857817;-0.415456; 2.779115;,
-0.361043;-0.415456; 2.779115;,
-0.361042;-0.415456; 1.512615;,
-0.361042;-0.415456; 1.512615;,
-0.361043;-0.415456; 2.779115;,
-0.361042; 0.415456; 2.779115;,
-0.361042; 0.415456; 1.512615;,
0.857818; 0.415456; 2.779115;,
0.857818; 0.415456; 1.512615;,
-0.361042; 0.415456; 1.512615;,
-0.361042; 0.415456; 2.779115;,
0.358109; 0.320227; 1.001286;,
0.358109;-0.320227; 1.001286;,
-0.358109;-0.320227; 1.001286;,
-0.358108; 0.320227; 1.001286;,
0.358109; 0.320227; 1.306335;,
-0.358109; 0.320227; 1.306335;,
-0.358109;-0.320227; 1.306335;,
0.358108;-0.320227; 1.306335;,
0.358109; 0.320227; 1.001286;,
0.358109; 0.320227; 1.306335;,
0.358108;-0.320227; 1.306335;,
0.358109;-0.320227; 1.001286;,
0.358109;-0.320227; 1.001286;,
0.358108;-0.320227; 1.306335;,
-0.358109;-0.320227; 1.306335;,
-0.358109;-0.320227; 1.001286;,
-0.358109;-0.320227; 1.001286;,
-0.358109;-0.320227; 1.306335;,
-0.358109; 0.320227; 1.306335;,
-0.358108; 0.320227; 1.001286;,
0.358109; 0.320227; 1.306335;,
0.358109; 0.320227; 1.001286;,
-0.358108; 0.320227; 1.001286;,
-0.358109; 0.320227; 1.306335;,
0.661734;-1.012656;-2.382977;,
0.661734;-1.448231;-2.382977;,
-0.661734;-1.448231;-2.382977;,
-0.661734;-1.012656;-2.382977;,
0.661734;-1.012656; 0.998660;,
-0.661734;-1.012656; 0.998660;,
-0.661734;-1.448231; 0.998660;,
0.661734;-1.448231; 0.998660;,
0.661734;-1.012656;-2.382977;,
0.661734;-1.012656; 0.998660;,
0.661734;-1.448231; 0.998660;,
0.661734;-1.448231;-2.382977;,
0.661734;-1.448231;-2.382977;,
0.661734;-1.448231; 0.998660;,
-0.661734;-1.448231; 0.998660;,
-0.661734;-1.448231;-2.382977;,
-0.661734;-1.448231;-2.382977;,
-0.661734;-1.448231; 0.998660;,
-0.661734;-1.012656; 0.998660;,
-0.661734;-1.012656;-2.382977;,
0.661734;-1.012656; 0.998660;,
0.661734;-1.012656;-2.382977;,
-0.661734;-1.012656;-2.382977;,
-0.661734;-1.012656; 0.998660;,
0.522818;-1.077437;-4.952721;,
0.522818;-1.383450;-4.952721;,
-0.522818;-1.383450;-4.952721;,
-0.522818;-1.077437;-4.952721;,
0.522819;-1.077437;-2.389734;,
-0.522818;-1.077437;-2.389734;,
-0.522818;-1.383450;-2.389734;,
0.522818;-1.383450;-2.389734;,
0.522818;-1.077437;-4.952721;,
0.522819;-1.077437;-2.389734;,
0.522818;-1.383450;-2.389734;,
0.522818;-1.383450;-4.952721;,
0.522818;-1.383450;-4.952721;,
0.522818;-1.383450;-2.389734;,
-0.522818;-1.383450;-2.389734;,
-0.522818;-1.383450;-4.952721;,
-0.522818;-1.383450;-4.952721;,
-0.522818;-1.383450;-2.389734;,
-0.522818;-1.077437;-2.389734;,
-0.522818;-1.077437;-4.952721;,
0.522819;-1.077437;-2.389734;,
0.522818;-1.077437;-4.952721;,
-0.522818;-1.077437;-4.952721;,
-0.522818;-1.077437;-2.389734;,
0.595445;-1.019842;-5.495213;,
0.595445;-1.441046;-5.495213;,
-0.595445;-1.441046;-5.495213;,
-0.595445;-1.019841;-5.495213;,
0.595446;-1.019842;-4.965870;,
-0.595445;-1.019842;-4.965870;,
-0.595446;-1.441046;-4.965870;,
0.595445;-1.441046;-4.965870;,
0.595445;-1.019842;-5.495213;,
0.595446;-1.019842;-4.965870;,
0.595445;-1.441046;-4.965870;,
0.595445;-1.441046;-5.495213;,
0.595445;-1.441046;-5.495213;,
0.595445;-1.441046;-4.965870;,
-0.595446;-1.441046;-4.965870;,
-0.595445;-1.441046;-5.495213;,
-0.595445;-1.441046;-5.495213;,
-0.595446;-1.441046;-4.965870;,
-0.595445;-1.019842;-4.965870;,
-0.595445;-1.019841;-5.495213;,
0.595446;-1.019842;-4.965870;,
0.595445;-1.019842;-5.495213;,
-0.595445;-1.019841;-5.495213;,
-0.595445;-1.019842;-4.965870;,
0.595445; 1.435306;-5.495213;,
0.595445; 1.014102;-5.495213;,
-0.595445; 1.014102;-5.495213;,
-0.595445; 1.435307;-5.495213;,
0.595446; 1.435306;-4.965870;,
-0.595445; 1.435306;-4.965870;,
-0.595446; 1.014102;-4.965870;,
0.595445; 1.014102;-4.965870;,
0.595445; 1.435306;-5.495213;,
0.595446; 1.435306;-4.965870;,
0.595445; 1.014102;-4.965870;,
0.595445; 1.014102;-5.495213;,
0.595445; 1.014102;-5.495213;,
0.595445; 1.014102;-4.965870;,
-0.595446; 1.014102;-4.965870;,
-0.595445; 1.014102;-5.495213;,
-0.595445; 1.014102;-5.495213;,
-0.595446; 1.014102;-4.965870;,
-0.595445; 1.435306;-4.965870;,
-0.595445; 1.435307;-5.495213;,
0.595446; 1.435306;-4.965870;,
0.595445; 1.435306;-5.495213;,
-0.595445; 1.435307;-5.495213;,
-0.595445; 1.435306;-4.965870;,
0.522818; 1.377711;-4.952721;,
0.522818; 1.071698;-4.952721;,
-0.522818; 1.071698;-4.952721;,
-0.522818; 1.377711;-4.952721;,
0.522819; 1.377711;-2.389734;,
-0.522818; 1.377711;-2.389734;,
-0.522818; 1.071698;-2.389734;,
0.522818; 1.071698;-2.389734;,
0.522818; 1.377711;-4.952721;,
0.522819; 1.377711;-2.389734;,
0.522818; 1.071698;-2.389734;,
0.522818; 1.071698;-4.952721;,
0.522818; 1.071698;-4.952721;,
0.522818; 1.071698;-2.389734;,
-0.522818; 1.071698;-2.389734;,
-0.522818; 1.071698;-4.952721;,
-0.522818; 1.071698;-4.952721;,
-0.522818; 1.071698;-2.389734;,
-0.522818; 1.377711;-2.389734;,
-0.522818; 1.377711;-4.952721;,
0.522819; 1.377711;-2.389734;,
0.522818; 1.377711;-4.952721;,
-0.522818; 1.377711;-4.952721;,
-0.522818; 1.377711;-2.389734;,
0.661734; 1.442492;-2.382977;,
0.661734; 1.006917;-2.382977;,
-0.661734; 1.006917;-2.382977;,
-0.661734; 1.442492;-2.382977;,
0.661734; 1.442492; 0.998660;,
-0.661734; 1.442492; 0.998660;,
-0.661734; 1.006917; 0.998660;,
0.661734; 1.006917; 0.998660;,
0.661734; 1.442492;-2.382977;,
0.661734; 1.442492; 0.998660;,
0.661734; 1.006917; 0.998660;,
0.661734; 1.006917;-2.382977;,
0.661734; 1.006917;-2.382977;,
0.661734; 1.006917; 0.998660;,
-0.661734; 1.006917; 0.998660;,
-0.661734; 1.006917;-2.382977;,
-0.661734; 1.006917;-2.382977;,
-0.661734; 1.006917; 0.998660;,
-0.661734; 1.442492; 0.998660;,
-0.661734; 1.442492;-2.382977;,
0.661734; 1.442492; 0.998660;,
0.661734; 1.442492;-2.382977;,
-0.661734; 1.442492;-2.382977;,
-0.661734; 1.442492; 0.998660;,
0.661734; 0.660522;-4.353356;,
0.661734; 0.224947;-4.353356;,
-0.661734; 0.224947;-4.353356;,
-0.661734; 0.660522;-4.353356;,
0.661734; 0.660522;-3.039748;,
-0.661734; 0.660522;-3.039748;,
-0.661734; 0.224947;-3.039748;,
0.661734; 0.224947;-3.039748;,
0.661734; 0.660522;-4.353356;,
0.661734; 0.660522;-3.039748;,
0.661734; 0.224947;-3.039748;,
0.661734; 0.224947;-4.353356;,
0.661734; 0.224947;-4.353356;,
0.661734; 0.224947;-3.039748;,
-0.661734; 0.224947;-3.039748;,
-0.661734; 0.224947;-4.353356;,
-0.661734; 0.224947;-4.353356;,
-0.661734; 0.224947;-3.039748;,
-0.661734; 0.660522;-3.039748;,
-0.661734; 0.660522;-4.353356;,
0.661734; 0.660522;-3.039748;,
0.661734; 0.660522;-4.353356;,
-0.661734; 0.660522;-4.353356;,
-0.661734; 0.660522;-3.039748;,
0.522818; 0.595741;-5.351583;,
0.522818; 0.289728;-5.351583;,
-0.522818; 0.289728;-5.351583;,
-0.522818; 0.595741;-5.351583;,
0.522819; 0.595741;-4.355981;,
-0.522818; 0.595741;-4.355981;,
-0.522818; 0.289728;-4.355981;,
0.522818; 0.289728;-4.355981;,
0.522818; 0.595741;-5.351583;,
0.522819; 0.595741;-4.355981;,
0.522818; 0.289728;-4.355981;,
0.522818; 0.289728;-5.351583;,
0.522818; 0.289728;-5.351583;,
0.522818; 0.289728;-4.355981;,
-0.522818; 0.289728;-4.355981;,
-0.522818; 0.289728;-5.351583;,
-0.522818; 0.289728;-5.351583;,
-0.522818; 0.289728;-4.355981;,
-0.522818; 0.595741;-4.355981;,
-0.522818; 0.595741;-5.351583;,
0.522819; 0.595741;-4.355981;,
0.522818; 0.595741;-5.351583;,
-0.522818; 0.595741;-5.351583;,
-0.522818; 0.595741;-4.355981;,
0.568957; 0.626037;-5.632695;,
0.568957; 0.259432;-5.632695;,
-0.568957; 0.259432;-5.632695;,
-0.568957; 0.626037;-5.632695;,
0.568957; 0.626037;-5.364969;,
-0.568957; 0.626037;-5.364969;,
-0.568957; 0.259432;-5.364969;,
0.568957; 0.259431;-5.364969;,
0.568957; 0.626037;-5.632695;,
0.568957; 0.626037;-5.364969;,
0.568957; 0.259431;-5.364969;,
0.568957; 0.259432;-5.632695;,
0.568957; 0.259432;-5.632695;,
0.568957; 0.259431;-5.364969;,
-0.568957; 0.259432;-5.364969;,
-0.568957; 0.259432;-5.632695;,
-0.568957; 0.259432;-5.632695;,
-0.568957; 0.259432;-5.364969;,
-0.568957; 0.626037;-5.364969;,
-0.568957; 0.626037;-5.632695;,
0.568957; 0.626037;-5.364969;,
0.568957; 0.626037;-5.632695;,
-0.568957; 0.626037;-5.632695;,
-0.568957; 0.626037;-5.364969;,
0.568957;-0.276674;-5.632695;,
0.568957;-0.643280;-5.632695;,
-0.568957;-0.643280;-5.632695;,
-0.568957;-0.276674;-5.632695;,
0.568957;-0.276674;-5.364969;,
-0.568957;-0.276674;-5.364969;,
-0.568957;-0.643280;-5.364969;,
0.568957;-0.643280;-5.364969;,
0.568957;-0.276674;-5.632695;,
0.568957;-0.276674;-5.364969;,
0.568957;-0.643280;-5.364969;,
0.568957;-0.643280;-5.632695;,
0.568957;-0.643280;-5.632695;,
0.568957;-0.643280;-5.364969;,
-0.568957;-0.643280;-5.364969;,
-0.568957;-0.643280;-5.632695;,
-0.568957;-0.643280;-5.632695;,
-0.568957;-0.643280;-5.364969;,
-0.568957;-0.276674;-5.364969;,
-0.568957;-0.276674;-5.632695;,
0.568957;-0.276674;-5.364969;,
0.568957;-0.276674;-5.632695;,
-0.568957;-0.276674;-5.632695;,
-0.568957;-0.276674;-5.364969;,
0.522818;-0.306970;-5.351583;,
0.522818;-0.612983;-5.351583;,
-0.522818;-0.612983;-5.351583;,
-0.522818;-0.306970;-5.351583;,
0.522819;-0.306971;-4.355981;,
-0.522818;-0.306970;-4.355981;,
-0.522818;-0.612983;-4.355981;,
0.522818;-0.612983;-4.355981;,
0.522818;-0.306970;-5.351583;,
0.522819;-0.306971;-4.355981;,
0.522818;-0.612983;-4.355981;,
0.522818;-0.612983;-5.351583;,
0.522818;-0.612983;-5.351583;,
0.522818;-0.612983;-4.355981;,
-0.522818;-0.612983;-4.355981;,
-0.522818;-0.612983;-5.351583;,
-0.522818;-0.612983;-5.351583;,
-0.522818;-0.612983;-4.355981;,
-0.522818;-0.306970;-4.355981;,
-0.522818;-0.306970;-5.351583;,
0.522819;-0.306971;-4.355981;,
0.522818;-0.306970;-5.351583;,
-0.522818;-0.306970;-5.351583;,
-0.522818;-0.306970;-4.355981;,
0.661734;-0.242190;-4.353356;,
0.661734;-0.677764;-4.353356;,
-0.661734;-0.677764;-4.353356;,
-0.661734;-0.242189;-4.353356;,
0.661734;-0.242190;-3.039748;,
-0.661734;-0.242190;-3.039748;,
-0.661734;-0.677764;-3.039748;,
0.661734;-0.677764;-3.039748;,
0.661734;-0.242190;-4.353356;,
0.661734;-0.242190;-3.039748;,
0.661734;-0.677764;-3.039748;,
0.661734;-0.677764;-4.353356;,
0.661734;-0.677764;-4.353356;,
0.661734;-0.677764;-3.039748;,
-0.661734;-0.677764;-3.039748;,
-0.661734;-0.677764;-4.353356;,
-0.661734;-0.677764;-4.353356;,
-0.661734;-0.677764;-3.039748;,
-0.661734;-0.242190;-3.039748;,
-0.661734;-0.242189;-4.353356;,
0.661734;-0.242190;-3.039748;,
0.661734;-0.242190;-4.353356;,
-0.661734;-0.242189;-4.353356;,
-0.661734;-0.242190;-3.039748;,
0.962029; 0.684361;-3.017800;,
0.962029;-0.684361;-3.017800;,
-0.962029;-0.684361;-3.017800;,
-0.962029; 0.684361;-3.017800;,
0.962030; 0.684361;-1.016196;,
-0.962029; 0.684361;-1.016196;,
-0.962030;-0.684361;-1.016196;,
0.962029;-0.684361;-1.016196;,
0.962029; 0.684361;-3.017800;,
0.962030; 0.684361;-1.016196;,
0.962029;-0.684361;-1.016196;,
0.962029;-0.684361;-3.017800;,
0.962029;-0.684361;-3.017800;,
0.962029;-0.684361;-1.016196;,
-0.962030;-0.684361;-1.016196;,
-0.962029;-0.684361;-3.017800;,
-0.962029;-0.684361;-3.017800;,
-0.962030;-0.684361;-1.016196;,
-0.962029; 0.684361;-1.016196;,
-0.962029; 0.684361;-3.017800;,
0.962030; 0.684361;-1.016196;,
0.962029; 0.684361;-3.017800;,
-0.962029; 0.684361;-3.017800;,
-0.962029; 0.684361;-1.016196;,
1.000000; 1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000;-1.000000;,
1.000000; 0.999999; 1.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000;-1.000000; 1.000000;,
0.999999;-1.000001; 1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000; 0.999999; 1.000000;,
0.999999;-1.000001; 1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
0.999999;-1.000001; 1.000000;,
-1.000000;-1.000000; 1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000; 1.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000; 1.000000;-1.000000;,
1.000000; 0.999999; 1.000000;,
1.000000; 1.000000;-1.000000;,
-1.000000; 1.000000;-1.000000;,
-1.000000; 1.000000; 1.000000;;
102;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;,
4;27,26,25,24;,
4;31,30,29,28;,
4;35,34,33,32;,
4;39,38,37,36;,
4;43,42,41,40;,
4;47,46,45,44;,
4;51,50,49,48;,
4;55,54,53,52;,
4;59,58,57,56;,
4;63,62,61,60;,
4;67,66,65,64;,
4;71,70,69,68;,
4;75,74,73,72;,
4;79,78,77,76;,
4;83,82,81,80;,
4;87,86,85,84;,
4;91,90,89,88;,
4;95,94,93,92;,
4;99,98,97,96;,
4;103,102,101,100;,
4;107,106,105,104;,
4;111,110,109,108;,
4;115,114,113,112;,
4;119,118,117,116;,
4;123,122,121,120;,
4;127,126,125,124;,
4;131,130,129,128;,
4;135,134,133,132;,
4;139,138,137,136;,
4;143,142,141,140;,
4;147,146,145,144;,
4;151,150,149,148;,
4;155,154,153,152;,
4;159,158,157,156;,
4;163,162,161,160;,
4;167,166,165,164;,
4;171,170,169,168;,
4;175,174,173,172;,
4;179,178,177,176;,
4;183,182,181,180;,
4;187,186,185,184;,
4;191,190,189,188;,
4;195,194,193,192;,
4;199,198,197,196;,
4;203,202,201,200;,
4;207,206,205,204;,
4;211,210,209,208;,
4;215,214,213,212;,
4;219,218,217,216;,
4;223,222,221,220;,
4;227,226,225,224;,
4;231,230,229,228;,
4;235,234,233,232;,
4;239,238,237,236;,
4;243,242,241,240;,
4;247,246,245,244;,
4;251,250,249,248;,
4;255,254,253,252;,
4;259,258,257,256;,
4;263,262,261,260;,
4;267,266,265,264;,
4;271,270,269,268;,
4;275,274,273,272;,
4;279,278,277,276;,
4;283,282,281,280;,
4;287,286,285,284;,
4;291,290,289,288;,
4;295,294,293,292;,
4;299,298,297,296;,
4;303,302,301,300;,
4;307,306,305,304;,
4;311,310,309,308;,
4;315,314,313,312;,
4;319,318,317,316;,
4;323,322,321,320;,
4;327,326,325,324;,
4;331,330,329,328;,
4;335,334,333,332;,
4;339,338,337,336;,
4;343,342,341,340;,
4;347,346,345,344;,
4;351,350,349,348;,
4;355,354,353,352;,
4;359,358,357,356;,
4;363,362,361,360;,
4;367,366,365,364;,
4;371,370,369,368;,
4;375,374,373,372;,
4;379,378,377,376;,
4;383,382,381,380;,
4;387,386,385,384;,
4;391,390,389,388;,
4;395,394,393,392;,
4;399,398,397,396;,
4;403,402,401,400;,
4;407,406,405,404;;
MeshTextureCoords { // Cube UV coordinates
408;
0.146555; 0.704938;,
0.219579; 0.704938;,
0.219579; 0.597638;,
0.146555; 0.597638;,
0.375317; 0.453613;,
0.375317; 0.700559;,
0.734358; 0.700559;,
0.734358; 0.453613;,
0.734631; 0.437290;,
0.734855; 0.467815;,
0.374945; 0.468118;,
0.375264; 0.437227;,
0.823588; 0.418938;,
0.808504; 0.418938;,
0.808504; 0.526238;,
0.823588; 0.526238;,
0.578626; 0.055536;,
0.563542; 0.055536;,
0.563542; 0.128684;,
0.578626; 0.128684;,
0.808504; 0.418938;,
0.823588; 0.418938;,
0.823588; 0.311638;,
0.808504; 0.311638;,
0.734192; 0.452700;,
0.375763; 0.454545;,
0.375763; 0.695071;,
0.734192; 0.693225;,
0.853190; 0.892700;,
0.853190; 1.000000;,
0.926213; 1.000000;,
0.926213; 0.892700;,
0.733844; 0.468849;,
0.733844; 0.123528;,
0.374688; 0.123528;,
0.374688; 0.468849;,
0.347692; 0.350172;,
0.347692; 0.238678;,
0.240575; 0.238678;,
0.240575; 0.350172;,
0.740541; 0.147195;,
0.740541; 0.258689;,
0.813564; 0.258689;,
0.813564; 0.147195;,
0.807655; 0.185158;,
0.807655; 0.073664;,
0.700538; 0.073664;,
0.700538; 0.185158;,
0.697294; 0.823793;,
0.753579; 0.823793;,
0.753579; 0.760742;,
0.697294; 0.760742;,
0.697294; 0.823793;,
0.697294; 0.760742;,
0.641009; 0.760742;,
0.641009; 0.823793;,
0.904703; 0.008042;,
0.877894; 0.008042;,
0.877894; 0.064423;,
0.904703; 0.064423;,
0.907933; 0.074983;,
0.934742; 0.074983;,
0.934742; 0.011932;,
0.907934; 0.011932;,
0.991302; 0.759518;,
0.964493; 0.759518;,
0.964493; 0.815899;,
0.991302; 0.815899;,
0.210851; 0.427844;,
0.237659; 0.427844;,
0.237659; 0.364793;,
0.210851; 0.364793;,
0.973107; 0.052812;,
0.934827; 0.052812;,
0.934827; 0.169321;,
0.973107; 0.169321;,
0.934827; 0.169321;,
0.934827; 0.285830;,
0.973107; 0.285830;,
0.973107; 0.169321;,
0.869654; 0.454170;,
0.869654; 0.156474;,
0.831374; 0.156474;,
0.831374; 0.454170;,
0.000000; 0.702304;,
0.000000; 1.000000;,
0.116311; 1.000000;,
0.116311; 0.702304;,
0.907933; 0.454170;,
0.907933; 0.156474;,
0.869654; 0.156474;,
0.869654; 0.454170;,
0.263458; 0.822824;,
0.263458; 0.525128;,
0.147148; 0.525128;,
0.147148; 0.822824;,
0.770397; 0.000000;,
0.743504; 0.000000;,
0.743504; 0.092051;,
0.770397; 0.092051;,
0.991386; 0.907949;,
0.991386; 0.815899;,
0.964493; 0.815899;,
0.964493; 0.907949;,
0.934827; 0.526238;,
0.934827; 0.300610;,
0.907934; 0.300610;,
0.907933; 0.526238;,
0.846910; 0.280160;,
0.846910; 0.505787;,
0.938804; 0.505787;,
0.938804; 0.280160;,
0.934827; 0.751866;,
0.934827; 0.526238;,
0.907934; 0.526238;,
0.907933; 0.751866;,
0.853190; 1.000000;,
0.853190; 0.774372;,
0.761296; 0.774372;,
0.761296; 1.000000;,
0.129949; 0.092205;,
0.092932; 0.092205;,
0.092932; 0.197043;,
0.129949; 0.197043;,
0.130005; 0.029002;,
0.130005; 0.133840;,
0.167021; 0.133840;,
0.167021; 0.029002;,
0.189231; 0.169107;,
0.189231; 0.122508;,
0.152214; 0.122507;,
0.152214; 0.169107;,
0.143088; 0.176945;,
0.096567; 0.176945;,
0.096567; 0.281783;,
0.143088; 0.281783;,
0.096414; 0.254403;,
0.096414; 0.301003;,
0.133431; 0.301003;,
0.133431; 0.254403;,
0.184374; 0.157981;,
0.137854; 0.157981;,
0.137854; 0.262819;,
0.184374; 0.262819;,
0.217045; 0.080940;,
0.180028; 0.080940;,
0.180028; 0.185778;,
0.217045; 0.185778;,
0.155395; 0.155324;,
0.155395; 0.260162;,
0.192412; 0.260162;,
0.192412; 0.155325;,
0.062521; 0.223308;,
0.062521; 0.269908;,
0.099538; 0.269908;,
0.099538; 0.223309;,
0.132683; 0.264179;,
0.179203; 0.264179;,
0.179203; 0.159342;,
0.132683; 0.159342;,
0.162243; 0.235845;,
0.162243; 0.189245;,
0.125226; 0.189245;,
0.125226; 0.235845;,
0.138015; 0.185771;,
0.184535; 0.185771;,
0.184535; 0.080933;,
0.138015; 0.080933;,
0.743504; 0.000000;,
0.716611; 0.000000;,
0.716611; 0.092051;,
0.743504; 0.092051;,
0.716610; 0.092051;,
0.716610; 0.000000;,
0.689717; 0.000000;,
,
0.125226; 0.235845;,
0.138015; 0.185771;,
0.184535; 0.185771;,
0.184535; 0.080933;,
0.138015; 0.080933;,
0.743504; 0.000000;,
0.716611; 0.000000;,
0.716611; 0.092051;,
0.743504; 0.092051;,
0.716610; 0.092051;,
0.716610; 0.000000;,
0.689717; 0.000000;,
0.689717; 0.092051;,
0.934827; 0.300610;,
0.934827; 0.074983;,
0.907934; 0.074983;,
0.907933; 0.300610;,
0.870199; 0.358905;,
0.870199; 0.133277;,
0.778305; 0.133277;,
0.778305; 0.358905;,
0.808504; 0.526238;,
0.808504; 0.300610;,
0.781611; 0.300610;,
0.781611; 0.526238;,
0.831374; 0.751866;,
0.831374; 0.526238;,
0.739480; 0.526238;,
0.739480; 0.751866;,
0.973107; 0.285830;,
0.934827; 0.285830;,
0.934827; 0.402339;,
0.973107; 0.402339;,
0.934827; 0.518848;,
0.934827; 0.635357;,
0.973107; 0.635357;,
0.973107; 0.518848;,
0.869654; 0.751866;,
0.869654; 0.454170;,
0.831374; 0.454170;,
0.831374; 0.751866;,
0.116311; 0.702304;,
0.116311; 1.000000;,
0.232621; 1.000000;,
0.232621; 0.702304;,
0.907933; 0.751866;,
0.907933; 0.454170;,
0.869654; 0.454170;,
0.869654; 0.751866;,
0.348932; 1.000000;,
0.348932; 0.702304;,
0.232621; 0.702304;,
0.232621; 1.000000;,
0.973107; 0.402339;,
0.934827; 0.402339;,
0.934827; 0.518848;,
0.973107; 0.518848;,
0.964493; 0.883491;,
0.964493; 0.766982;,
0.926213; 0.766982;,
0.926213; 0.883491;,
0.428092; 0.141471;,
0.428092; 0.025830;,
0.389812; 0.025830;,
0.389812; 0.141471;,
0.142880; 0.727963;,
0.258324; 0.727963;,
0.258324; 0.611454;,
0.142880; 0.611454;,
0.428092; 0.025830;,
0.428092; 0.141471;,
0.466372; 0.141471;,
0.466372; 0.025830;,
0.689717; 0.300610;,
0.805161; 0.300610;,
0.805161; 0.184101;,
0.689717; 0.184101;,
0.973107; 0.751866;,
1.000000; 0.751866;,
1.000000; 0.659815;,
0.973107; 0.659815;,
0.904788; 0.156474;,
0.904788; 0.064423;,
0.877894; 0.064423;,
0.877894; 0.156474;,
0.105638; 0.635034;,
0.105638; 0.547388;,
0.078745; 0.547388;,
0.078745; 0.635034;,
0.031990; 0.613889;,
0.119487; 0.613889;,
0.119487; 0.521838;,
0.031990; 0.521838;,
0.973107; 0.572169;,
0.973107; 0.659815;,
1.000000; 0.659815;,
1.000000; 0.572169;,
0.365305; 0.045359;,
0.277809; 0.045359;,
0.277809; 0.137409;,
0.365305; 0.137410;,
0.045311; 0.156340;,
0.077530; 0.156340;,
0.077530; 0.056166;,
0.045311; 0.056166;,
0.148600; 0.244396;,
0.148600; 0.144222;,
0.116381; 0.144222;,
0.116381; 0.244396;,
0.168555; 0.208727;,
0.192083; 0.208727;,
0.192083; 0.176454;,
0.168555; 0.176454;,
0.170487; 0.079342;,
0.146958; 0.079342;,
0.146958; 0.179516;,
0.170487; 0.179516;,
0.114022; 0.152920;,
0.137551; 0.152920;,
0.137551; 0.120647;,
0.114022; 0.120647;,
0.052290; 0.223964;,
0.075819; 0.223964;,
0.075819; 0.123790;,
0.052290; 0.123790;,
0.114498; 0.093416;,
0.082279; 0.093416;,
0.082279; 0.193590;,
0.114498; 0.193590;,
0.041178; 0.212581;,
0.041178; 0.112407;,
0.008960; 0.112407;,
0.008960; 0.212581;,
0.159527; 0.102570;,
0.135999; 0.102570;,
0.135999; 0.134843;,
0.159527; 0.134843;,
0.092595; 0.142392;,
0.116124; 0.142392;,
0.116124; 0.042218;,
0.092595; 0.042218;,
0.157428; 0.176454;,
0.133899; 0.176454;,
0.133899; 0.208727;,
0.157428; 0.208727;,
0.033688; 0.268331;,
0.057216; 0.268331;,
0.057216; 0.168157;,
0.033688; 0.168157;,
0.991386; 0.907949;,
0.964493; 0.907949;,
0.964493; 1.000000;,
0.991386; 1.000000;,
0.641532; 0.127043;,
0.641532; 0.034992;,
0.614639; 0.034992;,
0.614639; 0.127043;,
0.107924; 0.517859;,
0.107924; 0.605505;,
0.134817; 0.605505;,
0.134817; 0.517859;,
0.689717; 0.184101;,
0.777214; 0.184101;,
0.777214; 0.092051;,
0.689717; 0.092051;,
0.167158; 0.424349;,
0.167158; 0.511995;,
0.194051; 0.511995;,
0.194051; 0.424349;,
0.439029; 0.141471;,
0.351533; 0.141471;,
0.351533; 0.233522;,
0.439029; 0.233522;,
0.973107; 0.635357;,
0.934827; 0.635357;,
0.934827; 0.751866;,
0.973107; 0.751866;,
0.964493; 1.000000;,
0.964493; 0.883491;,
0.926213; 0.883491;,
0.926213; 1.000000;,
0.389812; 0.141471;,
0.389812; 0.025830;,
0.351533; 0.025830;,
0.351533; 0.141471;,
0.110376; 0.662550;,
0.225820; 0.662550;,
0.225820; 0.546041;,
0.110376; 0.546041;,
0.504651; 0.141471;,
0.504651; 0.025830;,
0.466372; 0.025830;,
0.466372; 0.141471;,
0.201212; 0.556736;,
0.316656; 0.556736;,
0.316656; 0.440227;,
0.201212; 0.440227;,
0.085837; 0.579025;,
0.206124; 0.579025;,
0.206124; 0.409644;,
0.085837; 0.409644;,
0.201493; 0.620858;,
0.201493; 0.451477;,
0.081206; 0.451477;,
0.081206; 0.620858;,
0.207106; 0.786112;,
0.207106; 0.609905;,
0.086819; 0.609905;,
0.086819; 0.786112;,
0.269625; 0.632052;,
0.269625; 0.455844;,
0.100533; 0.455844;,
0.100533; 0.632052;,
0.641009; 0.823793;,
0.641009; 1.000000;,
0.761296; 1.000000;,
0.761296; 0.823793;,
0.982550; 0.858444;,
0.982550; 0.682236;,
0.813458; 0.682236;,
0.813458; 0.858444;,
0.000000; 0.526238;,
0.175766; 0.526238;,
0.175766; 0.350172;,
0.000000; 0.350172;,
0.308289; 0.672775;,
0.308289; 0.496709;,
0.132523; 0.496709;,
0.132523; 0.672775;,
0.351533; 0.526238;,
0.175766; 0.526238;,
0.175766; 0.702304;,
0.351533; 0.702304;,
0.000000; 0.702304;,
0.175766; 0.702304;,
0.175766; 0.526238;,
0.000000; 0.526238;,
0.351532; 0.350172;,
0.175766; 0.350172;,
0.175766; 0.526238;,
0.351532; 0.526238;,
0.367862; 0.782101;,
0.192096; 0.782101;,
0.192096; 0.958167;,
0.367862; 0.958167;;
} // End of Cube UV coordinates

View File

@ -5,8 +5,67 @@ local c_obsidian = minetest.get_content_id("default:obsidian")
local c_brick = minetest.get_content_id("default:obsidianbrick")
local c_chest = minetest.get_content_id("default:chest_locked")
nssm.lessvirulent = minetest.setting_getbool("nssm.lessvirulent") or false
nssm.safebones = minetest.setting_getbool("nssm.safebones") or false
nssm.cryosave = minetest.setting_getbool("nssm.cryosave") or false
function nssm:virulence(mobe)
if not nssm.lessvirulent then
return 0
end
return math.ceil(100 / mobe.hp_max)
end
function nssm:affectbones(mobe) -- as function for adaptable heuristic
return not nssm.safebones
end
function drops(drop)
if drop then
drop:setvelocity({
x = math.random(-10, 10) / 9,
y = 5,
z = math.random(-10, 10) / 9,
})
end
end
function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D
local ang = math.pi/2
local c = math.cos(ang)
local s = math.sin(ang)
local i = vec.x*c - vec.z*s
local k = vec.x*s + vec.z*c
local j = 0
vec = {x=i, y=j, z=k}
return vec
end
function add_entity_and_particles(entity, pos, particles, multiplier)
minetest.add_particlespawner({
amount = 100*multiplier,
time = 2,
minpos = {x=pos.x-2, y=pos.y-1, z=pos.z-2},
maxpos = {x=pos.x+2, y=pos.y+4, z=pos.z+2},
minvel = {x=0, y=0, z=0},
maxvel = {x=1, y=2, z=1},
minacc = {x=-0.5,y=0.6,z=-0.5},
maxacc = {x=0.5,y=0.7,z=0.5},
minexptime = 2,
maxexptime = 3,
minsize = 3,
maxsize = 5,
collisiondetection = false,
vertical = false,
texture = particles,
})
minetest.add_entity(pos, entity)
end
-- get node but use fallback for nil or unknown
function nssm:node_ok(pos, fallback)
function node_ok(pos, fallback)
fallback = fallback or "default:dirt"
local node = minetest.get_node_or_nil(pos)
if not node then
@ -18,8 +77,14 @@ function nssm:node_ok(pos, fallback)
return minetest.registered_nodes[fallback]
end
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 r = math.sqrt(v.x^2+v.y^2+v.z^2)
return r
end
--check_for_death functions customized for monsters who respawns (Masticone)
function nssm:check_for_death_hydra(self)
function check_for_death_hydra(self)
local hp = self.object:get_hp()
if hp > 0 then
self.health = hp
@ -44,7 +109,7 @@ function nssm:check_for_death_hydra(self)
end
function nssm:round(n)
function round(n)
if (n>0) then
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
else
@ -54,7 +119,7 @@ function nssm:round(n)
end
end
function nssm:explosion_particles(pos, exp_radius)
function explosion_particles(pos, exp_radius)
minetest.add_particlespawner(
100*exp_radius/2, --amount
0.1, --time
@ -72,8 +137,8 @@ function nssm:explosion_particles(pos, exp_radius)
"tnt_smoke.png" --texture
)
end
function nssm:explosion(pos, exp_radius, fire)
--[[
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, "")
@ -88,7 +153,7 @@ function nssm:explosion(pos, exp_radius, fire)
})
--particles:
nssm:explosion_particles(pos, exp_radius)
explosion_particles(pos, exp_radius)
--Damages entities around (not the player)
local objects = minetest.env:get_objects_inside_radius(pos, exp_radius)
@ -97,12 +162,26 @@ function nssm:explosion(pos, exp_radius, fire)
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
obj:set_hp(obj:get_hp()-damage)
if (obj:get_hp() <= 0) then
if (not obj:is_player()) then
obj:remove()
end
end
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
@ -128,7 +207,7 @@ function nssm:explosion(pos, exp_radius, fire)
and data[vi] ~= c_brick
and data[vi] ~= c_chest then
local n = nssm:node_ok(p).name
local n = node_ok(p).name
local on_blast = minetest.registered_nodes[n].on_blast
if on_blast then
@ -167,7 +246,7 @@ function nssm:explosion(pos, exp_radius, fire)
or math.random(1, 100) <= 3) then
minetest.set_node(p, {name = "fire:basic_flame"})
else
local dist = nssm:round(((pos.x-p.x)^2 + (pos.y-p.y)^2 + (pos.z-p.z)^2)^1/2)
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.env:remove_node(p)
@ -180,15 +259,18 @@ function nssm:explosion(pos, exp_radius, fire)
end
end
end
]]
-- SPECIAL ABILITIES OF SOME MOBS
function nssm:digging_ability(
--[[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:getvelocity()
local pos = self.object:getpos()
@ -212,15 +294,15 @@ function nssm:digging_ability(
local multiplier = 2
if x>0 then
i = nssm:round(x*max_vel)*multiplier
i = round(x*max_vel)*multiplier
else
i1 = nssm:round(x*max_vel)*multiplier
i1 = round(x*max_vel)*multiplier
end
if z>0 then
k = nssm:round(z*max_vel)*multiplier
k = round(z*max_vel)*multiplier
else
k1 = nssm:round(z*max_vel)*multiplier
k1 = round(z*max_vel)*multiplier
end
for dx = i1, i do
@ -231,26 +313,88 @@ function nssm:digging_ability(
local n = minetest.env: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, "") 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.env:set_node(p, {name="air"})
--minetest.env: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 not (minetest.is_protected(p, "")) then
minetest.env:set_node(p, {name="air"})
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.env:set_node(p, {name="air"})
minetest.remove_node(p)
end
end
end
end
end
end
]]--
function digging_attack(
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
if self.attack and self.attack:is_player() then
local s = self.object:getpos()
local p = self.attack:getpos()
local dir = vector.subtract(p,s)
dir = vector.normalize(dir)
local per = perpendicular_vector(dir)
function nssm:putting_ability( --puts under the mob the block defined as 'p_block'
local posp = vector.add(s,dir)
--minetest.chat_send_all("La mia posizione:"..minetest.pos_to_string(s))
--minetest.chat_send_all("La posizione davanti:"..minetest.pos_to_string(posp))
posp = vector.subtract(posp,per)
for j = 1,3 do
--minetest.chat_send_all("pos1:"..minetest.pos_to_string(posp).." per.y= "..dim.y)
if minetest.is_protected(posp, "") then
return
end
local pos1 = posp
for i = 0,dim.y do
--minetest.chat_send_all("pos2:"..minetest.pos_to_string(posp).." per.y= "..per.y)
local n = minetest.env:get_node(pos1).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(pos1, "") or (n == "bones:bones" and not nssm:affectbones(self) ) then
else
--minetest.env:set_node(p, {name="air"})
minetest.remove_node(pos1)
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(pos1, "")) ) then
--minetest.env:set_node(p, {name="air"})
minetest.remove_node(pos1)
end
end
pos1.y = pos1.y+1
end
posp.y=s.y
posp=vector.add(posp,per)
--minetest.chat_send_all("pos3:"..minetest.pos_to_string(posp).." per.y= "..per.y)
end
end
end
function putting_ability( --puts under the mob the block defined as 'p_block'
self, --the entity of the mob
p_block, --definition of the block to use
max_vel --max velocity of the mob
)
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
local v = self.object:getvelocity()
@ -277,23 +421,36 @@ function nssm:putting_ability( --puts under the mob the block defined as 'p_blo
pos1 = {x = pos.x+dx, y = pos.y, z = pos.z+dz}
local n = minetest.env:get_node(pos).name
local n1 = minetest.env:get_node(pos1).name
if n~=p_block and not minetest.is_protected(pos, "") then
local oldmetainf = {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.env:set_node(pos, {name=p_block})
if nssm.cryosave then
local metai = minetest.get_meta(pos)
metai:from_table(oldmetainf[1]) -- this is enough to save the meta
metai:set_string("nssm",n)
end
end
if n1~=p_block and not minetest.is_protected(pos1, "") then
if n1~=p_block and not minetest.is_protected(pos1, "") and (n == "bones:bones" and nssm:affectbones(self) ) and n~="air" then
minetest.env:set_node(pos1, {name=p_block})
if nssm.cryosave then
local metai = minetest.get_meta(pos1)
metai:from_table(oldmetainf[2]) -- this is enough to save the meta
metai:set_string("nssm",n1)
end
end
end
function nssm:webber_ability( --puts randomly around the block defined as w_block
function webber_ability( --puts randomly around the block defined as w_block
self, --the entity of the mob
w_block, --definition of the block to use
radius --max distance the block can be put
)
if (nssm:virulence(self)~=0) and (math.random(1,nssm:virulence(self)) ~= 1) then return end
local pos = self.object:getpos()
if (math.random(1,5)==1) then
if (math.random(1,55)==1) then
local dx=math.random(1,radius)
local dz=math.random(1,radius)
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
@ -306,13 +463,14 @@ function nssm:webber_ability( --puts randomly around the block defined as w_blo
end
end
function nssm: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
m_block,
max_vel, --max velocity of the mob
mult, --multiplier of the dimensions of the area around that need the transformation
height --height of the mob
)
--if math.random(1,nssm:virulence(self)) ~= 1 then return end
local v = self.object:getvelocity()
local pos = self.object:getpos()
@ -334,15 +492,15 @@ function nssm:midas_ability( --ability to transform every blocks it touches in
local multiplier = mult
if x>0 then
i = nssm:round(x*max_vel)*multiplier
i = round(x*max_vel)*multiplier
else
i1 = nssm:round(x*max_vel)*multiplier
i1 = round(x*max_vel)*multiplier
end
if z>0 then
k = nssm:round(z*max_vel)*multiplier
k = round(z*max_vel)*multiplier
else
k1 = nssm:round(z*max_vel)*multiplier
k1 = round(z*max_vel)*multiplier
end
for dx = i1, i do
@ -351,7 +509,7 @@ function nssm:midas_ability( --ability to transform every blocks it touches in
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.env:get_node(p).name
if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or n=="air" then
if minetest.get_item_group(n, "unbreakable") == 1 or minetest.is_protected(p, "") or n=="air" or (n == "bones:bones" and not nssm:affectbones(self)) then
else
minetest.env:set_node(p, {name=m_block})
end
@ -359,3 +517,368 @@ function nssm:midas_ability( --ability to transform every blocks it touches in
end
end
end
-- NEW EXPLOSION FUNCTION
-- loss probabilities array (one in X will be lost)
local loss_prob = {}
loss_prob["default:cobble"] = 3
loss_prob["default:dirt"] = 4
local tnt_radius = tonumber(minetest.setting_get("tnt_radius") or 3)
local cid_data = {}
minetest.after(0, function()
for name, def in pairs(minetest.registered_nodes) do
cid_data[minetest.get_content_id(name)] = {
name = name,
drops = def.drops,
flammable = def.groups.flammable,
on_blast = def.on_blast,
}
end
end)
local function rand_pos(center, pos, radius)
local def
local reg_nodes = minetest.registered_nodes
local i = 0
repeat
-- Give up and use the center if this takes too long
if i > 4 then
pos.x, pos.z = center.x, center.z
break
end
pos.x = center.x + math.random(-radius, radius)
pos.z = center.z + math.random(-radius, radius)
def = reg_nodes[minetest.get_node(pos).name]
i = i + 1
until def and not def.walkable
end
local function add_effects(pos, radius, drops)
minetest.add_particle({
pos = pos,
velocity = vector.new(),
acceleration = vector.new(),
expirationtime = 0.4,
size = radius * 10,
collisiondetection = false,
vertical = false,
texture = "tnt_boom.png",
})
minetest.add_particlespawner({
amount = 64,
time = 0.5,
minpos = vector.subtract(pos, radius / 2),
maxpos = vector.add(pos, radius / 2),
minvel = {x = -10, y = -10, z = -10},
maxvel = {x = 10, y = 10, z = 10},
minacc = vector.new(),
maxacc = vector.new(),
minexptime = 1,
maxexptime = 2.5,
minsize = radius * 3,
maxsize = radius * 5,
texture = "tnt_smoke.png",
})
-- we just dropped some items. Look at the items entities and pick
-- one of them to use as texture
local texture = "tnt_blast.png" --fallback texture
local most = 0
for name, stack in pairs(drops) do
local count = stack:get_count()
if count > most then
most = count
local def = minetest.registered_nodes[name]
if def and def.tiles and def.tiles[1] then
texture = def.tiles[1]
end
end
end
minetest.add_particlespawner({
amount = 64,
time = 0.1,
minpos = vector.subtract(pos, radius / 2),
maxpos = vector.add(pos, radius / 2),
minvel = {x = -3, y = 0, z = -3},
maxvel = {x = 3, y = 5, z = 3},
minacc = {x = 0, y = -10, z = 0},
maxacc = {x = 0, y = -10, z = 0},
minexptime = 0.8,
maxexptime = 2.0,
minsize = radius * 0.66,
maxsize = radius * 2,
texture = texture,
collisiondetection = true,
})
end
local function eject_drops(drops, pos, radius)
local drop_pos = vector.new(pos)
for _, item in pairs(drops) do
local count = math.min(item:get_count(), item:get_stack_max())
while count > 0 do
local take = math.max(1,math.min(radius * radius,
count,
item:get_stack_max()))
rand_pos(pos, drop_pos, radius)
local dropitem = ItemStack(item)
dropitem:set_count(take)
local obj = minetest.add_item(drop_pos, dropitem)
if obj then
obj:get_luaentity().collect = true
obj:setacceleration({x = 0, y = -10, z = 0})
obj:setvelocity({x = math.random(-3, 3),
y = math.random(0, 10),
z = math.random(-3, 3)})
end
count = count - take
end
end
end
local function calc_velocity(pos1, pos2, old_vel, power)
-- Avoid errors caused by a vector of zero length
if vector.equals(pos1, pos2) then
return old_vel
end
local vel = vector.direction(pos1, pos2)
vel = vector.normalize(vel)
vel = vector.multiply(vel, power)
-- Divide by distance
local dist = vector.distance(pos1, pos2)
dist = math.max(dist, 1)
vel = vector.divide(vel, dist)
-- Add old velocity
vel = vector.add(vel, old_vel)
-- randomize it a bit
vel = vector.add(vel, {
x = math.random() - 0.5,
y = math.random() - 0.5,
z = math.random() - 0.5,
})
-- Limit to terminal velocity
dist = vector.length(vel)
if dist > 250 then
vel = vector.divide(vel, dist / 250)
end
return vel
end
local function entity_physics(pos, radius, drops)
local objs = minetest.get_objects_inside_radius(pos, radius)
for _, obj in pairs(objs) do
local obj_pos = obj:getpos()
local dist = math.max(1, vector.distance(pos, obj_pos))
local damage = (4 / dist) * radius
if obj:is_player() then
-- currently the engine has no method to set
-- player velocity. See #2960
-- instead, we knock the player back 1.0 node, and slightly upwards
local dir = vector.normalize(vector.subtract(obj_pos, pos))
local moveoff = vector.multiply(dir, dist + 1.0)
local newpos = vector.add(pos, moveoff)
newpos = vector.add(newpos, {x = 0, y = 0.2, z = 0})
obj:setpos(newpos)
obj:set_hp(obj:get_hp() - damage)
else
local do_damage = true
local do_knockback = true
local entity_drops = {}
local luaobj = obj:get_luaentity()
local objdef = minetest.registered_entities[luaobj.name]
local name = luaobj.name
if objdef and objdef.on_blast then
if ((name == "nssm:pumpking") or (name == "nssm:morvalar0") or (name== "nssm:morvalar5")) then
do_damage = false
do_knockback = false
else
do_damage, do_knockback, entity_drops = objdef.on_blast(luaobj, damage)
end
end
if do_knockback then
local obj_vel = obj:getvelocity()
obj:setvelocity(calc_velocity(pos, obj_pos,
obj_vel, radius * 10))
end
if do_damage then
if not obj:get_armor_groups().immortal then
obj:punch(obj, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = damage},
}, nil)
end
end
for _, item in pairs(entity_drops) do
add_drop(drops, item)
end
end
end
end
local function add_drop(drops, item)
item = ItemStack(item)
local name = item:get_name()
if loss_prob[name] ~= nil and math.random(1, loss_prob[name]) == 1 then
return
end
local drop = drops[name]
if drop == nil then
drops[name] = item
else
drop:set_count(drop:get_count() + item:get_count())
end
end
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
return cid
end
local def = cid_data[cid]
if not def then
return c_air
elseif not ignore_on_blast and def.on_blast then
on_blast_queue[#on_blast_queue + 1] = {pos = vector.new(npos), on_blast = def.on_blast}
return cid
elseif def.flammable then
return c_fire
else
local node_drops = minetest.get_node_drops(def.name, "")
for _, item in pairs(node_drops) do
add_drop(drops, item)
end
return c_air
end
end
local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
pos = vector.round(pos)
-- scan for adjacent TNT nodes first, and enlarge the explosion
local vm1 = VoxelManip()
local p1 = vector.subtract(pos, 2)
local p2 = vector.add(pos, 2)
local minp, maxp = vm1:read_from_map(p1, p2)
local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
local data = vm1:get_data()
local count = 0
local c_tnt = minetest.get_content_id("tnt:tnt")
local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning")
local c_tnt_boom = minetest.get_content_id("tnt:boom")
local c_air = minetest.get_content_id("air")
for z = pos.z - 2, pos.z + 2 do
for y = pos.y - 2, pos.y + 2 do
local vi = a:index(pos.x - 2, y, z)
for x = pos.x - 2, pos.x + 2 do
local cid = data[vi]
if cid == c_tnt or cid == c_tnt_boom or cid == c_tnt_burning then
count = count + 1
data[vi] = c_air
end
vi = vi + 1
end
end
end
vm1:set_data(data)
vm1:write_to_map()
-- recalculate new radius
radius = math.floor(radius * math.pow(count, 1/3))
-- perform the explosion
local vm = VoxelManip()
local pr = PseudoRandom(os.time())
p1 = vector.subtract(pos, radius)
p2 = vector.add(pos, radius)
minp, maxp = vm:read_from_map(p1, p2)
a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp})
data = vm:get_data()
local drops = {}
local on_blast_queue = {}
local c_fire = minetest.get_content_id("fire:basic_flame")
for z = -radius, radius do
for y = -radius, radius do
local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z)
for x = -radius, radius do
local r = vector.length(vector.new(x, y, z))
if (radius * radius) / (r * r) >= (pr:next(80, 125) / 100) then
local cid = data[vi]
local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z}
if cid ~= c_air then
data[vi] = destroy(drops, p, cid, c_air, c_fire,
on_blast_queue, ignore_protection,
ignore_on_blast)
end
end
vi = vi + 1
end
end
end
vm:set_data(data)
vm:write_to_map()
vm:update_map()
vm:update_liquids()
-- call nodeupdate for everything within 1.5x blast radius
for y = -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
local rad = {x = x, y = y, z = z}
local s = vector.add(pos, rad)
local r = vector.length(rad)
if r / radius < 1.4 then
nodeupdate_single(s)
end
end
end
end
for _, queued_data in pairs(on_blast_queue) do
local dist = math.max(1, vector.distance(queued_data.pos, pos))
local intensity = (radius * radius) / (dist * dist)
local node_drops = queued_data.on_blast(queued_data.pos, intensity)
if node_drops then
for _, item in pairs(node_drops) do
add_drop(drops, item)
end
end
end
return drops, radius
end
function tnt_boom_nssm(pos, def)
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
minetest.set_node(pos, {name = "tnt:boom"})
local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection,
def.ignore_on_blast)
-- append entity drops
local damage_radius = (radius / def.radius) * def.damage_radius
entity_physics(pos, damage_radius, drops)
if not def.disable_drops then
eject_drops(drops, pos, radius)
end
add_effects(pos, radius, drops)
end

193
nssm_armor.lua Normal file
View File

@ -0,0 +1,193 @@
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:sandbloco_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
--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,
})
local m = materials[k]
minetest.register_craft({
output = "nssm:shield_"..k,
recipe = {
{m, m, m},
{m, m, m},
{"", m, ""},
},
})
end
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,
})
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:iron_ingot", "", "default:iron_ingot"},
{"default:iron_ingot", "nssm:snake_scute", "default:iron_ingot"},
{"default:iron_ingot", "default:iron_ingot", "default:iron_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", ""},
{"", "", ""},
},
})
end

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,14 @@ function spears_shot (itemstack, player)
local playerpos = player:getpos()
local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, spear)
local dir = player:get_look_dir()
local sp = 16
if spear == "nssm:spear_of_peace_entity" then
sp = 32
gravity = 9.8
else
sp = 16
gravity = 9.8
end
local dr = .3
local gravity = 9.8
obj:setvelocity({x=dir.x*sp, y=dir.y*sp, z=dir.z*sp})
obj:setacceleration({x=-dir.x*dr, y=-gravity, z=-dir.z*dr})
obj:setyaw(player:get_look_yaw()+math.pi)
@ -16,6 +21,7 @@ function spears_shot (itemstack, player)
return true
end
function spears_set_entity(kind, eq, toughness)
local SPEAR_ENTITY={
physical = false,
@ -83,7 +89,7 @@ end
function spears_register_spear(kind, desc, eq, toughness, material)
minetest.register_tool("nssm:spear_" .. kind, {
description = desc .. " spear",
description = desc .. " Spear",
wield_image = "spear_" .. kind .. ".png",
inventory_image = "spear_" .. kind .. ".png^[transform4",
wield_scale= {x=2,y=1,z=1},
@ -142,3 +148,111 @@ spears_register_spear('ice_tooth', 'Ice Tooth', 16, 200, 'nssm:ice_tooth')
spears_register_spear('little_ice_tooth', 'Little Ice Tooth', 7, 10, 'nssm:little_ice_tooth')
spears_register_spear('duck_beak', 'Duck Beak', 5, 6, 'nssm:duck_beak')
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},
},
damage_groups = {fleshy=18},
}
})
function spears_set_sentity(kind, eq, toughness)
local SUPERSPEAR_ENTITY={
physical = false,
timer=0,
visual = "wielditem",
visual_size = {x=0.15, y=0.1},
textures = {"nssm:spear_" .. kind},
lastpos={},
collisionbox = {0,0,0,0,0,0},
on_punch = function(self, puncher)
if puncher then
if puncher:is_player() then
local stack = {name='nssm:spear_' .. kind, wear=self.wear+65535/toughness}
local inv = puncher:get_inventory()
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
self.object:remove()
end
end
end
end,
}
SUPERSPEAR_ENTITY.on_step = function(self, dtime)
self.timer=self.timer+dtime
local pos = self.object:getpos()
local node = minetest.get_node(pos)
if not self.wear then
self.object:remove()
return
end
if self.lastpos.x~=nil then
if node.name ~= "air" and not (string.find(node.name, 'grass') and not string.find(node.name, 'dirt')) and not string.find(node.name, 'flowers:') and not string.find(node.name, 'farming:') then
self.object:remove()
if self.wear+65535/toughness < 65535 then
minetest.add_item(self.lastpos, {name='nssm:spear_' .. kind, wear=self.wear+65535/toughness})
end
elseif self.timer>0.2 then
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
for k, obj in pairs(objs) do
if obj:get_luaentity() ~= nil then
if obj:get_luaentity().name ~= "nssm:spear_" .. kind .. "_entity" and obj:get_luaentity().name ~= "__builtin:item" then
local speed = vector.length(self.object:getvelocity())
--minetest.chat_send_all(speed)
local damage = (speed + eq)^1.12-20
obj:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=damage},
}, nil)
self.object:remove()
if self.wear+65535/toughness < 65535 then
minetest.add_item(self.lastpos, {name='nssm:spear_' .. kind, wear=self.wear+65535/toughness})
end
end
end
end
end
end
self.lastpos={x=pos.x, y=pos.y, z=pos.z}
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'},
}
})

View File

@ -16,7 +16,7 @@ local function weapons_shot(itemstack, placer, pointed_thing, velocity, name)
end
local function hit(pos, self)
local node = nssm:node_ok(pos).name
local node = node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
@ -177,7 +177,7 @@ local function search_on_step(
vec_min.z = (vec_min.z/max_diff)*vel
obj_p = obj_min:getpos()
if min_dist < 1 then
local node = nssm:node_ok(pos).name
local node = node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
@ -187,7 +187,7 @@ local function search_on_step(
end
local n = minetest.env:get_node(pos).name
if n ~= "air" and n ~= "default:water_source" and n ~= "default:water_flowing" then
local node = nssm:node_ok(pos).name
local node = node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
@ -213,22 +213,29 @@ local function default_on_step(
if os.time() - self.life_time > max_time then
local node = nssm:node_ok(pos).name
local node = node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
end
self.timer = self.timer + dtime
--minetest.chat_send_all("Timer: "..self.timer)
--while going around it damages entities
local objects = minetest.env:get_objects_inside_radius(pos, 2)
if self.timer > 0.3 then
if self.timer > 0.1 then
self.timer = 0
for _,obj in ipairs(objects) do
obj:set_hp(obj:get_hp()-damage)
if (obj:get_hp() <= 0) then
if (not obj:is_player()) and obj:get_entity_name() ~= self.object:get_luaentity().name then
obj:remove()
if obj:get_luaentity() then
if (obj:get_entity_name() ~= self.object:get_luaentity().name) and (obj:get_luaentity().name ~= "__builtin:item") 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
--minetest.chat_send_all("Danneggiato: "..obj:get_entity_name().." Vita: "..obj:get_luaentity().health)
check_for_death(obj:get_luaentity())
end
end
end
end
@ -236,7 +243,7 @@ local function default_on_step(
local n = minetest.env:get_node(pos).name
if n==not_transparent or minetest.get_item_group(n, not_transparent)==1 then
local node = nssm:node_ok(pos).name
local node = node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
@ -318,22 +325,25 @@ local function nssm_register_weapon(name, def)
end,
move = def.move,
life_time = 0,
timer = 0
timer = 0,
custom_timer = 0,
})
minetest.register_tool("nssm:"..name.."_hand", {
minetest.register_craftitem("nssm:"..name.."_hand", {
description = def.description,
inventory_image = name.."_hand.png",
on_use = function(itemstack, placer, pointed_thing)
weapons_shot(itemstack, placer, pointed_thing, def.velocity, name)
itemstack:take_item()
return itemstack
end,
on_drop = def.on_drop or function(itemstack, user, pointed_thing)
end,
})
minetest.register_craft({
output = 'nssm:'..name.."_hand",
output = 'nssm:'..name.."_hand 23",
recipe = {
{'nssm:great_energy_globe', 'nssm:great_energy_globe', 'nssm:great_energy_globe'},
{'nssm:great_energy_globe', def.material, 'nssm:great_energy_globe'},
@ -350,7 +360,7 @@ nssm_register_weapon("kamehameha", {
default_on_step(self, dtime, 4, 20, default_dir, 1, "stone", 25)
end,
hit_node = function(self, pos, node)
nssm:explosion(pos, 6, 1)
tnt.boom(pos, {damage_radius=10,radius=6,ignore_protection=false})
end,
material = "default:diamondblock",
description = "Kamehameha from DragonBall",
@ -364,7 +374,7 @@ nssm_register_weapon("kienzan", {
end,
hit_node = function(self, pos, node)
end,
material = "nssm:king_duck_crown",
material = "default:bronzeblock",
description = "Kienzan from DragonBall",
})
@ -375,10 +385,10 @@ nssm_register_weapon("spirit_ball", {
search_on_step(self, dtime, 5, 30, 25)
end,
hit_node = function(self, pos, node)
nssm:explosion(pos, 4, 0)
tnt.boom(pos, {damage_radius=8,radius=4,ignore_protection=false})
end,
material = "nssm:cursed_pumpkin_seed",
material = "default:goldblock",
description = "Spirit Ball from DragonBall",
})
@ -389,13 +399,851 @@ nssm_register_weapon("hellzone_grenade", {
search_on_step2(self, dtime, 30, 30, 25)
end,
hit_node = function(self, pos, node)
nssm:explosion(pos, 4, 0)
tnt.boom(pos, {damage_radius=8,radius=4,ignore_protection=false})
end,
on_drop = function(itemstack, user, pointed_thing)
local pos = user:getpos()
activate_balls(pos)
end,
material = "nssm:snake_scute",
material = "default:mese",
description = "Hellzone grenade (Press q to activate)",
})
--[[nssm_register_weapon("particles_ball", {
velocity = 25,
move = 0,
on_step = function(self, dtime)
local pos = self.object:getpos()
local vel = 1
minetest.add_particlespawner({
amount = 2,
time = 0.01,
minpos = pos,
maxpos = pos,
minvel = {x=3, y=3, z=3},
maxvel = {x=-3, y=-3, z=-3},
minacc = {x=0, y=0, z=0},
maxacc = {x=0, y=0, z=0},
minexptime = 0.5,
maxexptime = 0.5,
minsize = 3,
maxsize = 3,
collisiondetection = false,
vertical = false,
texture = "morparticle.png"
})
--Disappear after a certain time
if self.life_time == 0 then
self.life_time = os.time()
end
if os.time() - self.life_time > 60 then
self.object:remove()
return
end
--Look for an entity to follow
local objects = minetest.env:get_objects_inside_radius(pos, 20)
local min_dist = 100
local obj_min = nil
local obj_p = nil
local vec_min = nil
for _,obj in ipairs(objects) do
if (obj:is_player()) then
elseif (obj:get_luaentity() and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= self.object:get_luaentity().name) then
obj_p = obj:getpos()
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
if (dist<min_dist) then
min_dist = dist
obj_min = obj
vec_min = vec
end
end
end
--Found an entity to follow:
if obj_min ~= nil then
local new_vel = {x=0, y=0, z=0}
local dir = 0
local max_diff = 0
if (max_diff<math.abs(vec_min.x)) then
dir = 1
max_diff = math.abs(vec_min.x)
end
if (max_diff<math.abs(vec_min.y)) then
dir = 2
max_diff = math.abs(vec_min.y)
end
if (max_diff<math.abs(vec_min.z)) then
dir = 3
max_diff = math.abs(vec_min.z)
end
vec_min.x = (vec_min.x/max_diff)*vel
vec_min.y = (vec_min.y/max_diff)*vel
vec_min.z = (vec_min.z/max_diff)*vel
obj_p = obj_min:getpos()
self.object:setvelocity(vec_min)
if min_dist < 1 then
local node = nssm:node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
else
self.object:setvelocity(vec_min)
end
end
local n = minetest.env:get_node(pos).name
if n ~= "air" and n ~= "default:water_source" and n ~= "default:water_flowing" then
local node = nssm:node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
end
end,
hit_node = function(self, pos, node)
--nssm:explosion(pos, 4, 0)
end,
on_drop = function(itemstack, user, pointed_thing)
local pos = user:getpos()
--activate_balls(pos)
end,
material = "group:wood",
description = "Particles ball",
})]]
--[[
nssm_register_weapon("light_ball", {
velocity = 25,
move = 0,
on_step = function(self, dtime, last_pos)
local pos = self.object:getpos()
local vel = 1
--Disappear after a certain time
if self.life_time == 0 then
self.life_time = os.time()
end
if os.time() - self.life_time > 60 then
self.object:remove()
return
end
if self.custom_timer == 0 then
self.custom_timer = os.time()
end
if last_pos == nil or (last_pos ~= nil and last_pos ~= pos) then
minetest.set_node(pos, {name="nssm:invisible_light"})
if last_pos ~= nil then
minetest.set_node(last_pos, {name="air"})
end
last_pos = pos
end
--Look for an entity to follow
local objects = minetest.env:get_objects_inside_radius(pos, 20)
local min_dist = 100
local obj_min = nil
local obj_p = nil
local vec_min = nil
for _,obj in ipairs(objects) do
if (obj:is_player()) then
elseif (obj:get_luaentity() and obj:get_luaentity().name ~= "__builtin:item" and obj:get_luaentity().name ~= self.object:get_luaentity().name) then
obj_p = obj:getpos()
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
if (dist<min_dist) then
min_dist = dist
obj_min = obj
vec_min = vec
end
end
end
--Found an entity to follow:
if obj_min ~= nil then
local new_vel = {x=0, y=0, z=0}
local dir = 0
local max_diff = 0
if (max_diff<math.abs(vec_min.x)) then
dir = 1
max_diff = math.abs(vec_min.x)
end
if (max_diff<math.abs(vec_min.y)) then
dir = 2
max_diff = math.abs(vec_min.y)
end
if (max_diff<math.abs(vec_min.z)) then
dir = 3
max_diff = math.abs(vec_min.z)
end
vec_min.x = (vec_min.x/max_diff)*vel
vec_min.y = (vec_min.y/max_diff)*vel
vec_min.z = (vec_min.z/max_diff)*vel
obj_p = obj_min:getpos()
self.object:setvelocity(vec_min)
if min_dist < 1 then
local node = nssm:node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
else
self.object:setvelocity(vec_min)
end
end
local n = minetest.env:get_node(pos).name
if n ~= "air" and n ~= "default:water_source" and n ~= "default:water_flowing" then
local node = nssm:node_ok(pos).name
self.hit_node(self, pos, node)
self.object:remove()
return
end
end,
hit_node = function(self, pos, node)
--nssm:explosion(pos, 4, 0)
end,
on_drop = function(itemstack, user, pointed_thing)
local pos = user:getpos()
--activate_balls(pos)
end,
material = "group:sand",
description = "Light Ball",
})
]]
function nssm_register_throwitem(name, descr, def)
minetest.register_craftitem("nssm:"..name.."_bomb", {
description = descr,
inventory_image = name.."_bomb.png",
on_use = function(itemstack, placer, pointed_thing)
--weapons_shot(itemstack, placer, pointed_thing, def.velocity, name)
local velocity = 15
local dir = placer:get_look_dir();
local playerpos = placer:getpos();
posthrow = playerpos
local obj = minetest.env:add_entity({x=playerpos.x+0+dir.x,y=playerpos.y+2+dir.y,z=playerpos.z+0+dir.z}, "nssm:"..name.."_bomb_flying")
local vec = {x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}
local acc = {x=0, y=-9.8, z=0}
obj:setvelocity(vec)
obj:setacceleration(acc)
itemstack:take_item()
return itemstack
end,
})
minetest.register_entity("nssm:"..name.."_bomb_flying",{
textures = {name.."_bomb.png"},
hp_max = 20,
collisionbox = {-0.1,-0.1,-0.1, 0.1,0.1,0.1},
on_step = function(self, dtime)
local pos = self.object:getpos()
local node = minetest.get_node(pos)
local n = node.name
if n ~= "air" then
def.hit_node(self, pos)
self.object:remove()
end
end,
})
end
nssm_register_throwitem("cobweb", "Cobweb Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = -1,1 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssm:web"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:cobweb_bomb 8',
recipe = {
{'nssm:silk_gland', 'nssm:black_powder', 'nssm:silk_gland'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:silk_gland', 'nssm:black_powder', 'nssm:silk_gland'},
}
})
nssm_register_throwitem("ice", "Ice Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,3 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local pos2 = {x = pos.x, y=pos.y+1, z=pos.z}
local pos3 = {x = pos.x, y=pos.y+2, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="default:ice"})
minetest.set_node(pos2, {name="air"})
minetest.set_node(pos3, {name="air"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:ice_bomb 8',
recipe = {
{'nssm:frosted_amphibian_heart', 'nssm:black_powder', 'nssm:frosted_amphibian_heart'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:frosted_amphibian_heart', 'nssm:black_powder', 'nssm:frosted_amphibian_heart'},
}
})
if minetest.get_modpath("nssb") then
nssm_register_throwitem("mantis", "Mantis Clay Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,3 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local pos2 = {x = pos.x, y=pos.y+1, z=pos.z}
local pos3 = {x = pos.x, y=pos.y+2, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssb:hardened_mantis_clay"})
minetest.set_node(pos2, {name="air"})
minetest.set_node(pos3, {name="air"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:mantis_bomb 8',
recipe = {
{'nssm:mantis_meat', 'nssm:black_powder', 'nssm:mantis_meat'},
{'nssm:black_powder', 'nssb:hardened_mantis_clay', 'nssm:black_powder'},
{'nssm:mantis_meat', 'nssm:black_powder', 'nssm:mantis_meat'},
}
})
end
nssm_register_throwitem("lava", "Lava Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = -1,0 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="default:lava_source"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:lava_bomb 12',
recipe = {
{'bucket:bucket_lava', 'nssm:black_powder', 'bucket:bucket_lava'},
{'nssm:black_powder', 'nssm:lava_titan_eye', 'nssm:black_powder'},
{'bucket:bucket_lava', 'nssm:black_powder', 'bucket:bucket_lava'},
}
})
nssm_register_throwitem("water", "Water Bomb", {
hit_node = function(self,pos)
for dx = -2,2 do
for dy = -1,0 do
for dz = -2,2 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="default:water_source"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:water_bomb 10',
recipe = {
{'bucket:bucket_water', 'nssm:black_powder', 'bucket:bucket_water'},
{'nssm:black_powder', 'nssm:tentacle_curly', 'nssm:black_powder'},
{'bucket:bucket_water', 'nssm:black_powder', 'bucket:bucket_water'},
}
})
nssm_register_throwitem("fire", "Fire Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,1 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="fire:basic_flame"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:fire_bomb 6',
recipe = {
{'fire:flint_and_steel', 'nssm:black_powder', 'fire:flint_and_steel'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'fire:flint_and_steel', 'nssm:black_powder', 'fire:flint_and_steel'},
}
})
if minetest.get_modpath("nssb") then
nssm_register_throwitem("mornar", "Mornar Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,1 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssb:mornar"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:mornar_bomb 6',
recipe = {
{'nssm:wrathful_soul_fragment', 'nssm:black_powder', 'nssm:wrathful_soul_fragment'},
{'nssm:black_powder', 'nssm:wrathful_soul_fragment', 'nssm:black_powder'},
{'nssm:wrathful_soul_fragment', 'nssm:black_powder', 'nssm:wrathful_soul_fragment'},
}
})
end
nssm_register_throwitem("hole", "Hole Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = -10,0 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="air"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:hole_bomb 10',
recipe = {
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:digested_sand', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
}
})
nssm_register_throwitem("food", "Food Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = -1,1 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="air"})
minetest.add_item(pos1, "nssm:roasted_duck_legs")
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:food_bomb 8',
recipe = {
{'nssm:gluttonous_soul_fragment', 'nssm:black_powder', 'nssm:gluttonous_soul_fragment'},
{'nssm:black_powder', 'nssm:gluttonous_soul_fragment', 'nssm:black_powder'},
{'nssm:gluttonous_soul_fragment', 'nssm:black_powder', 'nssm:gluttonous_soul_fragment'},
}
})
nssm_register_throwitem("phoenix_fire", "Phoenix Fire Bomb", {
hit_node = function(self,pos)
for dx = -2,2 do
for dy = 0,1 do
for dz = -2,2 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssm:phoenix_fire"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:phoenix_fire_bomb 10',
recipe = {
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:sun_feather', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
}
})
nssm_register_throwitem("kaboom", "Explosive Bomb", {
hit_node = function(self,pos)
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
tnt.boom(pos1, {damage_radius=3,radius=2,ignore_protection=false})
end
end,
})
minetest.register_craft({
output = 'nssm:kaboom_bomb 3',
recipe = {
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
}
})
nssm_register_throwitem("teleport", "Teleport Bomb", {
hit_node = function(self,pos,placer)
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
local pos2 = {x = pos.x, y=pos.y+2, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
for _,obj in ipairs(minetest.get_objects_inside_radius(posthrow, 2)) do
if obj:is_player() then
obj:setpos(pos1)
minetest.set_node(pos1, {name="air"})
minetest.set_node(pos2, {name="air"})
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:teleport_bomb 10',
recipe = {
{'nssm:slothful_soul_fragment', 'nssm:black_powder', 'nssm:slothful_soul_fragment'},
{'nssm:black_powder', 'nssm:slothful_soul_fragment', 'nssm:black_powder'},
{'nssm:slothful_soul_fragment', 'nssm:black_powder', 'nssm:slothful_soul_fragment'},
}
})
nssm_register_throwitem("boom", "Boom Bomb", {
hit_node = function(self,pos)
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
tnt.boom(pos1, {damage_radius=4,radius=3,ignore_protection=false})
end
end,
})
minetest.register_craft({
output = 'nssm:boom_bomb 10',
recipe = {
{'nssm:greedy_soul_fragment', 'nssm:black_powder', 'nssm:greedy_soul_fragment'},
{'nssm:black_powder', 'nssm:greedy_soul_fragment', 'nssm:black_powder'},
{'nssm:greedy_soul_fragment', 'nssm:black_powder', 'nssm:greedy_soul_fragment'},
}
})
nssm_register_throwitem("smoke", "Smoke Bomb", {
hit_node = function(self,pos)
local pos1 = {x = pos.x, y=pos.y, z=pos.z}
minetest.add_particlespawner({
amount = 6000,
time = 20,
minpos = {x=pos1.x-3, y=pos1.y+0.5, z=pos1.z-3},
maxpos = {x=pos1.x+3, y=pos1.y+0.5, z=pos1.z+3},
minvel = {x=0.2, y=0.2, z=0.2},
maxvel = {x=0.4, y=0.8, z=0.4},
minacc = {x=-0.2,y=0,z=-0.2},
maxacc = {x=0.2,y=0.1,z=0.2},
minexptime = 6,
maxexptime = 8,
minsize = 10,
maxsize = 12,
collisiondetection = false,
vertical = false,
texture = "tnt_smoke.png",})
end,
})
minetest.register_craft({
output = 'nssm:smoke_bomb 6',
recipe = {
{'nssm:proud_soul_fragment', 'nssm:black_powder', 'nssm:proud_soul_fragment'},
{'nssm:black_powder', 'nssm:proud_soul_fragment', 'nssm:black_powder'},
{'nssm:proud_soul_fragment', 'nssm:black_powder', 'nssm:proud_soul_fragment'},
}
})
nssm_register_throwitem("thick_web", "Thick Web Bomb", {
hit_node = function(self,pos)
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
local pos2 = {x = pos.x, y=pos.y+2, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssm:thick_web"})
minetest.set_node(pos2, {name="nssm:thick_web"})
end
end,
})
minetest.register_craft({
output = 'nssm:thick_web_bomb 12',
recipe = {
{'nssm:super_silk_gland', 'nssm:black_powder', 'nssm:super_silk_gland'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:super_silk_gland', 'nssm:black_powder', 'nssm:super_silk_gland'},
}
})
nssm_register_throwitem("poison", "Poison Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,3 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssm:venomous_gas"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:poison_bomb 10',
recipe = {
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:snake_scute', 'nssm:black_powder'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
}
})
nssm_register_throwitem("stone", "Cobblestone Bomb", {
hit_node = function(self,pos)
for dx = -1,1 do
for dy = 1,3 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="default:cobble"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:stone_bomb 6',
recipe = {
{'default:stone', 'nssm:black_powder', 'default:stone'},
{'nssm:black_powder', 'nssm:black_powder', 'nssm:black_powder'},
{'default:stone', 'nssm:black_powder', 'default:stone'},
}
})
nssm_register_throwitem("fire_ring", "Fire Ring Bomb", {
hit_node = function(self,pos)
for dx = -2,2 do
for dy = 1,2 do
for dz = -2,2 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="fire:basic_flame"})
for dx = -1,1 do
for dy = 1,2 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
minetest.set_node(pos1, {name="air"})
end
end
end
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:fire_ring_bomb 3',
recipe = {
{'fire:flint_and_steel', 'fire:flint_and_steel', 'fire:flint_and_steel'},
{'fire:flint_and_steel', 'nssm:black_powder', 'fire:flint_and_steel'},
{'fire:flint_and_steel', 'fire:flint_and_steel', 'fire:flint_and_steel'},
}
})
if minetest.get_modpath("nssb") then
nssm_register_throwitem("cage", "Cage Bomb", {
hit_node = function(self,pos)
for dx = -2,2 do
for dy = 0,3 do
for dz = -2,2 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="nssb:morentir"})
for dx = -1,1 do
for dy = 1,2 do
for dz = -1,1 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
minetest.set_node(pos1, {name="air"})
end
end
end
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:cage_bomb 10',
recipe = {
{'nssm:lustful_soul_fragment', 'nssm:black_powder', 'nssm:lustful_soul_fragment'},
{'nssm:black_powder', 'nssm:lustful_soul_fragment', 'nssm:black_powder'},
{'nssm:lustful_soul_fragment', 'nssm:black_powder', 'nssm:lustful_soul_fragment'},
}
})
end
nssm_register_throwitem("water_column", "Water Column Bomb", {
hit_node = function(self,pos)
for dx = 0,0 do
for dy = 1,10 do
for dz = 0,0 do
local pos1 = {x = pos.x+dx, y=pos.y+dy, z=pos.z+dz}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
minetest.set_node(pos1, {name="default:water_source"})
end
end
end
end
end,
})
minetest.register_craft({
output = 'nssm:water_column_bomb 6',
recipe = {
{'bucket:bucket_water', 'nssm:black_powder', 'bucket:bucket_water'},
{'bucket:bucket_water', 'nssm:black_powder', 'bucket:bucket_water'},
{'bucket:bucket_water', 'nssm:black_powder', 'bucket:bucket_water'},
}
})
minetest.register_craft({
output = 'nssm:empty_evocation_bomb 10',
recipe = {
{'nssm:envious_soul_fragment', 'nssm:black_powder', 'nssm:envious_soul_fragment'},
{'nssm:black_powder', 'nssm:envious_soul_fragment', 'nssm:black_powder'},
{'nssm:envious_soul_fragment', 'nssm:black_powder', 'nssm:envious_soul_fragment'},
}
})
function nssm_register_throwegg(name, descr, def)
minetest.register_craftitem("nssm:"..name.."_bomb", {
description = descr,
inventory_image = "evocation_bomb.png^"..name.."_egg.png",
on_use = function(itemstack, placer, pointed_thing)
--weapons_shot(itemstack, placer, pointed_thing, def.velocity, name)
local velocity = 15
local dir = placer:get_look_dir();
local playerpos = placer:getpos();
local obj = minetest.env:add_entity({x=playerpos.x+0+dir.x,y=playerpos.y+2+dir.y,z=playerpos.z+0+dir.z}, "nssm:"..name.."_bomb_flying")
local vec = {x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}
local acc = {x=0, y=-9.8, z=0}
obj:setvelocity(vec)
obj:setacceleration(acc)
itemstack:take_item()
return itemstack
end,
})
minetest.register_entity("nssm:"..name.."_bomb_flying",{
textures = {"evocation_bomb.png^"..name.."_egg.png"},
on_step = function(self, dtime)
local pos = self.object:getpos()
local node = minetest.get_node(pos)
local n = node.name
if n ~= "air" then
def.hit_node(self, pos)
self.object:remove()
end
end,
})
end
function nssm_register_evocation (evomob, evodescr, numbe)
nssm_register_throwegg(evomob, evodescr.." Bomb", {
hit_node = function(self,pos)
local pos1 = {x = pos.x, y=pos.y+1, z=pos.z}
if not minetest.is_protected(pos1, "") or not minetest.get_item_group(minetest.get_node(pos1).name, "unbreakable") == 1 then
for n=1,numbe do
minetest.add_entity(pos1, "nssm:".. evomob)
end
end
end,
})
minetest.register_craft({
output = 'nssm:'..evomob.."_bomb",
type = "shapeless",
recipe = {'nssm:empty_evocation_bomb', 'nssm:'..evomob.."_egg"},
})
end
nssm_register_evocation ("duck","Duck Evocation", 4)
nssm_register_evocation ("bloco","Bloco Evocation", 3)
nssm_register_evocation ("enderduck","Enderduck Evocation", 2)
nssm_register_evocation ("flying_duck","Flying Duck Evocation", 3)
nssm_register_evocation ("swimming_duck","Swimming Duck Evocation", 3)
nssm_register_evocation ("duckking","Duckking Evocation", 1)
nssm_register_evocation ("spiderduck","Spiderduck Evocation", 2)

15
settingtypes.txt Normal file
View File

@ -0,0 +1,15 @@
# ABOUT SETTINGS
# Mapgen: write here (after "int") 6 (mgv6) or 7 (mgv7 or valleys or fractal or flat)
mymapgenis (Mapgen) int 7
# Mobs-Multiplier: multiplier defining the spawn abundance for the mobs:
# 0 = spawn disabled
# a number between 0 and 1000 = less then default
# 1000 = default
# more than 1000 = suicide is not the fastest way of dying
multimobs (Multimobs) int 1000
# Difficult-level:
# Multiplier to raise life and damage of the mobs
mob_difficulty (Mob_difficulty) int 1

BIN
sounds/felucco.ogg Normal file

Binary file not shown.

BIN
sounds/kamehameha.ogg Normal file

Binary file not shown.

BIN
sounds/mordain.ogg Normal file

Binary file not shown.

BIN
sounds/morde.ogg Normal file

Binary file not shown.

BIN
sounds/morgre1.ogg Normal file

Binary file not shown.

BIN
sounds/morgre2.ogg Normal file

Binary file not shown.

BIN
sounds/morgut.ogg Normal file

Binary file not shown.

BIN
sounds/morlu1.ogg Normal file

Binary file not shown.

BIN
sounds/morlu2.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar1.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar2.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar3.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar4.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar5.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar6.ogg Normal file

Binary file not shown.

BIN
sounds/morvalar7.ogg Normal file

Binary file not shown.

BIN
sounds/morvy.ogg Normal file

Binary file not shown.

BIN
sounds/morwa.ogg Normal file

Binary file not shown.

BIN
sounds/sandworm.ogg Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More