Mehr Mods hinzugefügt

This commit is contained in:
N-Nachtigal 2025-05-10 23:49:11 +02:00
parent 92a55732cf
commit 9e345a25fb
2805 changed files with 2096013 additions and 0 deletions

View file

@ -0,0 +1,107 @@
mobs:register_mob("nssm:ant_queen", {
type = "monster",
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"}},
visual_size = {x = 6, y = 6},
makes_footstep_sound = true,
view_range = 30,
fear_height = 5,
walk_velocity = 1.5,
run_velocity = 2,
lifetimer = 300,
rotate = 270,
sounds = {
random = "ant",
attack = "ant"
},
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 5, max = 7},
{name = "nssm:ant_queen_abdomen", chance = 1, min = 1, max = 1},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
},
reach = 8,
armor = 40,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 50,
stepheight = 2.1,
knock_back = 0,
jump_height = 12,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 50,
walk_start = 120,
walk_end = 160,
run_start = 120,
run_end = 160,
punch_start = 170,
punch_end = 190
},
custom_attack = function(self)
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:get_pos()
local p = self.attack:get_pos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if mobs:line_of_sight(self, p, s) == true then
-- play attack sound
if self.sounds.attack then
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
end
local pos1 = {
x = s.x + math.random(-3, 3),
y = s.y - 1,
z = s.z + math.random(-3, 3)
}
local objects = core.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 core.get_node(pos1).name == "air"
and counter < 4 then
nssm:explosion_particles(pos1, 1)
core.add_entity(pos1, "nssm:ant_soldier")
end
end
end
end
})

View file

@ -0,0 +1,52 @@
mobs:register_mob("nssm:ant_soldier", {
type = "monster",
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",
textures = {{"ant_soldier.png"}},
visual_size = {x = 3, y = 3},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 3,
rotate = 270,
sounds = {
random = "ant"
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2}
},
reach = 2,
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
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,
speed_run = 35,
stand_start = 1,
stand_end = 60,
walk_start = 90,
walk_end = 130,
run_start = 90,
run_end = 130,
punch_start = 60,
punch_end = 80
}
})

View file

@ -0,0 +1,52 @@
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",
textures = {{"ant_worker.png"}},
visual_size = {x = 2, y = 2},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 0.5,
run_velocity = 2,
rotate = 270,
sounds = {
random = "ant"
},
damage = 2,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 2, min = 1, max = 1},
{name = "nssm:ant_leg", chance = 2, min = 1, max = 6},
{name = "nssm:ant_mandible", chance = 3, min = 1, max = 2},
{name = "nssm:ant_hard_skin", chance = 3, min = 1, max = 2}
},
armor = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
group_attack = true,
knock_back = 4,
attack_animals = false,
blood_texture = "nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 50,
walk_start = 120,
walk_end = 160,
run_start = 120,
run_end = 160,
punch_start = 50,
punch_end = 70
}
})

View file

@ -0,0 +1,63 @@
mobs:register_mob("nssm:black_widow", {
type = "monster",
hp_max = 26,
hp_min = 19,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
mesh = "black_widow.x",
textures = {{"black_widow.png"}},
visual_size = {x = 2, y = 2},
makes_footstep_sound = true,
view_range = 15,
fear_height = 4,
walk_velocity = 0.8,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "black_widow"
},
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
},
armor = 70,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
light_damage = 0,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 70,
walk_start = 80,
walk_end = 120,
run_start = 120,
run_end = 140,
punch_start = 150,
punch_end = 160
},
do_custom = function(self, dtime)
self.web_timer = (self.web_timer or 0) + dtime
if self.web_timer < 5 then return end
self.web_timer = 0
if nssm.spiders_litter_web then
nssm:webber_ability(self, "nssm:web", 2)
end
end
})

59
mods/nssm/mobs/bloco.lua Normal file
View file

@ -0,0 +1,59 @@
mobs:register_mob("nssm:bloco", {
type = "monster",
hp_max = 24,
hp_min = 14,
collisionbox = {-0.56, -0.2, -0.56, 0.56, 1.2, 0.56},
visual = "mesh",
mesh = "bloco.x",
textures = {{"bloco.png"}},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 8,
fear_height = 4,
walk_velocity = 0.6,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "bloco"
},
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "default:stone", chance = 1, min = 2, max = 3},
{name = "nssm:bloco_skin", chance = 3, min = 1, max = 2}
},
armor = 40,
drawtype = "front",
water_damage = 3,
lava_damage = 1,
light_damage = 0,
fire_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,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 90,
stand_end = 110,
walk_start = 1,
walk_end = 80,
run_start = 120,
run_end = 160,
punch_start = 170,
punch_end = 190
}
})

56
mods/nssm/mobs/crab.lua Normal file
View file

@ -0,0 +1,56 @@
mobs:register_mob("nssm:crab", {
type = "monster",
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 = {
random = "crab"
},
visual_size = {x = 3, y = 3},
makes_footstep_sound = true,
view_range = 7,
rotate = 270,
fear_height = 4,
walk_velocity = 1,
run_velocity = 2,
damage = 5,
reach = 2,
floats = 0,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:surimi", chance = 1, min = 1, max = 2},
{name = "nssm:crab_chela", chance = 4, min = 1, max = 2},
{name = "nssm:crab_carapace_fragment", chance = 4, min = 1, max = 1}
},
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 10,
stand_end = 80,
walk_start = 120,
walk_end = 140,
run_start = 120,
run_end = 140,
punch_start = 90,
punch_end = 110
}
})

View file

@ -0,0 +1,54 @@
mobs:register_mob("nssm:crocodile", {
type = "monster",
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 = {
random = "crocod",
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 15,
walk_velocity = 1,
run_velocity = 1,
damage = 5,
floats = 1,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:crocodile_tail", chance = 2, min = 1, max = 1},
{name = "nssm:crocodile_skin", chance = 3, min = 1, max = 1}
},
armor = 60,
drawtype = "front",
reach = 2,
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 3,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 1,
stand_end = 80,
walk_start = 230,
walk_end = 270,
run_start = 230,
run_end = 270,
punch_start = 205,
punch_end = 220,
--swim_start = 100,
--swim_end = 140,
}
})

View file

@ -0,0 +1,52 @@
mobs:register_mob("nssm:daddy_long_legs", {
type = "monster",
hp_max = 22,
hp_min = 16,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.6, 0.4},
visual = "mesh",
mesh = "daddy_long_legs.x",
textures = {
{"daddy_long_legs.png"}
},
visual_size = {x = 8, y = 8},
makes_footstep_sound = true,
view_range = 12,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3.3,
rotate = 90,
sounds = {
random = "daddy"
},
damage = 3,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:spider_leg", chance = 3, min = 1, max = 8},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
},
armor = 70,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 60,
walk_start = 80,
walk_end = 120,
run_start = 80,
run_end = 120,
punch_start = 140,
punch_end = 165
}
})

View file

