monsters spawn in different areas if ethereal detected

This commit is contained in:
TenPlus1 2017-02-21 15:32:50 +00:00
parent 8edcad5201
commit 386c2cb77a
9 changed files with 66 additions and 31 deletions

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Dirt Monster by PilzAdam -- Dirt Monster by PilzAdam
mobs:register_mob("mobs_monster:dirt_monster", { mobs:register_mob("mobs_monster:dirt_monster", {
@ -49,9 +50,16 @@ mobs:register_mob("mobs_monster:dirt_monster", {
}, },
}) })
local spawn_on = "default:dirt_with_grass"
if minetest.get_modpath("ethereal") then
spawn_on = "ethereal:gray_dirt"
end
mobs:spawn({ mobs:spawn({
name = "mobs_monster:dirt_monster", name = "mobs_monster:dirt_monster",
nodes = {"default:dirt_with_grass", "ethereal:gray_dirt"}, nodes = {spawn_on},
min_light = 0, min_light = 0,
max_light = 7, max_light = 7,
chance = 7000, chance = 7000,
@ -60,7 +68,8 @@ mobs:spawn({
day_toggle = false, day_toggle = false,
}) })
mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1) mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
-- compatibility
mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Dungeon Master by PilzAdam -- Dungeon Master by PilzAdam
mobs:register_mob("mobs_monster:dungeon_master", { mobs:register_mob("mobs_monster:dungeon_master", {
@ -58,6 +59,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
}, },
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:dungeon_master", name = "mobs_monster:dungeon_master",
nodes = {"default:stone"}, nodes = {"default:stone"},
@ -67,10 +69,12 @@ mobs:spawn({
max_height = -70, max_height = -70,
}) })
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true) mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
-- compatibility
mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- compatibility
-- fireball (weapon) -- fireball (weapon)
mobs:register_arrow("mobs_monster:fireball", { mobs:register_arrow("mobs_monster:fireball", {

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Lava Flan by Zeg9 (additional textures by JurajVajda) -- Lava Flan by Zeg9 (additional textures by JurajVajda)
mobs:register_mob("mobs_monster:lava_flan", { mobs:register_mob("mobs_monster:lava_flan", {
@ -56,6 +57,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
end, end,
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:lava_flan", name = "mobs_monster:lava_flan",
nodes = {"default:lava_source"}, nodes = {"default:lava_source"},
@ -64,10 +66,12 @@ mobs:spawn({
max_height = 0, max_height = 0,
}) })
mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1) mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1)
-- compatibility
mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") -- compatibility
-- lava orb -- lava orb
minetest.register_craftitem(":mobs:lava_orb", { minetest.register_craftitem(":mobs:lava_orb", {
@ -83,6 +87,7 @@ minetest.register_craft({
burntime = 80, burntime = 80,
}) })
-- Lava Pick (digs and smelts at same time) -- Lava Pick (digs and smelts at same time)
local old_handle_node_drops = minetest.handle_node_drops local old_handle_node_drops = minetest.handle_node_drops

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Mese Monster by Zeg9 -- Mese Monster by Zeg9
mobs:register_mob("mobs_monster:mese_monster", { mobs:register_mob("mobs_monster:mese_monster", {
@ -54,6 +55,7 @@ mobs:register_mob("mobs_monster:mese_monster", {
}, },
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:mese_monster", name = "mobs_monster:mese_monster",
nodes = {"default:stone"}, nodes = {"default:stone"},
@ -63,10 +65,12 @@ mobs:spawn({
max_height = -20, max_height = -20,
}) })
mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1) mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1)
-- compatibility
mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") -- compatiblity
-- mese arrow (weapon) -- mese arrow (weapon)
mobs:register_arrow("mobs_monster:mese_arrow", { mobs:register_arrow("mobs_monster:mese_arrow", {

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Oerkki by PilzAdam -- Oerkki by PilzAdam
mobs:register_mob("mobs_monster:oerkki", { mobs:register_mob("mobs_monster:oerkki", {
@ -57,6 +58,7 @@ mobs:register_mob("mobs_monster:oerkki", {
}, },
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:oerkki", name = "mobs_monster:oerkki",
nodes = {"default:stone"}, nodes = {"default:stone"},
@ -65,7 +67,8 @@ mobs:spawn({
max_height = -10, max_height = -10,
}) })
mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1) mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1)
-- compatibility
mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") -- compatiblity

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Sand Monster by PilzAdam -- Sand Monster by PilzAdam
mobs:register_mob("mobs_monster:sand_monster", { mobs:register_mob("mobs_monster:sand_monster", {
@ -56,6 +57,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
]] ]]
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:sand_monster", name = "mobs_monster:sand_monster",
nodes = {"default:desert_sand"}, nodes = {"default:desert_sand"},
@ -64,7 +66,8 @@ mobs:spawn({
min_height = 0, min_height = 0,
}) })
mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1) mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1)
-- compatibility
mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
mobs:register_mob("mobs_monster:spider", { mobs:register_mob("mobs_monster:spider", {
@ -52,9 +53,18 @@ mobs:register_mob("mobs_monster:spider", {
}, },
}) })
local spawn_on = "default:desert_stone"
if minetest.get_modpath("ethereal") then
spawn_on = "ethereal:crystal_dirt"
else
minetest.register_alias("ethereal:crystal_spike", "default:sandstone")
end
mobs:spawn({ mobs:spawn({
name = "mobs_monster:spider", name = "mobs_monster:spider",
nodes = {"default:desert_stone", "ethereal:crystal_dirt"}, nodes = {spawn_on},
min_light = 0, min_light = 0,
max_light = 12, max_light = 12,
chance = 7000, chance = 7000,
@ -63,15 +73,12 @@ mobs:spawn({
max_height = 31000, max_height = 31000,
}) })
mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1) mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1)
-- compatibility
mobs:alias_mob("mobs:spider", "mobs_monster:spider")
-- ethereal crystal spike compatibility mobs:alias_mob("mobs:spider", "mobs_monster:spider") -- compatibility
if not minetest.get_modpath("ethereal") then
minetest.register_alias("ethereal:crystal_spike", "default:sandstone")
end
-- cobweb -- cobweb
minetest.register_node(":mobs:cobweb", { minetest.register_node(":mobs:cobweb", {

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Stone Monster by PilzAdam -- Stone Monster by PilzAdam
mobs:register_mob("mobs_monster:stone_monster", { mobs:register_mob("mobs_monster:stone_monster", {
@ -51,6 +52,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
}, },
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:stone_monster", name = "mobs_monster:stone_monster",
nodes = {"default:stone", "default:desert_stone"}, nodes = {"default:stone", "default:desert_stone"},
@ -59,7 +61,8 @@ mobs:spawn({
max_height = 0, max_height = 0,
}) })
mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1) mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1)
-- compatibility
mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") -- compatibility

View File

@ -1,6 +1,7 @@
local S = mobs.intllib local S = mobs.intllib
-- Tree Monster (or Tree Gollum) by PilzAdam -- Tree Monster (or Tree Gollum) by PilzAdam
mobs:register_mob("mobs_monster:tree_monster", { mobs:register_mob("mobs_monster:tree_monster", {
@ -31,8 +32,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
jump = true, jump = true,
view_range = 15, view_range = 15,
drops = { drops = {
{name = "ethereal:tree_sapling", chance = 3, min = 1, max = 2}, {name = "default:sapling", chance = 3, min = 1, max = 2},
{name = "ethereal:jungle_tree_sapling", chance = 3, min = 1, max = 2}, {name = "default:junglesapling", chance = 3, min = 1, max = 2},
{name = "default:apple", chance = 2, min = 1, max=3}, {name = "default:apple", chance = 2, min = 1, max=3},
}, },
water_damage = 0, water_damage = 0,
@ -53,6 +54,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
}, },
}) })
mobs:spawn({ mobs:spawn({
name = "mobs_monster:tree_monster", name = "mobs_monster:tree_monster",
nodes = {"default:leaves", "default:jungleleaves"}, nodes = {"default:leaves", "default:jungleleaves"},
@ -62,13 +64,8 @@ mobs:spawn({
day_toggle = false, day_toggle = false,
}) })
mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1) mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1)
-- compatibility
mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster")
-- ethereal sapling compatibility mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- compatibility
if not minetest.get_modpath("ethereal") then
minetest.register_alias("ethereal:tree_sapling", "default:sapling")
minetest.register_alias("ethereal:jungle_tree_sapling", "default:junglesapling")
end