Version 0.42.1
[MineClone/MineClone2.git] / mods / ENTITIES / mobs_mc / villager_zombie.lua
blob4abb6b6e894b3cb18b7ff2bb50410f7f6caddc6e
1 --MCmobs v0.4
2 --maikerumine
3 --made for MC like Survival game
4 --License for code WTFPL and otherwise stated in readmes
6 -- intllib
7 local MP = minetest.get_modpath(minetest.get_current_modname())
8 local S, NS = dofile(MP.."/intllib.lua")
10 -- TODO: Turn villagers to zombie villager
12 --###################
13 --################### ZOMBIE VILLAGER
14 --###################
17 mobs:register_mob("mobs_mc:villager_zombie", {
18 type = "monster",
19 hp_min = 20,
20 hp_max = 20,
21 armor = 90,
22 collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
23 visual = "mesh",
24 mesh = "mobs_mc_villager_zombie.b3d",
25 textures = {
26 {"mobs_mc_zombie_butcher.png"},
27 {"mobs_mc_zombie_farmer.png"},
28 {"mobs_mc_zombie_librarian.png"},
29 {"mobs_mc_zombie_priest.png"},
30 {"mobs_mc_zombie_smith.png"},
31 {"mobs_mc_zombie_villager.png"}
33 visual_size = {x=3, y=3},
34 makes_footstep_sound = true,
35 damage = 3,
36 reach = 2,
37 walk_velocity = 1.2,
38 run_velocity = 2.4,
39 attack_type = "dogfight",
40 group_attack = true,
41 drops = {
42 {name = mobs_mc.items.rotten_flesh,
43 chance = 1,
44 min = 0,
45 max = 2,},
46 {name = mobs_mc.items.iron_ingot,
47 chance = 120, -- 2.5% / 3
48 min = 1,
49 max = 1,},
50 {name = mobs_mc.items.carrot,
51 chance = 120, -- 2.5% / 3
52 min = 1,
53 max = 1,},
54 {name = mobs_mc.items.potato,
55 chance = 120, -- 2.5% / 3
56 min = 1,
57 max = 1,},
59 sounds = {
60 random = "mobs_mc_zombie_idle",
61 war_cry = "mobs_mc_zombie_idle",
62 death = "mobs_mc_zombie_death",
63 damage = "mobs_mc_zombie_hurt",
64 distance = 16,
66 animation = {
67 speed_normal = 25,
68 speed_run = 50,
69 stand_start = 20,
70 stand_end = 40,
71 walk_start = 0,
72 walk_end = 20,
73 run_start = 0,
74 run_end = 20,
76 water_damage = 1,
77 lava_damage = 5,
78 sunlight_damage = 1,
79 view_range = 16,
80 fear_height = 5,
84 mobs:spawn_specific("mobs_mc:villager_zombie", mobs_mc.spawn.village, {"air"}, 0, 7, 30, 4090, 4, mobs_mc.spawn_height.water+1, mobs_mc.spawn_height.overworld_max)
86 -- spawn eggs
87 mobs:register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "mobs_mc_spawn_icon_zombie_villager.png", 0)
89 if minetest.settings:get_bool("log_mods") then
90 minetest.log("action", "MC mobs Zombie Villager loaded")
91 end