add missing darts, textures, update code
This commit is contained in:
parent
ad5c0d5a66
commit
cf30f91a67
87
darts.lua
Normal file
87
darts.lua
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
|
||||||
|
|
||||||
|
--crystalgas arrow
|
||||||
|
|
||||||
|
mobs:register_arrow("nssm:crystal_gas_arrow", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
|
textures = {"crystal_arrow.png"},
|
||||||
|
velocity = 8,
|
||||||
|
-- direct hit
|
||||||
|
hit_player = function(self, player)
|
||||||
|
local p = player:get_pos()
|
||||||
|
crystal_gas_explosion(p)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
crystal_gas_explosion(pos)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function crystal_gas_explosion(pos)
|
||||||
|
if minetest.is_protected(pos, "") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for dx= 0,0 do
|
||||||
|
for dy=-1,2 do
|
||||||
|
for dz= 0,0 do
|
||||||
|
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
if minetest.is_protected(p, "") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local n = minetest.get_node(p).name
|
||||||
|
if n== "air" then
|
||||||
|
minetest.set_node(p, {name="nssm:crystal_gas"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Pumpkid bomb
|
||||||
|
|
||||||
|
mobs:register_arrow("nssm:pumpkid_bomb", {
|
||||||
|
visual = "cube",
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
|
textures = {"pumpbomb_top.png","pumpbomb_bottom.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_front.png"},
|
||||||
|
velocity = 8,
|
||||||
|
-- direct hit
|
||||||
|
hit_player = function(self, player)
|
||||||
|
local p = player:get_pos()
|
||||||
|
--local pos1 = {x = pos.x, y=pos.y, z=pos.z}
|
||||||
|
if not minetest.is_protected(p, "") or not minetest.get_item_group(minetest.get_node(p).name, "unbreakable") == 1 then
|
||||||
|
tnt.boom(p, {damage_radius=3,radius=2,ignore_protection=false})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
--local pos1 = {x = pos.x, y=pos.y, z=pos.z}
|
||||||
|
if not minetest.is_protected(pos, "") or not minetest.get_item_group(minetest.get_node(pos).name, "unbreakable") == 1 then
|
||||||
|
tnt.boom(pos, {damage_radius=3,radius=2,ignore_protection=false})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
--Lava_block bomb
|
||||||
|
|
||||||
|
mobs:register_arrow("nssm:lava_block_bomb", {
|
||||||
|
visual = "cube",
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
|
textures = {"default_lava.png","default_lava.png", "default_lava.png", "default_lava.png", "default_lava.png", "default_lava.png"},
|
||||||
|
velocity = 8,
|
||||||
|
-- direct hit
|
||||||
|
hit_player = function(self, player)
|
||||||
|
local p = player:get_pos()
|
||||||
|
if not minetest.is_protected(p, "") or not minetest.get_item_group(minetest.get_node(p).name, "unbreakable") == 1 then
|
||||||
|
minetest.set_node(p, {name="default:lava_source"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
if not minetest.is_protected(pos, "") or not minetest.get_item_group(minetest.get_node(pos).name, "unbreakable") == 1 then
|
||||||
|
minetest.set_node(pos, {name="default:lava_source"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
3
init.lua
3
init.lua
@ -6,6 +6,9 @@ dofile(path.."/nssm_api.lua")
|
|||||||
-- additional items
|
-- additional items
|
||||||
dofile(path.."/nssm_materials.lua")
|
dofile(path.."/nssm_materials.lua")
|
||||||
|
|
||||||
|
-- additional darts
|
||||||
|
dofile(path.."/darts.lua")
|
||||||
|
|
||||||
--Mobs
|
--Mobs
|
||||||
dofile(path.."/mobs/albino_spider.lua")
|
dofile(path.."/mobs/albino_spider.lua")
|
||||||
dofile(path.."/mobs/berinhog.lua")
|
dofile(path.."/mobs/berinhog.lua")
|
||||||
|
@ -66,7 +66,7 @@ mobs:register_mob("nssm:salamander", {
|
|||||||
local pp = {x = p.x, y = p.y +1.5, z = p.z}
|
local pp = {x = p.x, y = p.y +1.5, z = p.z}
|
||||||
local vel = vector.subtract(pp,ss)
|
local vel = vector.subtract(pp,ss)
|
||||||
self:set_animation("punch")
|
self:set_animation("punch")
|
||||||
|
print("-- custom")
|
||||||
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
if minetest.line_of_sight({x = p.x, y = p.y +1.5, z = p.z}, {x = s.x, y = s.y +1.5, z = s.z}) == true then
|
||||||
-- play attack sound
|
-- play attack sound
|
||||||
if self.sounds.attack then
|
if self.sounds.attack then
|
||||||
@ -81,23 +81,23 @@ mobs:register_mob("nssm:salamander", {
|
|||||||
damage_groups = {fleshy=self.damage}
|
damage_groups = {fleshy=self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
|
print("-- particle")
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner({
|
||||||
25, --amount
|
amount = 25, --amount
|
||||||
0.5, --time
|
time = 0.5, --time
|
||||||
ss, --minpos
|
minpos = ss, --minpos
|
||||||
ss, --maxpos
|
maxpos = ss, --maxpos
|
||||||
vector.multiply(vel, 2), --minvel
|
minvel = vector.multiply(vel, 2), --minvel
|
||||||
vector.multiply(vel, 4), --maxvel
|
maxvel = vector.multiply(vel, 4), --maxvel
|
||||||
{x=0,y=0,z=0}, --minacc
|
minacc = {x=0,y=0,z=0}, --minacc
|
||||||
{x=0,y=0,z=0}, --maxacc
|
maxacc = {x=0,y=0,z=0}, --maxacc
|
||||||
1, --minexptime
|
minexptime = 1, --minexptime
|
||||||
1.5, --maxexptime
|
maxexptime = 1.5, --maxexptime
|
||||||
5, --minsize
|
minsize = 5, --minsize
|
||||||
10, --maxsize
|
maxsize = 10, --maxsize
|
||||||
true, --collisiondetection
|
collisiondetection = true, --collisiondetection
|
||||||
"phoenix_fire.png" --texture
|
texture = "phoenix_fire.png" --texture
|
||||||
)
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,21 +81,21 @@ mobs:register_mob("nssm:silversand_dragon", {
|
|||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner({
|
||||||
225, --amount
|
amount = 225, --amount
|
||||||
0.5, --time
|
time = 0.5, --time
|
||||||
ss, --minpos
|
minpos = ss, --minpos
|
||||||
ss, --maxpos
|
maxpos = ss, --maxpos
|
||||||
vector.multiply(vel, 2), --minvel
|
minvel = vector.multiply(vel, 2), --minvel
|
||||||
vector.multiply(vel, 4), --maxvel
|
maxvel = vector.multiply(vel, 4), --maxvel
|
||||||
{x=0,y=0,z=0}, --minacc
|
minacc = {x=0,y=0,z=0}, --minacc
|
||||||
{x=0,y=0,z=0}, --maxacc
|
maxacc = {x=0,y=0,z=0}, --maxacc
|
||||||
4, --minexptime
|
minexptime = 4, --minexptime
|
||||||
5, --maxexptime
|
maxexptime = 5, --maxexptime
|
||||||
5, --minsize
|
minsize = 5, --minsize
|
||||||
10, --maxsize
|
maxsize = 10, --maxsize
|
||||||
true, --collisiondetection
|
collisiondetection = true, --collisiondetection
|
||||||
"silversand_particle.png" --texture
|
texture = "silversand_particle.png" --texture
|
||||||
)
|
})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -61,7 +61,7 @@ minetest.register_node(":nssm:crystal_gas", {
|
|||||||
|
|
||||||
minetest.register_node(":nssm:slug_crystal", {
|
minetest.register_node(":nssm:slug_crystal", {
|
||||||
description = "Slug Crystal",
|
description = "Slug Crystal",
|
||||||
tile_images = {"slug_crystal.png"} ,
|
tiles = {"slug_crystal.png"} ,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
drowning = 10,
|
drowning = 10,
|
||||||
@ -74,7 +74,7 @@ minetest.register_node(":nssm:slug_crystal", {
|
|||||||
|
|
||||||
minetest.register_node(":nssm:coldest_ice", {
|
minetest.register_node(":nssm:coldest_ice", {
|
||||||
description = "Coldest Ice",
|
description = "Coldest Ice",
|
||||||
tile_images = {"coldest_ice.png"} ,
|
tiles = {"coldest_ice.png"} ,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drowning = 2,
|
drowning = 2,
|
||||||
damage_per_second = 1,
|
damage_per_second = 1,
|
||||||
|
BIN
textures/coldest_ice.png
Normal file
BIN
textures/coldest_ice.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 349 B |
BIN
textures/crystal_arrow.png
Normal file
BIN
textures/crystal_arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 B |
BIN
textures/slug_crystal.png
Normal file
BIN
textures/slug_crystal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 276 B |
Loading…
x
Reference in New Issue
Block a user