2015-04-10 14:57:19 +02:00
|
|
|
-- Lava Slimes by TomasJLuis & TenPlus1
|
2015-04-10 14:03:57 +02:00
|
|
|
|
2015-04-06 17:06:05 +02:00
|
|
|
-- sounds
|
|
|
|
local lava_sounds = {
|
2015-04-10 11:11:29 +02:00
|
|
|
damage = "slimes_damage",
|
|
|
|
death = "slimes_death",
|
|
|
|
jump = "slimes_jump",
|
|
|
|
attack = "slimes_attack",
|
2015-04-06 17:06:05 +02:00
|
|
|
}
|
|
|
|
|
2015-04-10 11:11:29 +02:00
|
|
|
-- lava slime textures
|
|
|
|
local lava_textures = {"lava_slime_sides.png", "lava_slime_sides.png", "lava_slime_sides.png", "lava_slime_sides.png", "lava_slime_front.png", "lava_slime_sides.png"}
|
|
|
|
|
|
|
|
-- register small lava slime
|
|
|
|
mobs:register_mob("slimes:lavasmall", {
|
2015-04-06 17:06:05 +02:00
|
|
|
type = "monster",
|
2015-04-10 11:11:29 +02:00
|
|
|
hp_min = 1, hp_max = 2,
|
|
|
|
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
|
|
|
visual = "cube",
|
|
|
|
visual_size = {x = 0.5, y = 0.5},
|
|
|
|
textures = { lava_textures },
|
|
|
|
blood_texture = "lava_slime_blood.png",
|
|
|
|
makes_footstep_sound = false,
|
2015-04-06 17:06:05 +02:00
|
|
|
sounds = lava_sounds,
|
2015-04-10 11:11:29 +02:00
|
|
|
attack_type = "dogfight",
|
|
|
|
attacks_monsters = true,
|
|
|
|
damage = 1,
|
|
|
|
passive = false,
|
|
|
|
walk_velocity = 2,
|
|
|
|
run_velocity = 2,
|
|
|
|
walk_chance = 0,
|
|
|
|
jump_chance = 30,
|
|
|
|
jump_height = 6,
|
2015-04-10 14:03:57 +02:00
|
|
|
armor = 90,
|
2015-04-10 11:11:29 +02:00
|
|
|
view_range = 15,
|
2015-04-06 17:06:05 +02:00
|
|
|
drops = {
|
2015-04-10 11:11:29 +02:00
|
|
|
{name = "tnt:gunpowder", chance = 4, min = 1, max = 2},
|
|
|
|
},
|
|
|
|
drawtype = "front",
|
2015-04-06 17:06:05 +02:00
|
|
|
water_damage = 10,
|
|
|
|
lava_damage = 0,
|
|
|
|
light_damage = 0,
|
2015-04-10 11:11:29 +02:00
|
|
|
replace_rate = 20,
|
2015-04-25 10:02:39 +02:00
|
|
|
replace_what = {"air"},
|
2015-04-10 11:11:29 +02:00
|
|
|
footstep = "fire:basic_flame",
|
2015-04-06 17:06:05 +02:00
|
|
|
})
|
2015-04-10 14:03:57 +02:00
|
|
|
mobs:register_egg("slimes:lavasmall", "Small Lava Slime", "lava_slime_egg.png", 1)
|
2015-04-10 11:11:29 +02:00
|
|
|
|
|
|
|
-- register medium lava slime
|
|
|
|
mobs:register_mob("slimes:lavamedium", {
|
2015-04-06 17:06:05 +02:00
|
|
|
type = "monster",
|
2015-04-10 11:11:29 +02:00
|
|
|
hp_min = 3, hp_max = 4,
|
|
|
|
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
|
|
visual = "cube",
|
|
|
|
visual_size = {x = 1, y = 1},
|
|
|
|
textures = { lava_textures },
|
|
|
|
blood_texture = "lava_slime_blood.png",
|
|
|
|
makes_footstep_sound = false,
|
2015-04-06 17:06:05 +02:00
|
|
|
sounds = lava_sounds,
|
2015-04-10 11:11:29 +02:00
|
|
|
attack_type = "dogfight",
|
|
|
|
attacks_monsters = true,
|
|
|
|
damage = 2,
|
|
|
|
passive = false,
|
|
|
|
walk_velocity = 2,
|
|
|
|
run_velocity = 2,
|
|
|
|
walk_chance = 0,
|
|
|
|
jump_chance = 30,
|
|
|
|
jump_height = 6,
|
2015-04-10 14:03:57 +02:00
|
|
|
armor = 90,
|
2015-04-10 11:11:29 +02:00
|
|
|
view_range = 15,
|
|
|
|
on_die = function(self, pos)
|
|
|
|
local num = math.random(2, 4)
|
|
|
|
for i=1,num do
|
|
|
|
minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, "slimes:lavasmall")
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
drawtype = "front",
|
2015-04-06 17:06:05 +02:00
|
|
|
water_damage = 10,
|
|
|
|
lava_damage = 0,
|
|
|
|
light_damage = 0,
|
2015-04-10 11:11:29 +02:00
|
|
|
replace_rate = 20,
|
2015-04-25 10:02:39 +02:00
|
|
|
replace_what = {"air"},
|
2015-04-10 11:11:29 +02:00
|
|
|
footstep = "fire:basic_flame",
|
2015-04-06 17:06:05 +02:00
|
|
|
})
|
2015-04-10 14:03:57 +02:00
|
|
|
mobs:register_egg("slimes:lavamedium", "Medium Lava Slime", "lava_slime_egg.png", 1)
|
2015-04-10 11:11:29 +02:00
|
|
|
|
|
|
|
-- register big lava slime
|
|
|
|
mobs:register_mob("slimes:lavabig", {
|
2015-04-06 17:06:05 +02:00
|
|
|
type = "monster",
|
2015-04-10 11:11:29 +02:00
|
|
|
hp_min = 5, hp_max = 6,
|
|
|
|
collisionbox = {-1, -1, -1, 1, 1, 1},
|
|
|
|
visual = "cube",
|
|
|
|
visual_size = {x = 2, y = 2},
|
|
|
|
textures = { lava_textures },
|
|
|
|
blood_texture = "lava_slime_blood.png",
|
|
|
|
makes_footstep_sound = false,
|
2015-04-06 17:06:05 +02:00
|
|
|
sounds = lava_sounds,
|
2015-04-10 11:11:29 +02:00
|
|
|
attack_type = "dogfight",
|
|
|
|
attacks_monsters = true,
|
|
|
|
damage = 3,
|
|
|
|
passive = false,
|
|
|
|
walk_velocity = 2,
|
|
|
|
run_velocity = 2,
|
|
|
|
walk_chance = 0,
|
|
|
|
jump_chance = 30,
|
|
|
|
jump_height = 6,
|
2015-04-10 14:03:57 +02:00
|
|
|
armor = 90,
|
2015-04-10 11:11:29 +02:00
|
|
|
view_range = 15,
|
|
|
|
on_die = function(self, pos)
|
|
|
|
local num = math.random(1, 2)
|
|
|
|
for i=1,num do
|
|
|
|
minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, "slimes:lavamedium")
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
drawtype = "front",
|
2015-04-06 17:06:05 +02:00
|
|
|
water_damage = 10,
|
|
|
|
lava_damage = 0,
|
|
|
|
light_damage = 0,
|
2015-04-10 11:11:29 +02:00
|
|
|
replace_rate = 20,
|
|
|
|
replace_offset = -1,
|
2015-04-25 10:02:39 +02:00
|
|
|
replace_what = {"air"},
|
2015-04-10 11:11:29 +02:00
|
|
|
footstep = "fire:basic_flame",
|
2015-04-06 17:06:05 +02:00
|
|
|
})
|
2015-04-10 14:03:57 +02:00
|
|
|
mobs:register_egg("slimes:lavabig", "Big Lava Slime", "lava_slime_egg.png", 1)
|
2015-04-06 17:06:05 +02:00
|
|
|
|
2015-04-10 11:11:29 +02:00
|
|
|
--mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
|
2015-04-06 17:06:05 +02:00
|
|
|
|
2015-04-10 11:11:29 +02:00
|
|
|
mobs:spawn_specific("slimes:lavabig", {"default:lava_source"},{"default:lava_flowing"}, 4, 20, 30, 5000, 8, -32000, -64)
|
|
|
|
mobs:spawn_specific("slimes:lavamedium", {"default:lava_source"},{"default:lava_flowing"}, 4, 20, 30, 10000, 8, -32000, -64)
|
|
|
|
mobs:spawn_specific("slimes:lavasmall", {"default:lava_source"},{"default:lava_flowing"}, 4, 20, 30, 15000, 8, -32000, -64)
|