forked from mtcontrib/mobs_monster
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f39fc78e4a
|
@ -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
|
||||
|
||||
|
@ -62,13 +72,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", "default:sandstone", "nether:netherrack"},
|
||||
nodes = {"default:stone", "nether:rack", "nether:rack_deep", "hell:hellrack"},
|
||||
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