2018-08-08 12:56:14 +03:00
|
|
|
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",
|
2020-07-26 21:42:13 +03:00
|
|
|
textures = {
|
|
|
|
{"masticone.png"}
|
|
|
|
},
|
|
|
|
visual_size = {x = 4, y = 4},
|
2018-08-08 12:56:14 +03:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
view_range = 15,
|
|
|
|
lifetimer = 500,
|
|
|
|
fear_height = 4,
|
|
|
|
rotate = 270,
|
|
|
|
walk_velocity = 1.5,
|
|
|
|
run_velocity = 2.5,
|
2018-08-09 13:57:31 +03:00
|
|
|
sounds = {
|
2018-08-08 12:56:14 +03:00
|
|
|
random = "masticone",
|
|
|
|
},
|
|
|
|
damage = 5,
|
|
|
|
jump = true,
|
|
|
|
drops = {
|
2020-07-26 21:42:13 +03:00
|
|
|
{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},
|
2018-08-08 12:56:14 +03:00
|
|
|
},
|
|
|
|
armor = 60,
|
|
|
|
drawtype = "front",
|
|
|
|
water_damage = 0,
|
2020-07-26 21:42:13 +03:00
|
|
|
lava_damage = 10,
|
|
|
|
floats = 0,
|
2018-08-08 12:56:14 +03:00
|
|
|
light_damage = 0,
|
2020-07-26 21:42:13 +03:00
|
|
|
group_attack = true,
|
|
|
|
attack_animals = true,
|
|
|
|
knock_back = 4,
|
|
|
|
blood_texture = "nssm_blood_blue.png",
|
|
|
|
stepheight = 1.1,
|
2018-08-08 12:56:14 +03:00
|
|
|
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)
|
2020-07-26 21:42:13 +03:00
|
|
|
|
2018-08-08 12:56:14 +03:00
|
|
|
self.object:remove()
|
2020-07-26 21:42:13 +03:00
|
|
|
|
2018-08-08 12:56:14 +03:00
|
|
|
core.after(2, function()
|
2020-07-26 21:42:13 +03:00
|
|
|
|
2018-08-08 12:56:14 +03:00
|
|
|
minetest.add_particlespawner(
|
|
|
|
200, --amount
|
|
|
|
0.1, --time
|
2020-07-26 21:42:13 +03:00
|
|
|
{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
|
2018-08-08 12:56:14 +03:00
|
|
|
0.1, --minexptime
|
|
|
|
1, --maxexptime
|
|
|
|
3, --minsize
|
|
|
|
4, --maxsize
|
|
|
|
false, --collisiondetection
|
|
|
|
"tnt_smoke.png" --texture
|
|
|
|
)
|
|
|
|
|
2020-07-26 21:42:13 +03:00
|
|
|
for i = 1, 2 do
|
2018-08-08 12:56:14 +03:00
|
|
|
|
2020-07-26 21:42:13 +03:00
|
|
|
local pos = {
|
|
|
|
x = pos.x + math.random(-1, 1),
|
|
|
|
y = pos.y + 0.5,
|
|
|
|
z = pos.z + math.random(-1, 1)
|
|
|
|
}
|
2018-08-08 12:56:14 +03:00
|
|
|
|
2020-07-26 21:42:13 +03:00
|
|
|
local n = minetest.get_node(pos).name
|
2018-08-08 12:56:14 +03:00
|
|
|
|
2020-07-26 21:42:13 +03:00
|
|
|
if n == "air" then
|
|
|
|
minetest.add_entity(pos, "nssm:masticone")
|
2018-08-08 12:56:14 +03:00
|
|
|
end
|
|
|
|
end
|
2020-07-26 21:42:13 +03:00
|
|
|
end)
|
2018-08-08 12:56:14 +03:00
|
|
|
end,
|
|
|
|
})
|