@ -0,0 +1,59 @@
mobs:register_mob("nssm:dolidrosaurus", {
type = "monster",
hp_max = 46,
hp_min = 23,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.52, 0.5},
visual = "mesh",
mesh = "dolidrosaurus.x",
textures = {
{"dolidrosaurus1.png"},
{"dolidrosaurus2.png"},
{"dolidrosaurus3.png"},
{"dolidrosaurus4.png"},
{"dolidrosaurus5.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 30,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3.3,
damage = 5,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "crocod"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 3},
{name = "nssm:dolidrosaurus_fin", chance = 2, min = 1, max = 3}
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_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 = {
speed_normal = 25,
speed_run = 35,
stand_start = 1,
stand_end = 80,
walk_start = 140,
walk_end = 180,
run_start = 140,
run_end = 180,
punch_start = 190,
punch_end = 220
}
})

53
mods/nssm/mobs/duck.lua Normal file
View file

@ -0,0 +1,53 @@
mobs:register_mob("nssm:duck", {
type = "monster",
hp_max = 12,
hp_min = 7,
collisionbox = {-0.3, 0.00, -0.3, 0.3, 0.95, 0.3},
visual = "mesh",
mesh = "duck.x",
textures = {
{"duck.png"}
},
visual_size = {x = 2, y = 2},
makes_footstep_sound = true,
view_range = 13,
walk_velocity = 1,
reach =1.5,
run_velocity = 2,
damage = 2,
jump = true,
sounds = {
random = "duck"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 3, min = 2, max = 4}
},
armor = 100,
drawtype = "front",
water_damage = 0,
fear_height = 5,
floats = 1,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 5,
blood_texture = "nssm_blood.png",
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 1,
stand_end = 20,
walk_start = 20,
walk_end = 40,
run_start = 20,
run_end = 40,
punch_start = 40,
punch_end = 60
}
})

View file

@ -0,0 +1,65 @@
mobs:register_mob("nssm:duckking", {
type = "monster",
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"}
},
visual_size = {x = 10, y = 10},
lifetimer = 300,
makes_footstep_sound = true,
view_range = 30,
rotate = 270,
duck_father = true,
walk_velocity = 1,
fear_height = 4,
run_velocity = 2,
damage = 8,
jump = true,
sounds = {
random = "duckking",
attack = "duckking"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:duck_legs", chance = 1, min = 40, max = 50},
{name = "nssm:helmet_crown", chance = 1, min = 1, max = 1},
{name = "nssm:duck_beak", chance = 4, min = 10, max = 20},
{name = "nssm:duck_feather", chance = 3, min = 20, max = 40}
},
armor = 50,
drawtype = "front",
water_damage = 0,
floats = 1,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
attack_type = "dogshoot",
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,
stand_start = 60,
stand_end = 140,
walk_start = 0,
walk_end = 40,
run_start = 0,
run_end = 40,
punch_start = 190,
punch_end = 220,
shoot_start = 160,
shoot_end = 180
}
})

View file

@ -0,0 +1,59 @@
mobs:register_mob("nssm:echidna", {
type = "monster",
hp_max = 240,
hp_min = 240,
collisionbox = {-0.6, 0.00, -0.6, 0.6, 2, 0.6},
visual = "mesh",
mesh = "echidna.x",
textures = {
{"echidnapes.png"}
},
visual_size = {x = 6, y = 6},
makes_footstep_sound = true,
view_range = 30,
rotate = 270,
lifetimer = 500,
fear_height = 4,
walk_velocity = 2,
run_velocity = 3.5,
damage = 12,
jump = true,
sounds = {
random = "echidna"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:snake_scute", chance = 1, min = 1, max = 1}
},
armor = 40,
drawtype = "front",
water_damage = 0,
floats = 1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 10,
stepheight = 1.1,
knock_back = 0,
jump_height = 8,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:super_gas",
reach = 5,
shoot_interval = 3,
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 60,
stand_end = 140,
walk_start = 1,
walk_end = 40,
run_start = 1,
run_end = 40,
punch_start = 160,
punch_end = 190,
shoot_start = 200,
shoot_end = 240
}
})

View file

@ -0,0 +1,56 @@
mobs:register_mob("nssm:enderduck", {
type = "monster",
hp_max = 28,
hp_min = 18,
collisionbox = {-0.28, 0.00, -0.28, 0.28, 1.8, 0.28},
visual = "mesh",
mesh = "enderduck.x",
textures = {
{"enderduck.png"}
},
visual_size = {x = 2, y = 2},
makes_footstep_sound = true,
view_range = 25,
walk_velocity = 3,
fear_height = 4,
run_velocity = 3.9,
rotate = 270,
sounds = {
random = "duck"
},
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", 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 = 80,
drawtype = "front",
water_damage = 1,
floats = 1,
lava_damage = 5,
light_damage = 0,
fire_damage = 4,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
jump_height = 12,
stepheight = 2.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 1,
stand_end = 40,
walk_start = 100,
walk_end = 130,
run_start = 100,
run_end = 130,
punch_start = 60,
punch_end = 90
}
})

View file

@ -0,0 +1,52 @@
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,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
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

@ -0,0 +1,78 @@
mobs:register_mob("nssm:flying_duck", {
type = "monster",
hp_max = 20,
hp_min = 10,
collisionbox = {-0.3, -0.2, -0.3, 0.3, 0.2, 0.3},
visual = "mesh",
mesh = "flying_duck.x",
textures = {
{"flying_duck.png"}
},
visual_size = {x = 1, y = 1},
view_range = 30,
walk_velocity = 2,
run_velocity = 2.5,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "duck"
},
damage = 3,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 2, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 2, min = 4, max = 8}
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 5,
blood_texture = "nssm_blood.png",
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 0,
stand_end = 80,
walk_start = 160,
walk_end = 200,
run_start = 160,
run_end = 220,
punch_start = 110,
punch_end = 140
},
do_custom = function(self, dtime)
-- 5 second timer
self._land_timer = (self._land_timer or 0) + dtime
if self._land_timer < 5 then return end
self._land_timer = 0
-- if flying duck lands in water, change to walking/floating duck
if core.get_item_group(self.standing_in, "water") > 0
and core.get_item_group(self.standing_on, "water") > 0 then
local pos = self.object:get_pos()
if mobs:add_mob(pos, {name = "nssm:duck"}) then
self.object:remove()
else
self.object:set_velocity({x = 0, y = 3, z = 0})
local ent = self.object:get_luaentity()
ent.state = "walk"
ent.attack = nil
end
end
end
})

View file

@ -0,0 +1,49 @@
mobs:register_mob("nssm:giant_sandworm", {
type = "monster",
hp_max = 330,
hp_min = 330,
collisionbox = {-1.2, 0, -1.2, 1.2, 4.5, 1.2},
visual = "mesh",
mesh = "giant_sandworm.x",
textures = {
{"sandworm.png"}
},
visual_size = {x = 13, y = 13},
makes_footstep_sound = false,
view_range = 9,
rotate = 270,
reach = 8,
walk_velocity = 0,
run_velocity = 0,
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:digested_sand", chance = 1, min = 1, max = 1}
},
armor = 40,
drawtype = "front",
water_damage = 5,
lava_damage = 3,
light_damage = 0,
fire_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 50,
knock_back = 0,
jump_height = 0,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 40,
stand_start = 1,
stand_end = 100,
walk_start = 110,
walk_end = 140,
run_start = 110,
run_end = 140,
punch_start = 150,
punch_end = 180
}
})

View file

@ -0,0 +1,64 @@
mobs:register_mob("nssm:icelamander", {
type = "monster",
hp_max = 230,
hp_min = 230,
collisionbox = {-0.5, 0, -0.5, 0.5, 2.3, 0.5},
visual = "mesh",
mesh = "icelamander.x",
textures = {
{"icelamander.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 35,
lifetimer = 500,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "icelamander"
},
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 8},
{name = "nssm:frosted_amphibian_heart", chance = 1, min = 1, max = 1},
{name = "nssm:ice_tooth", chance = 1, min = 1, max = 1},
{name = "nssm:little_ice_tooth", chance = 1, min = 0, max = 20},
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1}
},
armor = 40,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
fire_damage = 20,
light_damage = 0,
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",
shoot_interval = 2,
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 1,
stand_end = 40,
walk_start = 80,
walk_end = 160,
run_start = 40,
run_end = 80,
punch_start = 160,
punch_end = 190,
shoot_start = 190,
shoot_end = 210
},
do_custom = function(self)
nssm:midas_ability(self, "default:ice", self.run_velocity, 1, 3)
end
})

View file

@ -0,0 +1,58 @@
mobs:register_mob("nssm:icesnake", {
type = "monster",
hp_max = 27,
hp_min = 17,
collisionbox = {-0.7, 0, -0.7, 0.7, 0.50, 0.7},
visual = "mesh",
mesh = "icesnake.x",
textures = {
{"icesnake.png"}
},
visual_size = {x = 7, y = 7},
makes_footstep_sound = false,
view_range = 10,
rotate = 270,
fear_height = 3,
walk_velocity = 1.2,
run_velocity = 3,
sounds = {
random = "icesnake"
},
damage = 4,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:frosted_amphibian_heart", 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 = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 20,
fire_damage = 15,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 170,
stand_end = 220,
walk_start = 1,
walk_end = 60,
run_start = 80,
run_end = 120,
punch_start = 130,
punch_end = 160
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
end
})

57
mods/nssm/mobs/kraken.lua Normal file
View file

@ -0,0 +1,57 @@
mobs:register_mob("nssm:kraken", {
type = "monster",
hp_max = 350,
hp_min = 350,
collisionbox = {-2, 0, -2, 2, 4, 2},
visual = "mesh",
mesh = "kraken.x",
textures = {
{"kraken.png"},
{"kraken2.png"}
},
visual_size = {x = 15, y = 15},
lifetimer=500,
inker = false,
view_range = 50,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fall_speed = -1,
walk_velocity = 3.5,
run_velocity = 4.5,
damage = 14,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "kraken"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:tentacle", chance = 1, min = 30, max = 40},
{name = "nssm:tentacle_curly", chance = 1, min = 1, max = 1}
},
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
blood_texture = "nssm_blood_blue.png",
blood_amount = 100,
knock_back = 0,
attack_type = "dogfight",
reach = 8,
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 1,
stand_end = 40,
walk_start = 60,
walk_end = 100,
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 150
}
})

91
mods/nssm/mobs/larva.lua Normal file
View file

@ -0,0 +1,91 @@
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,
fire_damage = 4,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
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
core.log("action", "metatimer expired, metamorphosis!")
local pos = self.object:get_pos()
self.object:remove()
core.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
if math.random(2) == 1 then
core.add_entity(pos, "nssm:mantis")
else
core.add_entity(pos, "nssm:mantis_beast")
end
return
end
end
})

View file

@ -0,0 +1,64 @@
mobs:register_mob("nssm:lava_titan", {
type = "monster",
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 = 2.7, y = 2.7},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
lifetimer = 500,
walk_velocity = 0.5,
run_velocity = 1.3,
floats = 1,
sounds = {
random = "lava_titan"
},
damage = 8,
jump = false,
jump_height = 0,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
{name = "nssm:lava_titan_eye", chance = 1, min = 1, max = 1},
{name = "bucket:bucket_lava", chance = 2, min = 1, max = 3}
},
armor = 20,
drawtype = "front",
water_damage = 25,
rotate = 270,
light_damage = 0,
lava_damage = 0,
fire_damage = 0,
floats = 0,
blood_texture = "stone_blood.png",
blood_amount = 50,
knock_back = 0,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:lava_arrow",
shoot_interval = 2,
shoot_offset = 0,
animation = {
speed_normal = 25,
speed_run = 45,
stand_start = 120,
stand_end = 300,
walk_start = 10,
walk_end = 110,
run_start = 10,
run_end = 110,
punch_start = 301,
punch_end = 340,
shoot_start = 340,
shoot_end = 400
},
do_custom = function (self)
nssm:digging_attack(self, nil, self.run_velocity, {x = 0, y = 4, z = 0})
end
})

View file

@ -0,0 +1,58 @@
mobs:register_mob("nssm:manticore", {
type = "monster",
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 = 35,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "manticore"
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:manticore_spine", chance = 3, min = 2, max = 5},
{name = "nssm:manticore_fur", chance = 3, min = 1, max = 2}
},
armor = 60,
drawtype = "front",
water_damage = 2,
rotate = 270,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
attack_type = "dogshoot",
dogshoot_switch = true,
arrow = "nssm:spine",
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,
speed_run = 25,
stand_start = 1,
stand_end = 40,
walk_start = 240,
walk_end = 280,
run_start = 91,
run_end = 108,
punch_start = 110,
punch_end = 143,
shoot_start = 180,
shoot_end = 230
}
})

56
mods/nssm/mobs/mantis.lua Normal file
View file

@ -0,0 +1,56 @@
mobs:register_mob("nssm:mantis", {
type = "monster",
hp_max = 31,
hp_min = 24,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 2.30, 0.5},
visual = "mesh",
mesh = "mantis.x",
textures = {
{"mantis.png"},
{"mantis2.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 20,
fear_height = 4,
walk_velocity = 2,
run_velocity = 2.5,
sounds = {
random = "manti"
},
damage = 4,
jump = true,
drops = {
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 4},
{name = "nssm:life_energy", 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 = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
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,
speed_run = 25,
stand_start = 1,
stand_end = 20,
walk_start = 20,
walk_end = 60,
run_start = 60,
run_end = 80,
punch_start = 120,
punch_end = 140,
punch2_start = 145,
punch2_end = 165
}
})

View file

@ -0,0 +1,54 @@
mobs:register_mob("nssm:mantis_beast", {
type = "monster",
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",
textures = {
{"mantis_beast.png"},
{"mantis_beast2.png"}
},
visual_size = {x = 6, y = 6},
makes_footstep_sound = true,
view_range = 25,
fear_height = 4,
walk_velocity = 2.5,
run_velocity = 3.5,
sounds = {
random = "manti"
},
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:mantis_claw", chance = 2, min = 1, max = 6},
{name = "nssm:life_energy", 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 = 70,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 20,
stand_start = 0,
stand_end = 60,
walk_start = 70,
walk_end = 110,
run_start = 70,
run_end = 110,
punch_start = 140,
punch_end = 165
}
})

View file

@ -0,0 +1,102 @@
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 = 10,
fire_damage = 10,
floats = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
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()
core.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
local respawn_count = 3
for i = 1, respawn_count do
local chance = math.random(1, math.ceil(respawn_count * 1.5))
if chance == 1 then
local pos = {
x = pos.x + math.random(-1, 1),
y = pos.y + 0.5,
z = pos.z + math.random(-1, 1)
}
local n = core.get_node(pos).name
if n == "air" then
core.add_entity(pos, "nssm:masticone")
end
end
end
end)
end
})

