1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-29 16:00:33 +02:00

Update greenslimes.lua

This commit is contained in:
Ombridride 2015-04-12 19:18:06 +02:00
parent 4cbce2b611
commit 718a3747cc

View File

@ -14,103 +14,153 @@ local green_textures = {"mobs_green_slime_sides.png", "mobs_green_slime_sides.pn
-- register small green slime -- register small green slime
mobs:register_mob("mobs:greensmall", { mobs:register_mob("mobs:greensmall", {
-- animal, monster, npc, barbarian
type = "monster", type = "monster",
hp_min = 1, hp_max = 2, -- aggressive, deals 2 damage to player when hit
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25}, passive = false,
visual = "cube", damage = 2,
visual_size = {x = 0.5, y = 0.5},
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
makes_footstep_sound = false,
sounds = green_sounds,
attack_type = "dogfight", attack_type = "dogfight",
attacks_monsters = true, attacks_monsters = true,
damage = 1, -- health and armor
passive = false, hp_min = 2, hp_max = 4,
armor = 100,
-- textures and model
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
visual = "cube",
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
visual_size = {x = 0.5, y = 0.5},
-- sounds a bit here, but mainly define in the beginning
makes_footstep_sound = false,
sounds = green_sounds,
-- speed and jump, sinks in water
walk_velocity = 2, walk_velocity = 2,
run_velocity = 2, run_velocity = 2,
walk_chance = 0, walk_chance = 0,
jump = true,
jump_chance = 30, jump_chance = 30,
jump_height = 6, jump_height = 6,
armor = 100, view_range = 16,
view_range = 15, floats = 1,
-- chance of dropping glue and coins
drops = { drops = {
{name = "mesecons_materials:glue", chance = 4, min = 1, max = 2}, {name = "mesecons_materials:glue",
chance = 4, min = 1, max = 2},
{name = "maptools:copper_coin",
chance = 2, min = 1, max = 1},
}, },
drawtype = "front", -- damaged by
water_damage = 0, water_damage = 0,
lava_damage = 10, lava_damage = 10,
light_damage = 0, light_damage = 0,
-- model animation
-- no model animation
}) })
mobs:register_egg("mobs:greensmall", "Small Green Slime", "mobs_green_slime_egg.png", 1) mobs:register_egg("mobs:greensmall", "Small Green Slime", "mobs_green_slime_egg.png", 1)
-- register medium green slime -- register medium green slime
mobs:register_mob("mobs:greenmedium", { mobs:register_mob("mobs:greenmedium", {
-- animal, monster, npc, barbarian
type = "monster", type = "monster",
hp_min = 3, hp_max = 4, -- aggressive, deals 4 damage to player when hit
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, passive = false,
visual = "cube", damage = 4,
visual_size = {x = 1, y = 1},
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
makes_footstep_sound = false,
sounds = green_sounds,
attack_type = "dogfight", attack_type = "dogfight",
attacks_monsters = true, attacks_monsters = true,
damage = 1, -- health and armor
passive = false, hp_min = 4, hp_max = 8,
armor = 90,
-- textures and model
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
visual = "cube",
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
visual_size = {x = 1, y = 1},
-- sounds a bit here, but mainly define in the beginning
makes_footstep_sound = false,
sounds = green_sounds,
-- speed and jump, sinks in water
walk_velocity = 2, walk_velocity = 2,
run_velocity = 2, run_velocity = 2,
walk_chance = 0, walk_chance = 0,
jump = true,
jump_chance = 30, jump_chance = 30,
jump_height = 6, jump_height = 6,
armor = 100, view_range = 16,
view_range = 15, floats = 1,
-- chance of dropping glue and coins
drops = {
{name = "mesecons_materials:glue",
chance = 4, min = 1, max = 2},
{name = "maptools:copper_coin",
chance = 2, min = 1, max = 1},
},
-- damaged by
water_damage = 0,
lava_damage = 10,
light_damage = 0,
-- model animation
-- no model animation
-- do things when die
on_die = function(self, pos) on_die = function(self, pos)
local num = math.random(2, 4) local num = math.random(2, 4)
for i=1,num do 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))}, "mobs:greensmall") minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, "mobs:greensmall")
end end
end, end,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
}) })
mobs:register_egg("mobs:greenmedium", "Medium Green Slime", "mobs_green_slime_egg.png", 1) mobs:register_egg("mobs:greenmedium", "Medium Green Slime", "mobs_green_slime_egg.png", 1)
-- register big green slime -- register big green slime
mobs:register_mob("mobs:greenbig", { mobs:register_mob("mobs:greenbig", {
-- animal, monster, npc, barbarian
type = "monster", type = "monster",
hp_min = 5, hp_max = 6, -- aggressive, deals 6 damage to player when hit
collisionbox = {-1, -1, -1, 1, 1, 1}, passive = false,
visual = "cube", damage = 6,
visual_size = {x = 2, y = 2},
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
makes_footstep_sound = false,
sounds = green_sounds,
attack_type = "dogfight", attack_type = "dogfight",
attacks_monsters = true, attacks_monsters = true,
damage = 2, -- health and armor
passive = false, hp_min = 16, hp_max = 32,
armor = 90,
-- textures and model
collisionbox = {-1, -1, -1, 1, 1, 1},
visual = "cube",
textures = { green_textures },
blood_texture = "mobs_green_slime_blood.png",
visual_size = {x = 2, y = 2},
-- sounds a bit here, but mainly define in the beginning
makes_footstep_sound = false,
sounds = green_sounds,
-- speed and jump, sinks in water
walk_velocity = 2, walk_velocity = 2,
run_velocity = 2, run_velocity = 2,
walk_chance = 0, walk_chance = 0,
jump = true,
jump_chance = 30, jump_chance = 30,
jump_height = 6, jump_height = 6,
armor = 100, view_range = 16,
view_range = 15, floats = 1,
-- chance of dropping glue and coins
drops = {
{name = "mesecons_materials:glue",
chance = 4, min = 1, max = 2},
{name = "maptools:copper_coin",
chance = 2, min = 1, max = 1},
},
-- damaged by
water_damage = 0,
lava_damage = 10,
light_damage = 0,
-- model animation
-- no model animation
-- do things when die
on_die = function(self, pos) on_die = function(self, pos)
local num = math.random(1, 2) local num = math.random(1, 2)
for i=1,num do 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))}, "mobs:greenmedium") minetest.add_entity({x=pos.x + math.random(-2, 2), y=pos.y + 1, z=pos.z + (math.random(-2, 2))}, "mobs:greenmedium")
end end
end, end,
drawtype = "front",
water_damage = 0,
lava_damage = 10,
light_damage = 0,
}) })
mobs:register_egg("mobs:greenbig", "Big Green Slime", "mobs_green_slime_egg.png", 1) mobs:register_egg("mobs:greenbig", "Big Green Slime", "mobs_green_slime_egg.png", 1)