mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-05 10:00:26 +01:00
parent
8ae784743d
commit
6310c475aa
|
@ -65,7 +65,7 @@ minetest.register_node("jukebox:box", {
|
|||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
|
||||
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -109,7 +109,7 @@ minetest.register_node("jukebox:box", {
|
|||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 1)
|
||||
end,
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
|
|
@ -1147,11 +1147,11 @@ end
|
|||
end
|
||||
|
||||
-- knock back effect
|
||||
if self.knock_back > 0 then
|
||||
if tflp and self.knock_back > 0 then
|
||||
local kb = self.knock_back
|
||||
local r = self.recovery_time
|
||||
local v = self.object:getvelocity()
|
||||
if tflp < tool_capabilities.full_punch_interval then
|
||||
if tflp < punch_interval then
|
||||
if kb > 0 then
|
||||
kb = kb * ( tflp / tool_capabilities.full_punch_interval )
|
||||
end
|
||||
|
|
115
mods/mobs/bosses.lua
Executable file
115
mods/mobs/bosses.lua
Executable file
|
@ -0,0 +1,115 @@
|
|||
-- Pumpking by Blert2112
|
||||
|
||||
mobs:register_mob("mobs:pumpking", {
|
||||
type = "monster",
|
||||
visual = "mesh",
|
||||
mesh = "mobs_pumpking.x",
|
||||
textures = {
|
||||
{"mobs_pumpking.png"}
|
||||
},
|
||||
visual_size = {x=3, y=3},
|
||||
collisionbox = {-0.85, 0.00, -0.85, 0.85, 5.3, 0.85},
|
||||
animation = {
|
||||
speed_normal = 15, speed_run = 30,
|
||||
stand_start = 165, stand_end = 210,
|
||||
walk_start = 61, walk_end = 110,
|
||||
run_start = 0, run_end = 50,
|
||||
punch_start = 150, punch_end = 165
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "mobs_king"
|
||||
},
|
||||
hp_min = 85,
|
||||
hp_max = 90,
|
||||
armor = 30,
|
||||
knock_back = 1,
|
||||
light_damage = 10,
|
||||
water_damage = 5,
|
||||
lava_damage = 5,
|
||||
fall_damage = 20,
|
||||
damage = 8,
|
||||
attack_type = "dogfight",
|
||||
view_range = 25,
|
||||
stepheight = 1.1,
|
||||
drops = {
|
||||
{name = "farming:jackolantern", chance = 1, min = 1, max = 1}
|
||||
},
|
||||
lifetimer = 180, -- 3 minutes
|
||||
shoot_interval = 135, -- (lifetimer - (lifetimer / 4)), borrowed for do_custom timer
|
||||
do_custom = function(self)
|
||||
if self.lifetimer <= self.shoot_interval then
|
||||
p = self.object:getpos()
|
||||
p.y = p.y + 1
|
||||
minetest.add_entity(p, "mobs:pumpboom")
|
||||
minetest.after(5.0, function(pos, str) minetest.add_entity(pos, str) end,
|
||||
p, "mobs:pumpboom")
|
||||
self.shoot_interval = self.shoot_interval - 45
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs:pumpking", "Pumpkin King", "farming_pumpkin_side.png", 1)
|
||||
|
||||
mobs:register_mob("mobs:pumpboom", {
|
||||
type = "monster",
|
||||
visual = "mesh",
|
||||
mesh = "mobs_pumpboom.x",
|
||||
textures = {
|
||||
{"mobs_pumpboom.png"}
|
||||
},
|
||||
visual_size = {x=3, y=3},
|
||||
collisionbox = {-0.80, -0.3, -0.80, 0.80, 0.80, 0.80},
|
||||
rotate = 270,
|
||||
animation = {
|
||||
speed_normal = 15, speed_run = 30,
|
||||
stand_start = 0, stand_end = 30,
|
||||
walk_start = 81, walk_end = 97,
|
||||
run_start = 81, run_end = 97,
|
||||
punch_start = 100, punch_end = 120
|
||||
},
|
||||
sounds = {
|
||||
random = "mobs_pump"
|
||||
},
|
||||
hp_min = 2,
|
||||
hp_max = 5,
|
||||
armor = 200,
|
||||
light_damage = 2,
|
||||
water_damage = 2,
|
||||
lava_damage = 2,
|
||||
fall_damage = 3,
|
||||
damage = 4,
|
||||
attack_type = "explode",
|
||||
group_attack = true,
|
||||
view_range = 15,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
drops = {
|
||||
{name = "farming:pumpkin_seed", chance = 1, min = 1, max = 4}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("mobs:pumpking_spawner", {
|
||||
description = "Pumpkin King Spawner",
|
||||
tiles = {
|
||||
"farming_pumpkin_top.png",
|
||||
"farming_pumpkin_top.png",
|
||||
"farming_pumpkin_side.png",
|
||||
"farming_pumpkin_side.png",
|
||||
"farming_pumpkin_side.png",
|
||||
"farming_pumpkin_face_on.png"
|
||||
},
|
||||
is_ground_content = false,
|
||||
groups = {cracky=3, stone=1, mob_spawner=1},
|
||||
sounds = default.node_sound_stone_defaults({
|
||||
dug = {name="mobs_king", gain=0.25}
|
||||
})
|
||||
})
|
||||
minetest.register_abm({
|
||||
nodenames = {"mobs:pumpking_spawner"},
|
||||
interval = 180.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.add_entity(pos, "mobs:pumpking")
|
||||
end
|
||||
})
|
|
@ -36,6 +36,9 @@ dofile(path.."/zombie.lua") -- ???
|
|||
dofile(path.."/yeti.lua") -- ???
|
||||
dofile(path.."/minotaur.lua") -- Kalabasa
|
||||
|
||||
-- The bosses
|
||||
dofile(path.."/bosses.lua")
|
||||
|
||||
-- begin slimes mobs compatibility changes
|
||||
-- cannot find mesecons?, craft glue instead
|
||||
if not minetest.get_modpath("mesecons_materials") then
|
||||
|
|
14742
mods/mobs/models/mobs_pumpboom.x
Normal file
14742
mods/mobs/models/mobs_pumpboom.x
Normal file
File diff suppressed because it is too large
Load Diff
55341
mods/mobs/models/mobs_pumpking.x
Normal file
55341
mods/mobs/models/mobs_pumpking.x
Normal file
File diff suppressed because it is too large
Load Diff
BIN
mods/mobs/sounds/mobs_king.ogg
Normal file
BIN
mods/mobs/sounds/mobs_king.ogg
Normal file
Binary file not shown.
BIN
mods/mobs/sounds/mobs_pump.ogg
Normal file
BIN
mods/mobs/sounds/mobs_pump.ogg
Normal file
Binary file not shown.
BIN
mods/mobs/textures/mobs_pumpboom.png
Normal file
BIN
mods/mobs/textures/mobs_pumpboom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
mods/mobs/textures/mobs_pumpking.png
Normal file
BIN
mods/mobs/textures/mobs_pumpking.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
Loading…
Reference in New Issue
Block a user