View file

@ -0,0 +1,127 @@
mobs:register_mob("nssm:mese_dragon", {
type = "monster",
hp_max = 666,
hp_min = 666,
collisionbox = {-1, 0, -1, 1, 5, 1},
visual = "mesh",
mesh = "mese_dragon.x",
textures = {
{"mese_dragon.png"}
},
visual_size = {x = 12, y = 12},
makes_footstep_sound = true,
view_range = 45,
rotate = 270,
fear_height = 5,
walk_velocity = 2,
run_velocity = 4,
sounds = {
shoot_attack = "mesed",
attack = "mese_dragon",
distance = 60
},
damage = 18,
jump = true,
jump_height = 10,
drops = {
{name = "nssm:rainbow_staff", chance = 1, min = 1, max = 1},
{name = "nssm:energy_globe", chance = 1, min = 99, max = 99}
},
armor = 30,
drawtype = "front",
water_damage = 0,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
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,
shoot_offset = -1,
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 60,
stand_end = 120,
walk_start = 161,
walk_end = 205,
run_start = 206,
run_end = 242,
punch_start = 242,
punch_end = 275,
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)
end,
custom_attack = function(self)
if self.timer > 1 then
self.timer = 0
self.attack_rip = (self.attack_rip or 0) + 1
local s = self.object:get_pos()
if core.is_protected(s, "") then
return
end
local p = self.attack:get_pos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if core.line_of_sight(p, s) == true then
-- play attack sound
if self.sounds.attack then
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
if self.attack_rip >= 8 then
self.attack_rip = 0
self:set_animation("punch1")
for dx = -17, 17 do
for dz = -17, 17 do
local k = {x = s.x + dx, y = s.y + 20, z = s.z + dz}
local n = core.get_node(k).name
if n == "air" and math.random(23) == 1 then
core.set_node(k, {name="nssm:mese_meteor"})
core.check_single_for_falling(k)
end
end
end
end
end
end
})

View file

@ -0,0 +1,52 @@
mobs:register_mob("nssm:moonheron", {
type = "monster",
hp_max = 33,
hp_min = 22,
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.3, 0.45},
visual = "mesh",
mesh = "moonheron.x",
textures = {
{"moonheron.png"}
},
visual_size = {x = 10, y = 10},
view_range = 35,
rotate = 270,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "moonheron",
distance = 40
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1}
},
armor = 70,
floats = 1,
drawtype = "front",
water_damage = .1,
lava_damage = 5,
fire_damage = 5,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 140,
stand_end = 200,
walk_start = 20,
walk_end = 60,
run_start = 20,
run_end = 60,
punch_start = 80,
punch_end = 120
}
})

166
mods/nssm/mobs/mordain.lua Normal file
View file

@ -0,0 +1,166 @@
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,
fire_damage = 1,
-- light_damage = 2,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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
},
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:get_pos()
local p = self.attack:get_pos()
self:set_animation("punch")
if core.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
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
core.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
}
for j = -3,3 do
ty = d.y + j
local current = core.get_node({
x = d.x,
y = ty,
z = d.z}).name
local up = core.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 = nssm:dist_pos(d, p)
if dist >= 2 then
for j = -3, 3 do
ty = d.y + j
local current = core.get_node({
x = d.x,
y = ty,
z = d.z}).name
local up = core.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:set_pos(d)
end)
end
end
})

218
mods/nssm/mobs/morde.lua Normal file
View file

@ -0,0 +1,218 @@
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,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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:get_pos()
local p = self.attack:get_pos()
self:set_animation("punch")
self.health = self.health + (self.damage * 2)
local m = 3
if core.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
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
end
-- punch player
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
core.add_particlespawner({
amount = 6,
time = 1,
minpos = {x = p.x - 0.5, y = p.y - 0.5, z = p.z - 0.5},
maxpos = {x = p.x + 0.5, y = p.y + 0.5, z = p.z + 0.5},
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) * m,
y = (s.y - p.y + 1) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y + 1, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y + 1, z = s.z - p.z},
minexptime = 0.2,
maxexptime = 0.3,
minsize = 2,
maxsize = 3,
collisiondetection = false,
texture = "morparticle.png"
})
end
end
end,
on_die = function(self)
local pos = self.object:get_pos()
self.object:remove()
core.add_entity(pos, "nssm:mortick")
end
})
core.register_entity("nssm:mortick", {
initial_properties = {
textures = {"mortick.png"},
hp_min = 10000,
hp_max = 10000,
armor = 100,
visual = "mesh",
mesh = "mortick.x",
collisionbox = {-0.2, -0.2, -0.2, 0.2, 0.2, 0.2},
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:get_pos()
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 = core.get_node(s1).name
if name == "fire:basic_flame"
or name == "fire:permanent_flame"
or name == "nssm:phoenix_fire"
or name == "default:lava_source"
or name == "default:lava_flowing" then
self.object:remove()
end
--Find player to attack:
self.attack = (self.attack or 0)
local objects = core.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:get_pos()
-- Just incase player teleports away or leaves game
if not p then
self.attack = nil
return
end
local yawp = self.attack:get_look_horizontal() + math.pi / 2
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:set_velocity(v)
self.object:set_yaw(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
})

53
mods/nssm/mobs/morgre.lua Normal file
View file

@ -0,0 +1,53 @@
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,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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
}
})

234
mods/nssm/mobs/morgut.lua Normal file
View file

@ -0,0 +1,234 @@
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,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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 = ""
self:set_animation("run")
self.object:set_yaw(self.dir)
self:set_velocity(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:get_pos()
local p = self.attack:get_pos()
self:set_animation("punch")
local m = 2
core.add_particlespawner({
amount = 6,
time = 1,
minpos = {x = p.x - 0.5, y = p.y - 0.5, z = p.z - 0.5},
maxpos = {x = p.x + 0.5, y = p.y + 0.5, z = p.z + 0.5},
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) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y, z = s.z - p.z},
minexptime = 0.2,
maxexptime = 0.3,
minsize = 2,
maxsize = 3,
collisiondetection = false,
texture = "roasted_duck_legs.png"
})
core.after(1, function(self)
if self and self.attack and self.attack:is_player() then
local pname = self.attack:get_player_name()
local player_inv = core.get_inventory(
{type = "player", name = pname})
if not player_inv:is_empty("main") then
for i = 1, 32 do
local items = player_inv:get_stack("main", i)
local n = items:get_name()
if core.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
self:set_animation("run")
self.flag = 1
self.morgut_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_horizontal() + math.pi / 2
self.dir = pyaw
self.object:set_yaw(pyaw)
if self then
self:set_velocity(4)
end
end
end, self)
end
end
end,
on_die = function(self)
local pos = self.object:get_pos()
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 = core.add_item(pos, items)
obj:set_velocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end
})

