mobs_mc/polar_bear.lua

83 lines
1.6 KiB
Lua
Raw Normal View History

--License for code WTFPL and otherwise stated in readmes
2017-06-19 19:00:03 -04:00
--dofile(minetest.get_modpath("mobs").."/api.lua")
--###################
--################### POLARBEAR
--###################
2017-06-13 19:05:07 -04:00
mobs:register_mob("mobs_mc:polar_bear", {
type = "animal",
2017-06-21 00:20:06 -04:00
runaway = false,
passive = false,
stepheight = 1.2,
2017-06-14 19:47:33 -04:00
hp_min = 30,
2017-05-28 23:16:44 -04:00
hp_max = 30,
2017-06-21 00:20:06 -04:00
collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7},
rotate = -180,
visual = "mesh",
mesh = "mobs_mc_polar_bear.b3d",
textures = {
{"mobs_mc_polarbear.png"},
},
2017-06-21 00:20:06 -04:00
visual_size = {x=3.0, y=3.0},
makes_footstep_sound = true,
2017-06-14 19:47:33 -04:00
damage = 6,
2017-05-25 20:39:12 -04:00
walk_velocity = 1.2,
run_velocity = 2.4,
group_attack = true,
attack_type = "dogfight",
drops = {
2017-06-21 00:20:06 -04:00
-- 3/4 chance to drop raw fish (poor approximation)
{name = mobs_mc.items.fish_raw,
2017-06-21 00:20:06 -04:00
chance = 2,
min = 0,
2017-05-28 23:16:44 -04:00
max = 2,},
2017-06-21 00:20:06 -04:00
-- 1/4 to drop raw salmon
{name = mobs_mc.items.salmon_raw,
2017-06-21 00:20:06 -04:00
chance = 4,
min = 0,
max = 2,},
2017-05-28 23:16:44 -04:00
},
drawtype = "front",
2017-06-21 00:20:06 -04:00
water_damage = 0,
floats = 1,
lava_damage = 5,
light_damage = 0,
2017-06-21 00:20:06 -04:00
fear_height = 4,
sounds = {
2017-06-21 00:20:06 -04:00
random = "Cowhurt1", -- TODO: Replace
},
animation = {
2017-05-23 00:35:56 -04:00
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40,
},
2017-06-21 00:20:06 -04:00
view_range = 16,
})
2017-06-13 19:05:07 -04:00
-- compatibility
mobs:alias_mob("mobs_mc:polarbear", "mobs_mc:polar_bear")
2017-06-24 19:09:38 +02:00
mobs:register_spawn("mobs_mc:polar_bear", mobs_mc.spawn.snow, minetest.LIGHT_MAX+1, 0, 7000, 3, 31000)
-- spawn egg
2017-05-23 19:03:37 -04:00
2017-06-14 19:47:33 -04:00
mobs:register_egg("mobs_mc:polar_bear", "Polar Bear", "mobs_mc_spawn_icon_polarbear.png", 0)
2017-06-14 19:47:33 -04:00
2017-06-21 00:20:06 -04:00
if minetest.settings:get_bool("log_mods") then
2017-05-23 00:35:56 -04:00
minetest.log("action", "MC Polar Bear loaded")
2017-06-14 19:47:33 -04:00
end