Add fun caves stones to stone spawning monsters.

This commit is contained in:
Duane 2016-07-05 09:56:37 -05:00
parent 14b38a868b
commit 8d70e7a7cb

View file

@ -42,10 +42,10 @@ fun_caves.surface_damage = function(self, cold_natured)
local minp = vector.subtract(pos, 1.5) local minp = vector.subtract(pos, 1.5)
local maxp = vector.add(pos, 1.5) local maxp = vector.add(pos, 1.5)
local counts = 0 local counts = 0
if self.lava_damage > 0 then if self.lava_damage > 1 then
counts = minetest.find_nodes_in_area(minp, maxp, {"group:surface_hot"}) counts = minetest.find_nodes_in_area(minp, maxp, {"group:surface_hot"})
if #counts > 0 then if #counts > 0 then
self.health = self.health - self.lava_damage self.health = self.health - math.floor(self.lava_damage / 2)
effect(pos, 5, "fire_basic_flame.png") effect(pos, 5, "fire_basic_flame.png")
end end
end end
@ -78,6 +78,9 @@ fun_caves.custom_ready = function(self, delay)
end end
local fun_caves_stones = {'fun_caves:stone_with_moss', 'fun_caves:stone_with_lichen', 'fun_caves:stone_with_algae'}
-- Try to standardize creature stats based on (log of) mass. -- Try to standardize creature stats based on (log of) mass.
local mob_stats = { local mob_stats = {
@ -497,7 +500,7 @@ if minetest.registered_entities["mobs_monster:spider"] then
minetest.registered_entities["fun_caves:spider"] = m minetest.registered_entities["fun_caves:spider"] = m
mobs.spawning_mobs["fun_caves:spider"] = true mobs.spawning_mobs["fun_caves:spider"] = true
mobs:register_spawn("fun_caves:spider", {"fun_caves:stone_with_moss", "fun_caves:stone_with_lichen", "fun_caves:stone_with_algae"}, 14, 0, 2000, 2, -51) mobs:register_spawn("fun_caves:spider", fun_caves_stones, 14, 0, 2000, 2, -51)
mobs:register_egg("fun_caves:spider", "Deep Spider", "mobs_cobweb.png", 1) mobs:register_egg("fun_caves:spider", "Deep Spider", "mobs_cobweb.png", 1)
@ -560,7 +563,7 @@ if minetest.registered_entities["mobs_monster:spider"] then
minetest.registered_entities["fun_caves:dangler"] = m minetest.registered_entities["fun_caves:dangler"] = m
mobs.spawning_mobs["fun_caves:dangler"] = true mobs.spawning_mobs["fun_caves:dangler"] = true
mobs:register_spawn("fun_caves:dangler", {"fun_caves:stone_with_moss", "fun_caves:stone_with_lichen", "fun_caves:stone_with_algae"}, 14, 0, 1000, 3, -51) mobs:register_spawn("fun_caves:dangler", fun_caves_stones, 14, 0, 1000, 3, -51)
mobs:register_egg("fun_caves:dangler", "Dangling Spider", "mobs_cobweb.png", 1) mobs:register_egg("fun_caves:dangler", "Dangling Spider", "mobs_cobweb.png", 1)
@ -636,6 +639,26 @@ end
if minetest.registered_entities["mobs_monster:stone_monster"] then if minetest.registered_entities["mobs_monster:stone_monster"] then
mobs:register_spawn("mobs_monster:stone_monster", {"fun_caves:pyramid_1"}, 20, 0, 300, 5, 31000) mobs:register_spawn("mobs_monster:stone_monster", {"fun_caves:pyramid_1"}, 20, 0, 300, 5, 31000)
local stones = table.copy(fun_caves_stones)
stones[#stones+1] = 'fun_caves:hot_cobble'
mobs:register_spawn("mobs_monster:stone_monster", stones, 7, 0, 7000, 1, 0)
end
if minetest.registered_entities["mobs_monster:dungeon_master"] then
mobs:register_spawn("mobs_monster:dungeon_master", {"fun_caves:pyramid_1"}, 20, 0, 3500, 5, 31000)
local stones = table.copy(fun_caves_stones)
stones[#stones+1] = 'fun_caves:hot_cobble'
mobs:register_spawn("mobs_monster:dungeon_master", stones, 7, 0, 7000, 1, -70)
end
if minetest.registered_entities["mobs_monster:oerkki"] then
mobs:register_spawn("mobs_monster:oerkki", fun_caves_stones, 7, 0, 7000, 1, -10)
end
if minetest.registered_entities["mobs_monster:mese_monster"] then
local stones = table.copy(fun_caves_stones)
stones[#stones+1] = 'fun_caves:hot_cobble'
mobs:register_spawn("mobs_monster:mese_monster", stones, 7, 0, 5000, 1, -20)
end end
-- Change the original, rather than making a copy. -- Change the original, rather than making a copy.
@ -644,6 +667,10 @@ if minetest.registered_entities["dmobs:elephant"] then
m.type = "monster" m.type = "monster"
end end
if minetest.registered_entities["mobs_bat:bat"] then
mobs:spawn_specific("mobs_bat:bat", {"air"}, fun_caves_stones, 0, 6, 30, 20000, 2, -31000, 11000)
end
if minetest.registered_entities["mobs_monster:dirt_monster"] then if minetest.registered_entities["mobs_monster:dirt_monster"] then
-- check this -- check this
mobs:register_spawn("mobs_monster:dirt_monster", {"default:dirt"}, 7, 0, 4000, 1, -50) mobs:register_spawn("mobs_monster:dirt_monster", {"default:dirt"}, 7, 0, 4000, 1, -50)
@ -651,11 +678,12 @@ if minetest.registered_entities["mobs_monster:dirt_monster"] then
end end
if minetest.registered_entities["mobs_slimes:green_big"] then if minetest.registered_entities["mobs_slimes:green_big"] then
mobs:spawn_specific("mobs_slimes:green_big", {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 1, -31000, 31000 local slime_surfaces = {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}
mobs:spawn_specific("mobs_slimes:green_big", slime_surfaces, {"air"}, -1, 20, 30, 30000, 1, -31000, 31000
) )
mobs:spawn_specific("mobs_slimes:green_medium", {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 2, -31000, 31000 mobs:spawn_specific("mobs_slimes:green_medium", slime_surfaces, {"air"}, -1, 20, 30, 30000, 2, -31000, 31000
) )
mobs:spawn_specific("mobs_slimes:green_small", {"fun_caves:stone_with_moss", "fun_caves:stone_with_algae", 'fun_caves:polluted_dirt'}, {"air"}, -1, 20, 30, 30000, 3, -31000, 31000 mobs:spawn_specific("mobs_slimes:green_small", slime_surfaces, {"air"}, -1, 20, 30, 30000, 3, -31000, 31000
) )
end end