292
mods/nssm/mobs/morlu.lua Normal file
View file

@ -0,0 +1,292 @@
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,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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 = ""
self:set_animation("run")
self:set_yaw(self.dir)
self:set_velocity(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:get_pos()
local p = self.attack:get_pos()
self:set_animation("punch")
local m = 1
if self.attack:is_player() then
if core.get_modpath("3d_armor") then
local pname, player_inv = armor:get_valid_player(
self.attack, "[set_player_armor]")
local pname = self.attack:get_player_name()
local player_inv = core.get_inventory({
type = "player", name = pname})
local armor_inv = core.get_inventory({
type = 'detached', name = pname.."_armor"})
if armor_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 = armor_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(armor_num)
steal_pos = steal_pos - 1
local cpos = string.find(armor_elements[steal_pos].name, ":")
local target_armor = armor_elements[steal_pos].name
local mod_name = string.sub(target_armor, 0, cpos - 1)
local nname = string.sub(target_armor, cpos + 1)
if target_armor:find("admin") then
nname = "greedy_soul_fragment.png"
elseif 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
core.add_particlespawner({
amount = 1,
time = 1,
minpos = {x = p.x, y = p.y + 1, z = p.z},
maxpos = {x = p.x, y = p.y + 1, z = p.z},
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) * m,
y = (s.y - p.y) * m,
z = (s.z - p.z) * m
},
minacc = {x = s.x - p.x, y = s.y - p.y - 1, z = s.z - p.z},
maxacc = {x = s.x - p.x, y = s.y - p.y - 1, z = s.z - p.z},
minexptime = 0.5,
maxexptime = 0.5,
minsize = 10,
maxsize = 10,
collisiondetection = false,
texture = nname
})
if target_armor:find("admin") then
return
end
core.after(1, function (self)
if self then
local 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_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
self.invnum = self.invnum + 1
self.inventory[self.invnum].name =
armor_elements[steal_pos].name
end
self:set_animation("run")
self.flag = 1
self.morlu_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack:get_look_horizontal() +
math.pi / 2
self.dir = pyaw
self.object:set_yaw(pyaw)
if self then
self:set_velocity(4)
end
end
end, self)
end
end
else
local s = self.object:get_pos()
local p = self.attack:get_pos()
self:set_animation("punch")
if core.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
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
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:get_pos()
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 = core.add_item(pos, items)
obj:set_velocity({
x = math.random(-1, 1),
y = 6,
z = math.random(-1, 1)
})
end
end
end
self.object:remove()
end
})

1137
mods/nssm/mobs/morvalar.lua Normal file

File diff suppressed because it is too large Load diff

292
mods/nssm/mobs/morvy.lua Normal file
View file

@ -0,0 +1,292 @@
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,
fire_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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)
self:set_animation("stand")
self.morvy_counter = (self.morvy_counter or 0) + 1
if self.morvy_counter == 4 then
self:set_animation("punch")
self.morvy_counter = 0
local counter = 0
local s = self.object:get_pos()
local p = self.attack:get_pos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if mobs:line_of_sight(self, p, s) == true then
--[[play attack sound
if self.sounds.attack then
core.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 = core.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 core.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
core.add_entity(pos1, bat)
core.add_particlespawner({
amount = 20,
time = 0.1,
minpos = {x = pos1.x - 0.2, y = pos1.y - 0.2, z = pos1.z - 0.2},
maxpos = {x = pos1.x + 0.2, y = pos1.y + 0.2, z = pos1.z + 0.2},
minvel = {x = 0, y = 0, z = 0},
maxvel = {x = 0.1, y = 0.3, z = 0.1},
minacc = {x = -0.5, y = 1, z = -0.5},
maxacc = {x = 0.5, y = 1, z = 0.5},
minexptime = 0.1,
maxexptime = 4,
minsize = 2,
maxsize = 6,
collisiondetection = false,
texture = "morparticle.png"
})
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,
fire_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
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,
fire_damage = 0,
light_damage = 0,
blood_texture="morparticle.png",
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,
fire_damage = 0,
light_damage = 0,
blood_texture = "morparticle.png",
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
}
})

70
mods/nssm/mobs/morwa.lua Normal file
View file

@ -0,0 +1,70 @@
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,
fire_damage = 0,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 1,
blood_texture = "morparticle.png",
stepheight = 1.1,
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:get_pos()
local light = core.get_node_light(pos) or 0
--core.chat_send_all("Luce: "..light)
if light < 8 then
self.object:remove()
core.set_node(pos, {name = "nssm:morwa_statue"})
end
end
})

View file

@ -0,0 +1,195 @@
mobs:register_mob("nssm:night_master", {
type = "monster",
hp_max = 60,
hp_min = 60,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "moonherontrio.x",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
rotate = 270,
lifetimer = 500,
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
},
damage = 10,
jump = false,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 50,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 120,
walk_start = 20,
walk_end = 50,
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
},
on_die = function(self, pos)
core.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
self.object:remove()
core.add_entity(pos, "nssm:night_master_2")
end
})
mobs:register_mob("nssm:night_master_2", {
type = "monster",
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",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
rotate = 270,
lifetimer = 500,
floats = 1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
},
damage = 10,
jump = false,
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 120,
walk_start = 20,
walk_end = 50,
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
},
on_die = function(self, pos)
core.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
self.object:remove()
core.add_entity(pos, "nssm:night_master_1")
end
})
mobs:register_mob("nssm:night_master_1", {
type = "monster",
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",
textures = {
{"moonherontrio.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
rotate = 270,
lifetimer = 500,
floats=1,
walk_velocity = 3,
run_velocity = 4,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "night_master",
distance = 45
},
damage = 12,
jump = false,
drops = {
{name = "nssm:life_energy", chance = 1, min = 6, max = 7},
{name = "nssm:heron_leg", chance = 1, min = 1, max = 1},
{name = "nssm:night_feather", chance = 1, min = 1, max = 1}
},
armor = 50,
drawtype = "front",
water_damage = 0,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 120,
walk_start = 20,
walk_end = 50,
run_start = 20,
run_end = 50,
punch_start = 130,
punch_end = 160
}
})

113
mods/nssm/mobs/octopus.lua Normal file
View file

