Camas/mods/mobs/mob_mineturtle.lua

78 lines
1.7 KiB
Lua
Raw Normal View History

-- Mineturtle by KaadmY
2015-09-01 17:15:24 +02:00
2019-08-28 17:31:41 +02:00
local S = minetest.get_translator("mobs")
2015-09-01 17:15:24 +02:00
mobs:register_mob(
"mobs:mineturtle",
{
type = "monster",
passive = false,
attack_type = "explode",
hp_min = 10,
hp_max = 15,
armor = 200,
collisionbox = {-0.4, 0, -0.4, 0.4, 0.7, 0.4},
visual = "mesh",
mesh = "mobs_mineturtle.x",
textures = {
{"mobs_mineturtle.png"},
},
makes_footstep_sound = false,
sounds = {
2019-09-03 20:01:56 +02:00
war_cry = "mobs_mineturtle",
2015-09-01 17:15:24 +02:00
random = "mobs_mineturtle",
2019-09-03 20:01:56 +02:00
explode = "tnt_explode",
distance = 16,
2015-09-01 17:15:24 +02:00
},
walk_velocity = 2,
run_velocity = 4,
jump = true,
follow = "tnt:tnt",
view_range = 10,
drops = {
{name = "tnt:tnt",
chance = 1, min = 1, max = 3},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
animation = {
speed_normal = 25,
speed_run = 35,
stand_start = 0,
stand_end = 30,
run_start = 31,
run_end = 50,
walk_start = 31,
walk_end = 50,
punch_start = 51,
punch_end = 60,
},
on_rightclick = function(self, clicker)
mobs:feed_tame(self, clicker, 4, false)
mobs:capture_mob(self, clicker, 0, 20, 40, false, nil)
end,
on_die = function(self, pos, hitter)
if hitter == nil or (hitter ~= nil and not hitter:is_player()) then
return
end
achievements.trigger_achievement(hitter, "bomb_has_been_defused")
end,
})
mobs:register_spawn(
"mobs:mineturtle",
{
"default:dirt_with_grass"
},
20,
5,
200000,
1,
31000
)
2015-09-01 17:15:24 +02:00
2019-08-28 17:31:41 +02:00
mobs:register_egg("mobs:mineturtle", S("Mine Turtle"), "mobs_mineturtle_inventory.png")