1
0
Fork 0
MineClone2/mods/ENTITIES/mobs_mc/zombiepig.lua

99 lines
2.2 KiB
Lua
Raw Normal View History

--MCmobs v0.2
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
--dofile(minetest.get_modpath("mobs").."/api.lua")
mobs:register_mob("mobs_mc:pigman", {
type = "monster",
2017-01-20 20:24:56 +00:00
hp_min = 20,
2017-01-16 19:52:09 +00:00
hp_max = 20,
collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3},
visual = "mesh",
mesh = "3d_armor_character.b3d",
2017-06-10 20:51:07 +00:00
textures = {{"mobs_mc_zombiepig.png",
"3d_armor_trans.png",
minetest.registered_items["mcl_tools:sword_gold"].inventory_image,
}},
makes_footstep_sound = true,
walk_velocity = .8,
run_velocity = 2.6,
damage = 2,
armor = 80,
2017-03-03 00:27:10 +00:00
pathfinding = 1,
group_attack = true,
drops = {
{name = "mcl_mobitems:rotten_flesh",
chance = 1,
2017-01-16 19:52:09 +00:00
min = 0,
max = 1,},
2017-01-31 22:32:56 +00:00
{name = "mcl_core:gold_nugget",
2017-01-16 19:52:09 +00:00
chance = 1,
min = 0,
2017-01-16 19:52:09 +00:00
max = 1,},
2017-01-31 22:32:56 +00:00
{name = "mcl_core:gold_ingot",
2017-01-16 19:52:09 +00:00
chance = 40,
min = 1,
max = 1,},
{name = "mcl_tools:sword_gold",
2017-01-16 19:52:09 +00:00
-- approximation to 8.5%
chance = 11,
min = 1,
max = 1,},
},
sounds = {
random = "Pig2",
death = "Pigdeath",
damage = "zombiehurt1",
attack = "default_punch3",
},
--[[
animation = {
speed_normal = 24,
speed_run = 48,
stand_start = 0,
stand_end = 23,
walk_start = 24,
walk_end = 47,
run_start = 48,
run_end = 62,
hurt_start = 64,
hurt_end = 86,
death_start = 88,
death_end = 118,
},
]]
animation = {
speed_normal = 30, speed_run = 30,
stand_start = 0, stand_end = 79,
walk_start = 168, walk_end = 187,
run_start = 168, run_end = 187,
punch_start = 200, punch_end = 219,
},
drawtype = "front",
lava_damage = minetest.registered_nodes["mcl_core:lava_source"].damage_per_second,
2017-03-01 22:18:24 +00:00
light_damage = 0,
fear_height = 3,
view_range = 16,
attack_type = "dogfight",
})
2017-02-20 02:00:03 +00:00
mobs:register_spawn("mobs_mc:pigman", {"mcl_nether:netherrack", "mcl_nether:nether_brick"}, 17, -1, 5000, 3, -1000)
2017-02-14 23:37:39 +00:00
mobs:register_spawn("mobs_mc:pigman", {"mcl_nether:portal"}, 15, -1, 500, 4, 31000)
2017-01-31 22:32:56 +00:00
mobs:register_spawn("mobs_mc:pigman", {"mcl_core:obsidian"}, 17, -1, 1900, 1, 31000)
-- compatibility
mobs:alias_mob("mobs:pigman", "mobs_mc:pigman")
-- spawn eggs
mobs:register_egg("mobs_mc:pigman", "Spawn Zombie Pigman", "spawn_egg_zombie_pigman.png")
if minetest.setting_get("log_mods") then
minetest.log("action", "MC Pigmen loaded")
end