@ -0,0 +1,113 @@
mobs:register_mob("nssm:octopus", {
type = "monster",
hp_max = 32,
hp_min = 25,
collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9},
visual = "mesh",
mesh = "octopus.x",
textures = {
{"octopus.png"}
},
visual_size = {x = 4, y = 4},
view_range = 25,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3,
damage = 5,
reach = 2,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "octopus",
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:tentacle", chance = 1, min = 1, max = 8}
},
armor = 70,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 1,
stand_end = 50,
walk_start = 60,
walk_end = 100,
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 160
}
})
mobs:register_mob("nssm:xgaloctopus", {
type = "monster",
hp_max = 30,
hp_min = 27,
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
visual = "mesh",
mesh = "octopus.x",
textures = {
{"xgaloctopus.png"}
},
visual_size = {x = 1, y = 1},
view_range = 25,
fly = true,
fly_in = {"default:water_source", "default:water_flowing"},
fall_speed = -20,
walk_velocity = 1.5,
run_velocity = 3,
damage = 5,
reach = 1,
rotate = 270,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "octopus"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:tentacle", chance = 1, min = 1, max = 8}
},
armor = 60,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 1,
stand_end = 50,
walk_start = 60,
walk_end = 100,
run_start = 60,
run_end = 100,
punch_start = 120,
punch_end = 160
},
replace_rate = 1,
replace_what = {"default:torch"},
replace_with = "default:water_source",
replace_offset = 0
})

View file

@ -0,0 +1,59 @@
mobs:register_mob("nssm:phoenix", {
type = "monster",
hp_max = 160,
hp_min = 160,
collisionbox = {-0.65, -0.4, -0.65, 0.65, 0.4, 0.65},
visual = "mesh",
mesh = "phoenix.x",
textures = {
{"phoenix.png"}
},
visual_size = {x = 18, y = 18},
view_range = 40,
lifetimer = 500,
floats = 1,
rotate = 270,
walk_velocity = 2,
run_velocity = 2.5,
fall_speed = 0,
stepheight = 3,
sounds = {
random = "phoenix",
distance = 45
},
damage = 2,
jump = false,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 8},
{name = "nssm:sun_feather", chance = 1, min = 1, max = 1},
{name = "nssm:phoenix_tear", chance = 1, min = 5, max = 6},
{name = "nssm:phoenix_nuggets", chance = 6, min = 10, max = 20}
},
armor = 40,
drawtype = "front",
water_damage = .1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 50,
fly = true,
attack_type = "shoot",
arrow = "nssm:phoenix_arrow",
reach = 1,
shoot_interval = 4,
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 220,
stand_end = 280,
walk_start = 140,
walk_end = 180,
run_start = 190,
run_end = 210,
punch_start = 80,
punch_end = 110,
shoot_start = 80,
shoot_end = 110
}
})

View file

@ -0,0 +1,88 @@
local function register_pumpboom(sizename, params)
mobs:register_mob("nssm:pumpboom_" .. sizename, {
type = "monster",
hp_min = params.hp_min,
hp_max = params.hp_max,
collisionbox = params.collisionbox,
visual = "mesh",
mesh = "pumpboom.x",
rotate = 270,
textures = {{"pumpboom.png"}},
visual_size = params.visual_size,
explosion_radius = params.boom_radius,
makes_footstep_sound = true,
view_range = params.view_range,
fear_height = 4,
walk_velocity = 2,
run_velocity = 2.5,
sounds = {
explode = "tnt_explode"
},
damage = 1.5,
jump = true,
drops = params.drops,
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,
attack_type = "explode",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 1,
stand_end = 30,
walk_start = 81,
walk_end = 97,
run_start = 81,
run_end = 97,
punch_start = 70,
punch_end = 80
}
})
end
register_pumpboom("small",{
hp_min = 14,
hp_max = 15,
visual_size = {x = 3, y = 3},
collisionbox = {-0.45, -0.3, -0.45, 0.45, 0.45, 0.45},
boom_radius = 4,
view_range = 20,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:black_powder", chance = 2, min = 1, max = 2}
}
})
register_pumpboom("medium",{
hp_min = 17,
hp_max = 18,
visual_size = {x = 5, y = 5},
collisionbox = {-0.7, -0.3, -0.7, 0.7, 0.7, 0.7},
boom_radius = 6,
view_range = 25,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:black_powder", chance = 2, min = 1, max = 3}
}
})
register_pumpboom("large",{
hp_min = 19,
hp_max = 20,
visual_size = {x = 8, y = 8},
collisionbox = {-1.2, -0.3, -1.2, 1.2, 1.2, 1.2},
boom_radius = 8,
view_range = 30,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:black_powder", chance = 2, min = 2, max = 4}
}
})

107
mods/nssm/mobs/pumpking.lua Normal file
View file

@ -0,0 +1,107 @@
mobs:register_mob("nssm:pumpking", {
type = "monster",
hp_max = 220,
hp_min = 220,
collisionbox = {-0.4, 0.00, -0.4, 0.4, 3.2, 0.4},
visual = "mesh",
mesh = "pumpking.x",
textures = {
{"pumpking.png"}
},
visual_size = {x = 2.5, y = 2.5},
makes_footstep_sound = true,
lifetimer = 500,
rotate = 270,
fear_height = 4,
view_range = 35,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "king",
explode = "tnt_explode"
},
damage = 13,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 7, max = 9},
{name = "nssm:cursed_pumpkin_seed", chance = 1, min = 1, max = 1},
{name = "nssm:black_powder", chance = 1, min = 9, max = 12}
},
armor = 40,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
blood_texture = "nssm_blood.png",
blood_amount = 25,
stepheight = 2.1,
knock_back = 0,
jump_height = 12,
attack_type = "dogfight",
animation = {
stand_start = 165,
stand_end = 210,
walk_start = 220,
walk_end = 260,
run_start = 220,
run_end = 260,
punch_start = 300,
punch_end = 330,
speed_normal = 15,
speed_run = 15
},
on_die = function(self,pos)
self.object:remove()
core.after(0.2, function(pos)
tnt.boom(pos, {damage_radius = 5, radius = 4, ignore_protection = false})
end, pos)
end,
on_blast = function(damage)
return false, false, {} -- no damage, no knockback, no drops
end,
custom_attack = function(self)
self.pumpking_timer = self.pumpking_timer or os.time()
if (os.time() - self.pumpking_timer) > 3 then
self:set_animation("punch")
self.pumpking_timer = os.time()
local s = self.object:get_pos()
local p = self.attack:get_pos()
p.y = p.y + 1.5
s.y = s.y + 1.5
if core.line_of_sight(p, s) == true then
-- play attack sound
if self.sounds.attack then
core.sound_play(self.sounds.attack, {
object = self.object,
max_hear_distance = self.sounds.distance
}, true)
end
local pos1 = {
x = s.x + math.random(-1, 1),
y = s.y - 1.5,
z = s.z + math.random(-1, 1)
}
core.after(1, function(pos1)
core.set_node(pos1, {name = "nssm:pumpbomb"})
core.get_node_timer(pos1):start(2)
end, pos1)
end
end
end
})

View file

