loud_walking/zombie.lua

82 lines
2.3 KiB
Lua

-- Originally by Blockmen(?)
if mobs.mod and mobs.mod == "redo" then
mobs:register_mob("loud_walking: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,
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 = "loud_walking:rotten_flesh", chance = 1, min = 1, max = 3,}
},
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("loud_walking:zombie", {'group:soil'}, {"air"}, -1, 5, 30, 4000, 3, -31000, 31000)
mobs:register_egg("loud_walking:zombie", "Zombie", "zombie_head.png", 0)
local m = table.copy(minetest.registered_entities["loud_walking:zombie"])
m.name = 'loud_walking:zombie_enhanced'
m.hp_min = 24
m.hp_max = 70
m.armor = 100
m.damage = 6
m.walk_velocity = 0.5
m.run_velocity = 3.5
m.drops = {
{name = "loud_walking:rotten_flesh", chance = 1, min = 1, max = 3,},
{name = "default:mese_crystal", chance = 2, min = 1, max = 3,},
}
minetest.registered_entities["loud_walking:zombie_enhanced"] = m
mobs.spawning_mobs["loud_walking:zombie_enhanced"] = true
mobs:spawn_specific("loud_walking:zombie_enhanced", {'loud_walking:complex_block'}, {"air"}, -1, 20, 30, 1000, 6, -31000, -50)
-- rotten flesh
minetest.register_craftitem("loud_walking:rotten_flesh", {
description = "Rotten Flesh",
inventory_image = "mobs_rotten_flesh.png",
on_use = minetest.item_eat(-1),
})
minetest.register_craft({
type = "cooking",
cooktime = 30,
output = "loud_walking:barely_edible_meat",
recipe = "loud_walking:rotten_flesh"
})
end