2021-04-06 12:06:53 -06:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
|
|
|
|
|
|
|
nssm:register_mob("nssm:morwa", S("Morwa"), {
|
2018-12-23 05:01:58 +00:00
|
|
|
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,
|
2016-05-22 13:49:26 +02:00
|
|
|
arrow = "nssm:morarrow",
|
|
|
|
shoot_interval = 2,
|
|
|
|
shoot_offset = 0,
|
2018-12-23 05:01:58 +00:00
|
|
|
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)
|
2021-04-05 23:40:26 -06:00
|
|
|
local pos = self.object:get_pos()
|
2018-12-23 05:01:58 +00:00
|
|
|
local light = minetest.get_node_light(pos)
|
|
|
|
--minetest.chat_send_all("Luce: "..light)
|
|
|
|
if (light < 8) then
|
|
|
|
self.object:remove()
|
2021-04-05 23:40:26 -06:00
|
|
|
minetest.set_node(pos, {name="nssm:morwa_statue"})
|
2018-12-23 05:01:58 +00:00
|
|
|
end
|
|
|
|
end,
|
2016-05-22 13:49:26 +02:00
|
|
|
})
|