mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-12-22 08:50:27 +01:00
add nether varients of dungeon master
This commit is contained in:
parent
1c4ce9e402
commit
cd201150b6
@ -1,6 +1,16 @@
|
||||
|
||||
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
|
||||
|
||||
@ -59,13 +69,39 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
||||
speed_normal = 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
|
||||
mobs:spawn({
|
||||
name = "mobs_monster:dungeon_master",
|
||||
nodes = {"default:stone"},
|
||||
nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
|
||||
max_light = 5,
|
||||
chance = 9000,
|
||||
active_object_count = 1,
|
||||
|
@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob:
|
||||
--
|
||||
-- (c) Sapier
|
||||
-- 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", {
|
||||
shoot_interval = 0.5,
|
||||
arrow = "mobs_monster:mese_arrow",
|
||||
shoot_offset = 2,
|
||||
--arrow_override = function(self)
|
||||
-- self.velocity = 20
|
||||
--end,
|
||||
hp_min = 10,
|
||||
hp_max = 25,
|
||||
armor = 80,
|
||||
|
BIN
textures/mobs_dungeon_master_nether.png
Normal file
BIN
textures/mobs_dungeon_master_nether.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_dungeon_master_netherdeep.png
Normal file
BIN
textures/mobs_dungeon_master_netherdeep.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue
Block a user