added some default drop items to mobs
This commit is contained in:
parent
d44a25a6f4
commit
b419af00d8
@ -26,6 +26,9 @@ mobs:register_mob("dmobs:elephant", {
|
|||||||
fall_damage = 1,
|
fall_damage = 1,
|
||||||
fall_speed = -20, -- extra heavy!
|
fall_speed = -20, -- extra heavy!
|
||||||
fear_height = 2,
|
fear_height = 2,
|
||||||
|
drops = {
|
||||||
|
{name = "default:grass_1", chance = 1, min = 1, max = 3},
|
||||||
|
},
|
||||||
replace_rate = 10,
|
replace_rate = 10,
|
||||||
replace_what = {
|
replace_what = {
|
||||||
"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"
|
"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"
|
||||||
|
@ -28,6 +28,10 @@ mobs:register_mob("dmobs:gnorm", {
|
|||||||
fall_damage = 1,
|
fall_damage = 1,
|
||||||
fall_speed = -6,
|
fall_speed = -6,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
|
drops = {
|
||||||
|
{name = "default:wood", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "default:apple", chance = 1, min = 0, max = 1},
|
||||||
|
},
|
||||||
replace_rate = 10,
|
replace_rate = 10,
|
||||||
replace_what = {
|
replace_what = {
|
||||||
"default:apple", "default:stone", "default:stone_with_coal",
|
"default:apple", "default:stone", "default:stone_with_coal",
|
||||||
|
@ -21,6 +21,7 @@ mobs:register_mob("dmobs:golem", {
|
|||||||
run_velocity = 2.5,
|
run_velocity = 2.5,
|
||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
|
{name = "default:stone", chance = 1, min = 1, max = 5},
|
||||||
{name = "dmobs:golemstone", chance = 30, min = 1, max = 1},
|
{name = "dmobs:golemstone", chance = 30, min = 1, max = 1},
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
|
@ -14,6 +14,9 @@ mobs:register_mob("dmobs:golem_friendly", {
|
|||||||
{"dmobs_golem.png"},
|
{"dmobs_golem.png"},
|
||||||
},
|
},
|
||||||
follow = "default:cobble",
|
follow = "default:cobble",
|
||||||
|
drops = {
|
||||||
|
{name = "default:cobble", chance = 1, min = 1, max = 3},
|
||||||
|
},
|
||||||
blood_texture = "default_stone.png",
|
blood_texture = "default_stone.png",
|
||||||
visual_size = {x=1, y=1},
|
visual_size = {x=1, y=1},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -26,6 +26,9 @@ mobs:register_mob("dmobs:hedgehog", {
|
|||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
view_range = 14,
|
view_range = 14,
|
||||||
follow = {"farming:bread"},
|
follow = {"farming:bread"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:grass_1", chance = 1, min = 1, max = 3},
|
||||||
|
},
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 5,
|
speed_normal = 5,
|
||||||
speed_run = 10,
|
speed_run = 10,
|
||||||
|
@ -16,6 +16,9 @@ mobs:register_mob("dmobs:owl", {
|
|||||||
walk_velocity = 0,
|
walk_velocity = 0,
|
||||||
run_velocity = 0,
|
run_velocity = 0,
|
||||||
jump = false,
|
jump = false,
|
||||||
|
drops = {
|
||||||
|
{name = "default:dry_grass_1", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 2,
|
lava_damage = 2,
|
||||||
fire_damage = 2,
|
fire_damage = 2,
|
||||||
|
@ -11,7 +11,7 @@ mobs:register_mob("dmobs:tortoise", {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "tortoise.b3d",
|
mesh = "tortoise.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"dmobs_tortoise.png"},
|
{"dmobs_tortoise.png"}
|
||||||
},
|
},
|
||||||
blood_texture = "mobs_blood.png",
|
blood_texture = "mobs_blood.png",
|
||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
@ -22,7 +22,8 @@ mobs:register_mob("dmobs:tortoise", {
|
|||||||
jump_height = 0.5,
|
jump_height = 0.5,
|
||||||
floats = true,
|
floats = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "default:stick", chance = 1, min = 1, max = 1},
|
{name = "default:stick", chance = 2, min = 0, max = 1},
|
||||||
|
{name = "farming:string", chance = 2, min = 0, max = 1},
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 2,
|
lava_damage = 2,
|
||||||
@ -39,10 +40,11 @@ mobs:register_mob("dmobs:tortoise", {
|
|||||||
walk_start = 23,
|
walk_start = 23,
|
||||||
walk_end = 43,
|
walk_end = 43,
|
||||||
stand_start = 1,
|
stand_start = 1,
|
||||||
stand_end = 20,
|
stand_end = 1,
|
||||||
|
stand1_start = 1,
|
||||||
|
stand1_end = 20,
|
||||||
run_start = 23,
|
run_start = 23,
|
||||||
run_end = 43,
|
run_end = 43
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
@ -51,8 +53,36 @@ mobs:register_mob("dmobs:tortoise", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
|
if self.state ~= "attack" then
|
||||||
|
|
||||||
|
self.state = "hide"
|
||||||
|
|
||||||
|
mobs:set_velocity(self, 0)
|
||||||
|
|
||||||
|
-- play inside shell animation
|
||||||
|
self.object:set_animation({x = 10, y = 10}, 6, 0)
|
||||||
|
|
||||||
|
minetest.after(5, function()
|
||||||
|
|
||||||
|
if self and self.object then
|
||||||
|
|
||||||
|
-- play coming out of shell animation
|
||||||
|
self.object:set_animation({x = 10, y = 20}, 6, 0)
|
||||||
|
|
||||||
|
self.state = "stand"
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 50, 80, false, nil)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
if self.state == "hide" then
|
||||||
|
mobs:set_velocity(self, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user