2017-05-23 00:35:56 -04:00
|
|
|
--MCmobs v0.4
|
2017-05-22 22:27:00 -04:00
|
|
|
--maikerumine
|
|
|
|
--made for MC like Survival game
|
|
|
|
--License for code WTFPL and otherwise stated in readmes
|
|
|
|
|
|
|
|
|
|
|
|
--dofile(minetest.get_modpath("mobs").."/api.lua")
|
|
|
|
|
|
|
|
--###################
|
|
|
|
--################### ZOMBIE VILLAGER
|
|
|
|
--###################
|
|
|
|
|
|
|
|
|
2017-05-23 00:35:56 -04:00
|
|
|
mobs:register_mob("mobs_mc:villager_zombie", {
|
|
|
|
type = "monster",
|
2017-05-22 22:27:00 -04:00
|
|
|
hp_min = 35,
|
|
|
|
hp_max = 75,
|
2017-05-23 00:35:56 -04:00
|
|
|
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2, 0.35},
|
|
|
|
rotate = -180,
|
2017-05-22 22:27:00 -04:00
|
|
|
visual = "mesh",
|
2017-05-23 00:35:56 -04:00
|
|
|
mesh = "zvillager.b3d",
|
2017-06-06 19:13:16 -04:00
|
|
|
textures = {
|
|
|
|
{"zombie_butcher.png"},
|
|
|
|
{"zombie_farmer.png"},
|
|
|
|
{"zombie_librarian.png"},
|
|
|
|
{"zombie_priest.png"},
|
|
|
|
{"zombie_smith.png"},
|
|
|
|
{"zombie_villager.png"}
|
|
|
|
},
|
2017-05-23 00:35:56 -04:00
|
|
|
visual_size = {x=3, y=3},
|
2017-05-22 22:27:00 -04:00
|
|
|
makes_footstep_sound = true,
|
|
|
|
damage = 2,
|
|
|
|
walk_velocity = 1.2,
|
|
|
|
run_velocity = 2.4,
|
|
|
|
group_attack = true,
|
|
|
|
attack_type = "dogfight",
|
2017-05-23 00:35:56 -04:00
|
|
|
group_attack = true,
|
2017-05-22 22:27:00 -04:00
|
|
|
drops = {
|
2017-05-23 00:35:56 -04:00
|
|
|
{name = "mobs:rotten_flesh",
|
|
|
|
chance = 1,
|
|
|
|
min = 0,
|
2017-05-22 22:27:00 -04:00
|
|
|
max = 2,},
|
2017-05-23 00:35:56 -04:00
|
|
|
{name = "default:iron_ingot",
|
|
|
|
-- approximation to 8.5%
|
|
|
|
chance = 11,
|
|
|
|
min = 1,
|
|
|
|
max = 1,},
|
|
|
|
{name = "farming:carrot",
|
|
|
|
-- approximation to 8.5%
|
|
|
|
chance = 11,
|
|
|
|
min = 1,
|
|
|
|
max = 1,},
|
|
|
|
{name = "farming:potato",
|
|
|
|
-- approximation to 8.5%
|
|
|
|
chance = 11,
|
|
|
|
min = 1,
|
|
|
|
max = 1,},
|
2017-05-22 22:27:00 -04:00
|
|
|
},
|
|
|
|
armor = 90,
|
|
|
|
sounds = {
|
|
|
|
random = "Villager1",
|
|
|
|
death = "Villagerdead",
|
|
|
|
damage = "Villagerhurt1",
|
|
|
|
},
|
|
|
|
animation = {
|
2017-06-06 19:13:16 -04:00
|
|
|
speed_normal = 25,
|
|
|
|
speed_run = 50,
|
|
|
|
stand_start = 20,
|
|
|
|
stand_end = 40,
|
|
|
|
walk_start = 0,
|
|
|
|
walk_end = 20,
|
|
|
|
run_start = 0,
|
|
|
|
run_end = 20,
|
2017-05-22 22:27:00 -04:00
|
|
|
},
|
|
|
|
drawtype = "front",
|
|
|
|
water_damage = 1,
|
|
|
|
lava_damage = 5,
|
2017-05-23 00:35:56 -04:00
|
|
|
light_damage = 1,
|
2017-05-22 22:27:00 -04:00
|
|
|
view_range = 16,
|
|
|
|
fear_height = 5,
|
|
|
|
|
|
|
|
})
|
2017-05-23 00:35:56 -04:00
|
|
|
--mobs:register_spawn("mobs_mc:villager", {"default:gravel"}, 7, -1, 4090, 4, 31000)
|
|
|
|
mobs:register_spawn("mobs_mc:villager_zombie", {"mg_villages:road"}, 7, -1, 4090, 4, 31000)
|
2017-05-22 22:27:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-23 00:35:56 -04:00
|
|
|
-- spawn eggs
|
|
|
|
--mobs:register_egg("mobs_mc:villager", "Villager", "spawn_egg_villager.png")
|
|
|
|
mobs:register_egg("mobs_mc:villager_zombie", "Zombie Villager", "zvillager_inv.png", 0)
|
2017-05-22 22:27:00 -04:00
|
|
|
|
2017-06-19 19:00:03 -04:00
|
|
|
if minetest.setting_get("log_mods") then
|
2017-05-23 00:35:56 -04:00
|
|
|
minetest.log("action", "MC mobs Zombie Villager loaded")
|
2017-06-06 19:13:16 -04:00
|
|
|
end
|