@ -0,0 +1,52 @@
mobs:register_mob("nssm:sand_bloco", {
type = "monster",
hp_max = 24,
hp_min = 17,
collisionbox = {-0.5, -0.2, -0.5, 0.5, 1.3, 0.5},
visual = "mesh",
mesh = "sand_bloco.x",
textures = {
{"sand_bloco.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 14,
fear_height = 4,
walk_velocity = 0.8,
run_velocity = 2,
rotate = 270,
sounds = {
random = "bloco"
},
damage = 4,
reach = 1.5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 1},
{name = "default:sandstone", chance = 1, min = 2, max = 3},
{name = "nssm:sand_bloco_skin", chance = 2, min = 1, max = 3}
},
armor = 40,
drawtype = "front",
water_damage = 10,
lava_damage = 1,
fire_damage = 1,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "stone_blood.png",
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 10,
stand_end = 90,
walk_start = 140,
walk_end = 180,
run_start = 190,
run_end = 200,
punch_start = 100,
punch_end = 130
}
})

View file

@ -0,0 +1,58 @@
mobs:register_mob("nssm:sandworm", {
type = "monster",
hp_max = 40,
hp_min = 25,
collisionbox = {-0.4, -0.2, -0.4, 0.4, 1.90, 0.4},
visual = "mesh",
mesh = "sandworm.x",
textures = {
{"sandworm.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = false,
view_range = 17,
rotate = 270,
reach = 2,
fear_height = 3,
walk_velocity = 2,
run_velocity = 2,
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},
{name = "nssm:life_energy", chance = 1, min = 2, max = 3}
},
armor = 60,
drawtype = "front",
water_damage = 5,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 40,
stand_start = 1,
stand_end = 100,
walk_start = 110,
walk_end = 140,
run_start = 110,
run_end = 140,
punch_start = 150,
punch_end = 180
},
do_custom = function(self)
nssm:digging_attack(self, "sand", self.run_velocity, {x = 0, y = 3, z = 0})
end
})

View file

@ -0,0 +1,53 @@
mobs:register_mob("nssm:scrausics", {
type = "monster",
hp_max = 33,
hp_min = 22,
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
mesh = "scrausics.x",
textures = {
{"scrausics.png"}
},
visual_size = {x = 10, y = 10},
view_range = 35,
rotate = 270,
walk_velocity = 2,
run_velocity = 3,
fall_speed = 0,
stepheight = 3,
floats=1,
sounds = {
random = "scrausics",
distance = 40
},
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:raw_scrausics_wing", chance = 1, min = 1, max = 2}
},
armor = 80,
drawtype = "front",
water_damage = 5,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
fly = true,
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 25,
stand_start = 220,
stand_end = 280,
walk_start = 140,
walk_end = 180,
run_start = 190,
run_end = 210,
punch_start = 20,
punch_end = 50
}
})

View file

@ -0,0 +1,49 @@
mobs:register_mob("nssm:signosigno", {
type = "monster",
hp_max = 20,
hp_min = 8,
collisionbox = {-0.2, 0.00, -0.2, 0.2, 1.6, 0.2},
visual = "mesh",
mesh = "signosigno.x",
textures = {
{"signosigno.png"},
{"signosigno2.png"}
},
visual_size = {x = 6, y = 6},
makes_footstep_sound = false,
view_range = 15,
walk_velocity = 1.5,
fear_height = 4,
run_velocity = 2.5,
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 = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 2,
fire_damage = 2,
light_damage = 1,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "morparticle.png",
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 20,
stand_end = 80,
walk_start = 100,
walk_end = 140,
run_start = 200,
run_end = 220,
punch_start = 160,
punch_end = 190
}
})

View file

@ -0,0 +1,62 @@
mobs:register_mob("nssm:snow_biter", {
type = "monster",
hp_max = 30,
hp_min = 15,
collisionbox = {-0.5, 0, -0.5, 0.5, 0.60, 0.5},
visual = "mesh",
mesh = "snow_biter.x",
textures = {
{"snow_biter.png"}
},
visual_size = {x = 6, y = 6},
makes_footstep_sound = true,
view_range = 18,
rotate = 270,
mele_number = 2,
fear_height = 4,
reach = 1.5,
walk_velocity = 0.8,
run_velocity = 3,
sounds = {
random = "snow_biter"
},
damage = 4,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:frosted_amphibian_heart", chance = 2, min = 1, max = 1},
{name = "nssm:amphibian_ribs", chance = 2, min = 1, max = 1},
{name = "nssm:little_ice_tooth", chance = 2, min = 0, max = 4}
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 30,
fire_damage = 20,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
double_melee_attack = true,
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 0,
stand_end = 80,
walk_start = 110,
walk_end = 150,
run_start = 80,
run_end = 100,
punch_start = 175,
punch_end = 190,
punch2_start = 200,
punch2_end = 215
},
do_custom = function(self)
nssm:putting_ability(self, "default:ice", self.run_velocity)
end
})

View file

@ -0,0 +1,61 @@
mobs:register_mob("nssm:spiderduck", {
type = "monster",
hp_max = 35,
hp_min = 24,
collisionbox = {-0.6, -0.8, -0.6, 0.6, 0.4, 0.5},
visual = "mesh",
rotate = 270,
mesh = "spiderduck.x",
textures = {
{"spiderduck.png"}
},
visual_size = {x = 2, y = 2},
fear_height = 4,
makes_footstep_sound = true,
view_range = 24,
walk_velocity = 2,
run_velocity = 4,
sounds = {
random = "duck"
},
damage = 6,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 8},
{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 = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.5,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:webball",
reach = 2,
shoot_interval = 5,
shoot_offset = 2,
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 60,
stand_end = 140,
walk_start = 220,
walk_end = 260,
run_start = 220,
run_end = 260,
punch_start = 20,
punch_end = 46,
shoot_start = 150,
shoot_end = 200
}
})

View file

@ -0,0 +1,62 @@
mobs:register_mob("nssm:stone_eater", {
type = "monster",
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",
textures = {
{"stone_eater.png"}
},
visual_size = {x = 10, y = 10},
makes_footstep_sound = false,
view_range = 16,
rotate = 270,
fear_height = 4,
jump = false,
jump_height = 0,
walk_velocity = 1,
run_velocity = 1.5,
damage = 5,
reach = 1.5,
drops = {
{name = "default:stone", chance = 2, min = 1, max = 3},
{name = "nssm:life_energy", chance = 1, min = 2, max = 3},
{name = "nssm:stoneater_mandible", chance = 2, min = 1, max = 4}
},
armor = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 1,
fire_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,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 20,
stand_start = 1,
stand_end = 60,
walk_start = 70,
walk_end = 110,
run_start = 130,
run_end = 150,
punch_start = 160,
punch_end = 185
},
do_custom = function(self)
nssm:digging_attack(self, "stone", self.run_velocity, {x = 0, y = 1, z = 0})
end
})

View file

