slime babies attack player
This commit is contained in:
parent
387767d68e
commit
78a8ed59b5
@ -38,10 +38,10 @@ mobs:register_mob("mobs_slimes:greensmall", {
|
||||
damage = 1, reach = 2,
|
||||
passive = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
run_velocity = 1,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
jump_height = 3,
|
||||
armor = 100,
|
||||
view_range = 15,
|
||||
drops = {
|
||||
@ -69,8 +69,8 @@ mobs:register_mob("mobs_slimes:greenmedium", {
|
||||
attack_animals = true,
|
||||
damage = 2, reach = 2,
|
||||
passive = false,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
@ -86,11 +86,18 @@ mobs:register_mob("mobs_slimes:greenmedium", {
|
||||
|
||||
for i = 1, num do
|
||||
|
||||
minetest.add_entity({
|
||||
local obj = minetest.add_entity({
|
||||
x = pos.x + math.random(-2, 2),
|
||||
y = pos.y + 1,
|
||||
z = pos.z + (math.random(-2, 2))
|
||||
}, "mobs_slimes:greensmall")
|
||||
|
||||
local ent = obj and obj:get_luaentity()
|
||||
|
||||
if ent then
|
||||
ent.state = "attack"
|
||||
ent.attack = self.attack
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
@ -110,13 +117,13 @@ mobs:register_mob("mobs_slimes:greenbig", {
|
||||
sounds = green_sounds,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
damage = 4, reach = 2,
|
||||
damage = 4, reach = 3,
|
||||
passive = false,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
jump_height = 8,
|
||||
armor = 100,
|
||||
view_range = 15,
|
||||
water_damage = 0,
|
||||
@ -129,11 +136,18 @@ mobs:register_mob("mobs_slimes:greenbig", {
|
||||
|
||||
for i = 1, num do
|
||||
|
||||
minetest.add_entity({
|
||||
local obj = minetest.add_entity({
|
||||
x = pos.x + math.random(-2, 2),
|
||||
y = pos.y + 1,
|
||||
z = pos.z + (math.random(-2, 2))
|
||||
}, "mobs_slimes:greenmedium")
|
||||
|
||||
local ent = obj and obj:get_luaentity()
|
||||
|
||||
if ent then
|
||||
ent.state = "attack"
|
||||
ent.attack = self.attack
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -50,10 +50,10 @@ mobs:register_mob("mobs_slimes:lavasmall", {
|
||||
damage = 1, reach = 2,
|
||||
passive = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
run_velocity = 1,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
jump_height = 3,
|
||||
armor = 90,
|
||||
view_range = 15,
|
||||
drops = {
|
||||
@ -61,6 +61,7 @@ mobs:register_mob("mobs_slimes:lavasmall", {
|
||||
},
|
||||
water_damage = 10,
|
||||
lava_damage = 0,
|
||||
fire_damage = 0,
|
||||
light_damage = 0,
|
||||
replace_rate = 20,
|
||||
replace_what = {"air"},
|
||||
@ -86,8 +87,8 @@ mobs:register_mob("mobs_slimes:lavamedium", {
|
||||
attack_animals = true,
|
||||
damage = 2, reach = 2,
|
||||
passive = false,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
@ -95,6 +96,7 @@ mobs:register_mob("mobs_slimes:lavamedium", {
|
||||
view_range = 15,
|
||||
water_damage = 10,
|
||||
lava_damage = 0,
|
||||
fire_damage = 0,
|
||||
light_damage = 0,
|
||||
replace_rate = 20,
|
||||
replace_what = {"air"},
|
||||
@ -108,11 +110,18 @@ mobs:register_mob("mobs_slimes:lavamedium", {
|
||||
|
||||
for i = 1, num do
|
||||
|
||||
minetest.add_entity({
|
||||
local obj = minetest.add_entity({
|
||||
x = pos.x + math.random(-2, 2),
|
||||
y = pos.y + 1,
|
||||
z = pos.z + (math.random(-2, 2))
|
||||
}, "mobs_slimes:lavasmall")
|
||||
|
||||
local ent = obj and obj:get_luaentity()
|
||||
|
||||
if ent then
|
||||
ent.state = "attack"
|
||||
ent.attack = self.attack
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
@ -134,15 +143,16 @@ mobs:register_mob("mobs_slimes:lavabig", {
|
||||
attack_animals = true,
|
||||
damage = 4, reach = 2,
|
||||
passive = false,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
walk_chance = 0,
|
||||
jump_chance = 30,
|
||||
jump_height = 5,
|
||||
jump_height = 8,
|
||||
armor = 90,
|
||||
view_range = 15,
|
||||
water_damage = 10,
|
||||
lava_damage = 0,
|
||||
fire_damage = 0,
|
||||
light_damage = 0,
|
||||
replace_rate = 20,
|
||||
replace_what = {"air"},
|
||||
@ -153,17 +163,24 @@ mobs:register_mob("mobs_slimes:lavabig", {
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
local num = math.random(1, 2)
|
||||
local num = math.random(2, 4)
|
||||
|
||||
for i = 1, num do
|
||||
|
||||
minetest.add_entity({
|
||||
local obj = minetest.add_entity({
|
||||
x = pos.x + math.random(-2, 2),
|
||||
y = pos.y + 1,
|
||||
z = pos.z + (math.random(-2, 2))
|
||||
}, "slimes:lavamedium")
|
||||
}, "mobs_slimes:lavamedium")
|
||||
|
||||
local ent = obj and obj:get_luaentity()
|
||||
|
||||
if ent then
|
||||
ent.state = "attack"
|
||||
ent.attack = self.attack ; print("--set")
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- spawn eggs
|
||||
|
Loading…
x
Reference in New Issue
Block a user