mobs_more_monsters/mobs_zombie/init.lua

116 lines
2.9 KiB
Lua

if mobs.mod and mobs.mod == "redo" then
-- zombie
mobs:register_mob("mobs_zombie:zombie", {
type = "monster",
visual = "mesh",
mesh = "creatures_mob.x",
textures = {
{"mobs_zombie.png"},
},
collisionbox = {-0.25, -1, -0.3, 0.25, 0.75, 0.3},
animation = {
speed_normal = 10, speed_run = 15,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 188,
run_start = 168, run_end = 188
},
makes_footstep_sound = true,
sounds = {
random = "mobs_zombie.1",
war_cry = "mobs_zombie.3",
attack = "mobs_zombie.2",
damage = "mobs_zombie_hit",
death = "mobs_zombie_death",
},
hp_min = 12,
hp_max = 35,
armor = 200,
knock_back = 1,
lava_damage = 10,
light_damage = 2,
damage = 4,
reach = 2,
attack_type = "dogfight",
group_attack = true,
view_range = 10,
walk_chance = 75,
walk_velocity = 0.5,
run_velocity = 0.5,
jump = false,
drops = {
{name = "mobs_zombie:rotten_flesh", chance = 1, min = 1, max = 3},
{name = "ethereal:bone", chance = 2, min = 2, max = 4}
},
lifetimer = 180, -- 3 minutes
shoot_interval = 135, -- (lifetimer - (lifetimer / 4)), borrowed for do_custom timer
})
--name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_zombie:zombie",
{"default:stone", "default:dirt_with_grass"},
{"air"},
-1, 7, 30, 10000, 2, -31000, 120
)
-- mobs:spawn_specific("mobs_zombie:zombie_mini",
-- {"default:stone", "default:dirt_with_grass"},
-- {"air"},
-- -1, 7, 30, 10000, 2, -31000, 31000
-- )
mobs:register_egg("mobs_zombie:zombie", "Zombie", "zombie_head.png", 0)
-- mini zombie
-- if ENABLE_MINI_ZOMBIE then
mobs:register_mob("mobs_zombie:zombie_mini", {
type = "monster",
visual = "mesh",
mesh = "creatures_mob.x",
textures = {
{"mobs_zombie.png"},
},
visual_size = {x = 0.5, y = 0.5},
collisionbox = {-0.125, -0.5, -0.15, 0.125, 0.375, 0.15},
animation = {
speed_normal = 10, speed_run = 15,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 188,
run_start = 168, run_end = 188
},
makes_footstep_sound = true,
sounds = {
random = "mobs_zombie.1",
war_cry = "mobs_zombie.3",
attack = "mobs_zombie.2",
damage = "mobs_zombie_hit",
death = "mobs_zombie_death"
},
hp_min = 40,
hp_max = 85,
armor = 170,
knock_back = 1,
lava_damage = 10,
light_damage = 2,
damage = 12,
reach = 1,
attack_type = "dogfight",
group_attack = true,
view_range = 20,
walk_chance = 75,
walk_velocity = 1.2,
run_velocity = 2.2,
jump = false,
drops = {
{name = "mobs_zombie:rotten_flesh", chance = 1, min = 1, max = 1,}
}
})
-- end
-- rotten flesh
minetest.register_craftitem("mobs_zombie:rotten_flesh", {
description = "Rotten Flesh",
inventory_image = "mobs_rotten_flesh.png",
on_use = minetest.item_eat(-3),
})
end