Commit cd201150 authored by tenplus1's avatar tenplus1
Browse files

add nether varients of dungeon master

parent 1c4ce9e4
local S = mobs.intllib local S = mobs.intllib
local master_types = {
{ nodes = {"nether:rack"},
skins = {"mobs_dungeon_master_nether.png"},
},
{ nodes = {"nether:rack_deep"},
skins = {"mobs_dungeon_master_netherdeep.png"},
}
}
-- Dungeon Master by PilzAdam -- Dungeon Master by PilzAdam
...@@ -59,13 +69,39 @@ mobs:register_mob("mobs_monster:dungeon_master", { ...@@ -59,13 +69,39 @@ mobs:register_mob("mobs_monster:dungeon_master", {
speed_normal = 15, speed_normal = 15,
speed_run = 15, speed_run = 15,
}, },
-- check surrounding nodes and spawn a specific monster
on_spawn = function(self)
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
for n = 1, #master_types do
tmp = master_types[n]
if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = tmp.skins
self.object:set_properties({textures = tmp.skins})
if tmp.drops then
self.drops = tmp.drops
end
return true
end
end
return true -- run only once, false/nil runs every activation
end
}) })
if not mobs.custom_spawn_monster then if not mobs.custom_spawn_monster then
mobs:spawn({ mobs:spawn({
name = "mobs_monster:dungeon_master", name = "mobs_monster:dungeon_master",
nodes = {"default:stone"}, nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
max_light = 5, max_light = 5,
chance = 9000, chance = 9000,
active_object_count = 1, active_object_count = 1,
......
...@@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob: ...@@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob:
-- --
-- (c) Sapier -- (c) Sapier
-- Contact sapier a t gmx net -- Contact sapier a t gmx net
Textures created by wwar (cc0)
mobs_dungeon_master_nether.png
mobs_dungeon_master_netherdeep.png
...@@ -12,6 +12,9 @@ mobs:register_mob("mobs_monster:mese_monster", { ...@@ -12,6 +12,9 @@ mobs:register_mob("mobs_monster:mese_monster", {
shoot_interval = 0.5, shoot_interval = 0.5,
arrow = "mobs_monster:mese_arrow", arrow = "mobs_monster:mese_arrow",
shoot_offset = 2, shoot_offset = 2,
--arrow_override = function(self)
-- self.velocity = 20
--end,
hp_min = 10, hp_min = 10,
hp_max = 25, hp_max = 25,
armor = 80, armor = 80,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment