forked from mtcontrib/mod-slimes
Update lavaslimes.lua
initial commit
This commit is contained in:
parent
4b329ffdc0
commit
80329e9c33
187
lavaslimes.lua
187
lavaslimes.lua
|
@ -1,90 +1,125 @@
|
||||||
-- sounds
|
-- sounds
|
||||||
local lava_sounds = {
|
local lava_sounds = {
|
||||||
damage = { file = "lava_slime_damage", gain = 0.25},
|
damage = "slimes_damage",
|
||||||
death = { file = "lava_slime_death", gain = 0.25},
|
death = "slimes_death",
|
||||||
jump = { file = "lava_slime_jump", gain = 0.25},
|
jump = "slimes_jump",
|
||||||
--land = { file = "default_cool_lava.3", gain = 5},
|
attack = "slimes_attack",
|
||||||
land = { file = "lava_slime_land", gain = 0.25},
|
|
||||||
attack = { file = "lava_slime_attack", gain = 0.25},
|
|
||||||
random = {}
|
|
||||||
}
|
}
|
||||||
-- textures : top, bottom, front, back, left, right
|
|
||||||
local lava_textures = {"lava_slime_top.png", "lava_slime_bottom.png", "lava_slime_front.png", "lava_slime_sides.png", "lava_slime_sides.png", "lava_slime_sides.png"}
|
|
||||||
|
|
||||||
slimes:register_slime ("slimes:lavabig", {
|
-- 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", {
|
||||||
type = "monster",
|
type = "monster",
|
||||||
class ="lava",
|
hp_min = 1, hp_max = 2,
|
||||||
name = "slimes:lavabig",
|
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
||||||
passive = false,
|
visual = "cube",
|
||||||
size = 2,
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
max_hp = 6,
|
textures = { lava_textures },
|
||||||
damage = 3,
|
blood_texture = "lava_slime_blood.png",
|
||||||
|
makes_footstep_sound = false,
|
||||||
sounds = lava_sounds,
|
sounds = lava_sounds,
|
||||||
textures = lava_textures,
|
attack_type = "dogfight",
|
||||||
blood = "lava_slime_blood.png",
|
attacks_monsters = true,
|
||||||
footprint = "fire:basic_flame",
|
|
||||||
gravity = 9.8,
|
|
||||||
drops = {
|
|
||||||
type = "entity",
|
|
||||||
name = "slimes:lavamedium",
|
|
||||||
chance = 0, min = 1, max = 2},
|
|
||||||
-- damage by
|
|
||||||
water_damage = 10,
|
|
||||||
lava_damage = 0,
|
|
||||||
light_damage = 0,
|
|
||||||
fall_damage = 0,
|
|
||||||
spawn = "default:lava_source"
|
|
||||||
})
|
|
||||||
slimes:register_slime ("slimes:lavamedium", {
|
|
||||||
type = "monster",
|
|
||||||
class ="lava",
|
|
||||||
name = "slimes:lavamedium",
|
|
||||||
passive = false,
|
|
||||||
size = 1,
|
|
||||||
max_hp = 4,
|
|
||||||
damage = 2,
|
|
||||||
sounds = lava_sounds,
|
|
||||||
textures = lava_textures,
|
|
||||||
blood = "lava_slime_blood.png",
|
|
||||||
footprint = "fire:basic_flame",
|
|
||||||
gravity = 9.8,
|
|
||||||
drops = {
|
|
||||||
type = "entity",
|
|
||||||
name = "slimes:lavasmall",
|
|
||||||
chance = 0, min = 1, max = 4},
|
|
||||||
-- damage by
|
|
||||||
water_damage = 10,
|
|
||||||
lava_damage = 0,
|
|
||||||
light_damage = 0,
|
|
||||||
fall_damage = 0,
|
|
||||||
spawn = "default:lava_source"
|
|
||||||
})
|
|
||||||
slimes:register_slime ("slimes:lavasmall", {
|
|
||||||
type = "monster",
|
|
||||||
class ="lava",
|
|
||||||
name = "slimes:lavasmall",
|
|
||||||
passive = false,
|
|
||||||
size = 0.5,
|
|
||||||
max_hp = 2,
|
|
||||||
damage = 1,
|
damage = 1,
|
||||||
sounds = lava_sounds,
|
passive = false,
|
||||||
textures = lava_textures,
|
walk_velocity = 2,
|
||||||
blood = "lava_slime_blood.png",
|
run_velocity = 2,
|
||||||
footprint = "fire:basic_flame",
|
walk_chance = 0,
|
||||||
gravity = 9.8,
|
jump_chance = 30,
|
||||||
|
jump_height = 6,
|
||||||
|
armor = 100,
|
||||||
|
view_range = 15,
|
||||||
drops = {
|
drops = {
|
||||||
type = "item",
|
{name = "tnt:gunpowder", chance = 4, min = 1, max = 2},
|
||||||
name = "tnt:gunpowder",
|
},
|
||||||
chance = 4, min = 1, max = 2},
|
drawtype = "front",
|
||||||
-- damage by
|
|
||||||
water_damage = 10,
|
water_damage = 10,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
fall_damage = 0,
|
replace_rate = 20,
|
||||||
spawn = "default:lava_source"
|
footstep = "fire:basic_flame",
|
||||||
})
|
})
|
||||||
|
mobs:register_egg("slimes:lavasmall", "Small Lava Slime", "lava_slime_front.png", 0)
|
||||||
|
|
||||||
slimes:register_spawn("slimes:lavabig", {"default:lava_source"},{"default:lava_source","default:lava_flowing"}, 20, 4, 5000, 8, -64)
|
-- register medium lava slime
|
||||||
slimes:register_spawn("slimes:lavamedium", {"default:lava_source"},{"default:lava_source","default:lava_flowing"}, 20, 4, 10000, 8, -64)
|
mobs:register_mob("slimes:lavamedium", {
|
||||||
slimes:register_spawn("slimes:lavasmall", {"default:lava_source"},{"default:lava_source","default:lava_flowing"}, 20, 4, 15000, 8, -64)
|
type = "monster",
|
||||||
|
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,
|
||||||
|
sounds = lava_sounds,
|
||||||
|
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,
|
||||||
|
armor = 100,
|
||||||
|
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",
|
||||||
|
water_damage = 10,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
replace_rate = 20,
|
||||||
|
footstep = "fire:basic_flame",
|
||||||
|
})
|
||||||
|
mobs:register_egg("slimes:lavamedium", "Medium Lava Slime", "lava_slime_front.png", 0)
|
||||||
|
|
||||||
|
-- register big lava slime
|
||||||
|
mobs:register_mob("slimes:lavabig", {
|
||||||
|
type = "monster",
|
||||||
|
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,
|
||||||
|
sounds = lava_sounds,
|
||||||
|
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,
|
||||||
|
armor = 100,
|
||||||
|
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",
|
||||||
|
water_damage = 10,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
replace_rate = 20,
|
||||||
|
replace_offset = -1,
|
||||||
|
footstep = "fire:basic_flame",
|
||||||
|
})
|
||||||
|
mobs:register_egg("slimes:lavabig", "Big Lava Slime", "lava_slime_front.png", 0)
|
||||||
|
|
||||||
|
--mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user