mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-14 06:20:32 +01:00
84 lines
1.7 KiB
Lua
84 lines
1.7 KiB
Lua
|
|
||
|
local S = mobs.intllib
|
||
|
|
||
|
|
||
|
-- Sand Monster by PilzAdam
|
||
|
|
||
|
mobs:register_mob("mobs_monster:sand_monster", {
|
||
|
type = "monster",
|
||
|
passive = false,
|
||
|
attack_type = "dogfight",
|
||
|
pathfinding = true,
|
||
|
--specific_attack = {"player", "mobs_npc:npc"},
|
||
|
reach = 2,
|
||
|
damage = 1,
|
||
|
hp_min = 4,
|
||
|
hp_max = 20,
|
||
|
armor = 100,
|
||
|
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
|
||
|
visual = "mesh",
|
||
|
mesh = "mobs_sand_monster.b3d",
|
||
|
textures = {
|
||
|
{"mobs_sand_monster.png"},
|
||
|
},
|
||
|
makes_footstep_sound = true,
|
||
|
sounds = {
|
||
|
random = "mobs_sandmonster",
|
||
|
},
|
||
|
walk_velocity = 1.5,
|
||
|
run_velocity = 4,
|
||
|
view_range = 8, --15
|
||
|
jump = true,
|
||
|
floats = 0,
|
||
|
drops = {
|
||
|
{name = "default:desert_sand", chance = 1, min = 3, max = 5},
|
||
|
{name = "maptools:silver_coin", chance = 10, min = 1, max = 1,},
|
||
|
},
|
||
|
water_damage = 3,
|
||
|
lava_damage = 4,
|
||
|
light_damage = 0,
|
||
|
fear_height = 4,
|
||
|
animation = {
|
||
|
speed_normal = 15,
|
||
|
speed_run = 15,
|
||
|
stand_start = 0,
|
||
|
stand_end = 39,
|
||
|
walk_start = 41,
|
||
|
walk_end = 72,
|
||
|
run_start = 74,
|
||
|
run_end = 105,
|
||
|
punch_start = 74,
|
||
|
punch_end = 105,
|
||
|
},
|
||
|
--[[
|
||
|
custom_attack = function(self, p)
|
||
|
local pos = self.object:get_pos()
|
||
|
minetest.add_item(pos, "default:sand")
|
||
|
end,
|
||
|
]]
|
||
|
})
|
||
|
|
||
|
|
||
|
mobs:spawn({
|
||
|
name = "mobs_monster:sand_monster",
|
||
|
nodes = {"default:desert_sand", "default:sand"},
|
||
|
chance = 7000,
|
||
|
active_object_count = 2,
|
||
|
min_height = 0,
|
||
|
})
|
||
|
|
||
|
|
||
|
mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1)
|
||
|
|
||
|
|
||
|
mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility
|
||
|
|
||
|
minetest.register_craft({
|
||
|
output = "mobs_monster:sand_monster",
|
||
|
recipe = {
|
||
|
{"group:sand", "group:sand", "group:sand"},
|
||
|
{"group:sand", "default:nyancat_rainbow", "group:sand"},
|
||
|
{"group:sand", "group:sand", "group:sand"}
|
||
|
}
|
||
|
})
|