VoxeLibre/mods/ENTITIES/mobs_mc/polar_bear.lua

96 lines
1.9 KiB
Lua
Raw Normal View History

2017-07-05 03:15:46 +02:00
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
2017-07-05 03:15:46 +02:00
--###################
--################### POLARBEAR
--###################
mcl_mobs.register_mob("mobs_mc:polar_bear", {
2021-04-25 17:30:15 +02:00
description = S("Polar Bear"),
2017-07-05 03:15:46 +02:00
type = "animal",
2020-04-11 02:46:03 +02:00
spawn_class = "passive",
2017-07-05 03:15:46 +02:00
runaway = false,
passive = false,
hp_min = 30,
hp_max = 30,
2020-12-06 15:46:42 +01:00
xp_min = 1,
xp_max = 3,
2019-10-02 18:31:16 +02:00
breath_max = -1,
2017-07-05 03:15:46 +02:00
collisionbox = {-0.7, -0.01, -0.7, 0.7, 1.39, 0.7},
visual = "mesh",
mesh = "mobs_mc_polarbear.b3d",
textures = {
{"mobs_mc_polarbear.png"},
},
2022-10-07 04:40:42 +02:00
head_swivel = "head.control",
bone_eye_height = 2.6,
head_eye_height = 1,
horizontal_head_height = 0,
2022-10-07 04:40:42 +02:00
curiosity = 20,
head_yaw="z",
2017-07-05 03:15:46 +02:00
visual_size = {x=3.0, y=3.0},
makes_footstep_sound = true,
damage = 6,
2017-07-26 00:26:18 +02:00
reach = 2,
2017-07-05 03:15:46 +02:00
walk_velocity = 1.2,
run_velocity = 2.4,
group_attack = true,
attack_type = "dogfight",
2017-07-05 03:15:46 +02:00
drops = {
-- 3/4 chance to drop raw fish (poor approximation)
2022-05-25 23:25:15 +02:00
{name = "mcl_fishing:fish_raw",
2017-07-05 03:15:46 +02:00
chance = 2,
min = 0,
2020-12-23 17:41:42 +01:00
max = 2,
2021-04-25 17:30:15 +02:00
looting = "common",},
2017-07-05 03:15:46 +02:00
-- 1/4 to drop raw salmon
2022-05-25 23:25:15 +02:00
{name = "mcl_fishing:salmon_raw",
2017-07-05 03:15:46 +02:00
chance = 4,
min = 0,
2020-12-23 17:41:42 +01:00
max = 2,
looting = "common",},
2017-07-05 03:15:46 +02:00
},
floats = 1,
fear_height = 4,
2020-12-06 03:24:32 +01:00
sounds = {
random = "mobs_mc_bear_random",
attack = "mobs_mc_bear_attack",
damage = "mobs_mc_bear_hurt",
death = "mobs_mc_bear_death",
war_cry = "mobs_mc_bear_growl",
distance = 16,
},
2017-07-05 03:15:46 +02:00
animation = {
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 40,
run_start = 0, run_end = 40,
},
view_range = 16,
})
2022-05-25 14:44:49 +02:00
mcl_mobs:spawn_specific(
2021-04-08 13:39:18 +02:00
"mobs_mc:polar_bear",
"overworld",
"ground",
{
"ColdTaiga",
"IcePlainsSpikes",
"IcePlains",
},
0,
minetest.LIGHT_MAX+1,
30,
50,
2021-04-08 13:39:18 +02:00
3,
2022-05-25 23:25:15 +02:00
mcl_vars.mg_overworld_min,
mcl_vars.mg_overworld_max)
2017-07-05 03:15:46 +02:00
-- spawn egg
mcl_mobs.register_egg("mobs_mc:polar_bear", S("Polar Bear"), "#f2f2f2", "#959590", 0)