@ -0,0 +1,53 @@
mobs:register_mob("nssm:swimming_duck", {
type = "monster",
hp_max = 25,
hp_min = 15,
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 = 1.5, y = 1.5},
view_range = 25,
floats = 1,
walk_velocity = 1,
run_velocity = 1,
damage = 3,
reach = 1.5,
jump = false,
jump_chance = 0,
jump_height = 0,
sounds = {
random = "duck"
},
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 2},
{name = "nssm:duck_legs", chance = 1, min = 1, max = 2},
{name = "nssm:duck_beak", chance = 5, min = 1, max = 1},
{name = "nssm:duck_feather", chance = 6, min = 1, max = 2}
},
armor = 80,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
fire_damage = 10,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 4,
blood_texture = "nssm_blood.png",
attack_type = "dogfight",
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 1,
stand_end = 60,
walk_start = 80,
walk_end = 120,
run_start = 80,
run_end = 120,
punch_start = 140,
punch_end = 160
}
})

View file

@ -0,0 +1,135 @@
mobs:register_mob("nssm:tarantula", {
type = "monster",
hp_max = 50,
hp_min = 50,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.9, 0.5},
visual = "mesh",
mesh = "tarantula.x",
textures = {
{"tarantula.png"}
},
visual_size = {x = 8, y = 8},
makes_footstep_sound = true,
view_range = 20,
lifetimer = 500,
walk_velocity = 0.7,
fear_height = 4,
run_velocity = 3,
rotate = 270,
sounds = {
random = "tarry"
},
damage = 8,
jump = true,
drops = {
{name = "nssm:super_silk_gland", chance = 1, min = 3, max = 5}
},
armor = 60,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
reach = 3,
knock_back = 0,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
light_damage = 0,
dogshoot_switch = true,
attack_type = "dogshoot",
arrow = "nssm:thickwebball",
shoot_interval = 2,
shoot_offset = 1,
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 60,
walk_start = 100,
walk_end = 140,
run_start = 140,
run_end = 160,
punch_start = 180,
punch_end = 200,
shoot_start = 180,
shoot_end = 200
},
on_die = function(self, pos)
self.object:remove()
core.add_particlespawner({
amount = 200,
time = 0.1,
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
maxpos = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
minvel = {x = -0, y = -0, z = -0},
maxvel = {x = 1, y = 1, z = 1},
minacc = {x = -0.5, y = 5, z = -0.5},
maxacc = {x = 0.5, y = 5, z = 0.5},
minexptime = 0.1,
maxexptime = 1,
minsize = 3,
maxsize = 4,
collisiondetection = false,
texture = "tnt_smoke.png"
})
core.add_entity(pos, "nssm:tarantula_propower")
end
})
mobs:register_mob("nssm:tarantula_propower", {
type = "monster",
hp_max = 90,
hp_min = 90,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 1, 0.5},
visual = "mesh",
mesh = "tarantula_propower.x",
textures = {
{"tarantula.png"}
},
visual_size = {x = 10, y = 10},
makes_footstep_sound = true,
view_range = 30,
lifetimer = 500,
walk_velocity = 1.5,
run_velocity = 3.3,
rotate = 270,
sounds = {
random = "tarry"
},
damage = 12,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 16, max = 18},
{name = "nssm:spider_leg", chance = 1, min = 1, max = 8},
{name = "nssm:tarantula_chelicerae", 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 = 40,
drawtype = "front",
water_damage = 1,
lava_damage = 3,
fire_damage = 3,
reach = 4,
knock_back = 0,
blood_texture = "nssm_blood_blue.png",
stepheight = 2.1,
light_damage = 0,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 25,
stand_start = 1,
stand_end = 60,
walk_start = 100,
walk_end = 140,
run_start = 140,
run_end = 160,
punch_start = 180,
punch_end = 200
}
})

View file

@ -0,0 +1,65 @@
mobs:register_mob("nssm:uloboros", {
type = "monster",
hp_max = 28,
hp_min = 17,
collisionbox = {-0.5, 0.00, -0.5, 0.5, 0.8, 0.5},
visual = "mesh",
mesh = "uloboros.x",
textures = {
{"uloboros.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 22,
walk_velocity = 1.5,
fear_height = 4,
run_velocity = 2.5,
rotate = 270,
sounds = {
random = "uloboros"
},
damage = 5,
reach = 2,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 1, max = 4},
{name = "nssm:spider_leg", chance = 2, min = 1, max = 8},
{name = "nssm:silk_gland", chance = 4, min = 1, max = 3},
{name = "nssm:spider_meat", chance = 4, min = 1, max = 2}
},
armor = 80,
drawtype = "front",
water_damage = 1,
lava_damage = 7,
fire_damage = 7,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood_blue.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 20,
speed_run = 30,
stand_start = 1,
stand_end = 80,
walk_start = 120,
walk_end = 160,
run_start = 120,
run_end = 160,
punch_start = 80,
punch_end = 110
},
do_custom = function(self, dtime)
self.web_timer = (self.web_timer or 0) + dtime
if self.web_timer < 5 then return end
self.web_timer = 0
if nssm.spiders_litter_web then
nssm:webber_ability(self, "nssm:web", 2)
end
end
})

View file

@ -0,0 +1,51 @@
mobs:register_mob("nssm:werewolf", {
type = "monster",
hp_max = 40,
hp_min = 25,
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
mesh = "werewolf.x",
textures = {
{"werewolf.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 3,
fear_height = 4,
run_velocity = 5,
sounds = {
random = "werewolf"
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
{name = "nssm:wolf_fur", chance = 2, min = 1, max = 1}
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 1,
stand_end = 60,
walk_start = 90,
walk_end = 130,
run_start = 140,
run_end = 160,
punch_start = 170,
punch_end = 193
}
})

View file

@ -0,0 +1,51 @@
mobs:register_mob("nssm:white_werewolf", {
type = "monster",
hp_max = 40,
hp_min = 25,
collisionbox = {-0.85, -0.01, -0.85, 0.85, 3.50, 0.85},
visual = "mesh",
mesh = "white_werewolf.x",
textures = {
{"white_werewolf.png"}
},
visual_size = {x = 4, y = 4},
makes_footstep_sound = true,
view_range = 30,
walk_velocity = 3,
fear_height = 4,
run_velocity = 5,
sounds = {
random = "werewolf"
},
damage = 5,
jump = true,
drops = {
{name = "nssm:life_energy", chance = 1, min = 3, max = 4},
{name = "nssm:werewolf_leg", chance = 2, min = 1, max = 2},
{name = "nssm:white_wolf_fur", chance = 2, min = 1, max = 1}
},
armor = 80,
drawtype = "front",
water_damage = 2,
lava_damage = 5,
fire_damage = 5,
light_damage = 0,
group_attack = true,
attack_animals = true,
knock_back = 2,
blood_texture = "nssm_blood.png",
stepheight = 1.1,
attack_type = "dogfight",
animation = {
speed_normal = 15,
speed_run = 25,
stand_start = 1,
stand_end = 60,
walk_start = 90,
walk_end = 130,
run_start = 140,
run_end = 160,
punch_start = 170,
punch_end = 193
}
})