diff --git a/deco_caves.lua b/deco_caves.lua index be8c57c..ff18011 100644 --- a/deco_caves.lua +++ b/deco_caves.lua @@ -14,9 +14,9 @@ function fun_caves.decorate_cave(data, area, minp, y, ivm, biome_val_in) local stone_type = node("default:stone") local stone_depth = 1 - if y > -500 then - biome_val = biome_val / math.max(1, math.log(500 + y)) - end + --if y > -500 then + -- biome_val = biome_val / math.max(1, math.log(500 + y)) + --end ------------------- --biome_val = 0.7 ------------------- @@ -62,7 +62,7 @@ function fun_caves.decorate_cave(data, area, minp, y, ivm, biome_val_in) end end - if node_above == node("air") and (stone_type == node("fun_caves:stone_with_algae") or stone_type == node("fun_caves:stone_with_lichen")) and math.random(4) == 1 then + if node_above == node("air") and (stone_type == node("fun_caves:stone_with_algae") or stone_type == node("fun_caves:stone_with_lichen")) and math.random(10) == 1 then return node("dirt") end diff --git a/goblin_coal.lua b/goblin_coal.lua index 84a04d9..8f56613 100644 --- a/goblin_coal.lua +++ b/goblin_coal.lua @@ -2,7 +2,7 @@ mobs:register_mob("fun_caves:goblin_coal", { description = "Coal Goblin", - type = "animal", + type = "monster", passive = false, damage = 1, attack_type = "dogfight", @@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_coal", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, {"group:stone"}, "fun_caves:stone_with_coal_trap") + fun_caves.search_replace(self.object:getpos(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap") fun_caves.surface_damage(self) end, @@ -124,7 +124,7 @@ minetest.register_node("fun_caves:stone_with_coal_trap", { description = "Coal Trap", tiles = {"default_cobble.png^default_mineral_coal.png"}, groups = {cracky = 3}, - drop = 'default:coal_lump', + --drop = 'default:coal_lump', is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/goblin_cobbler.lua b/goblin_cobbler.lua index 7f80c2c..bc78f4e 100644 --- a/goblin_cobbler.lua +++ b/goblin_cobbler.lua @@ -2,8 +2,8 @@ mobs:register_mob("fun_caves:goblin_cobble", { description = "Cobble Goblin", - type = "animal", - passive = true, + type = "monster", + passive = false, damage = 1, attack_type = "dogfight", attacks_monsters = true, diff --git a/goblin_copper.lua b/goblin_copper.lua index b705394..68d624c 100644 --- a/goblin_copper.lua +++ b/goblin_copper.lua @@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_copper", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap") fun_caves.surface_damage(self) end, @@ -123,7 +123,7 @@ minetest.register_node("fun_caves:stone_with_copper_trap", { description = "Copper Trap", tiles = {"default_cobble.png^default_mineral_copper.png"}, groups = {cracky = 3}, - drop = 'default:copper_lump', + --drop = 'default:copper_lump', is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/goblin_diamond.lua b/goblin_diamond.lua index b39fb93..e57b3f3 100644 --- a/goblin_diamond.lua +++ b/goblin_diamond.lua @@ -112,7 +112,7 @@ mobs:register_mob("fun_caves:goblin_diamond", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_diamond_trap") fun_caves.surface_damage(self) end, @@ -126,7 +126,7 @@ minetest.register_node("fun_caves:stone_with_diamond_trap", { description = "Diamond Trap", tiles = {"default_cobble.png^default_mineral_diamond.png"}, groups = {cracky = 3}, - drop = 'default:diamond', + --drop = 'default:diamond', is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/goblin_digger.lua b/goblin_digger.lua index f8543b9..a86c69a 100644 --- a/goblin_digger.lua +++ b/goblin_digger.lua @@ -97,8 +97,8 @@ end mobs:register_mob("fun_caves:goblin_digger", { description = "Digger Goblin", - type = "animal", - passive = true, + type = "monster", + passive = false, damage = 1, attack_type = "dogfight", attacks_monsters = true, diff --git a/goblin_gold.lua b/goblin_gold.lua index 5928ff3..10907a6 100644 --- a/goblin_gold.lua +++ b/goblin_gold.lua @@ -110,7 +110,7 @@ mobs:register_mob("fun_caves:goblin_gold", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap") fun_caves.surface_damage(self) end, @@ -219,7 +219,7 @@ minetest.register_node("fun_caves:stone_with_gold_trap", { description = "Gold Trap", tiles = {"default_cobble.png^default_mineral_gold.png"}, groups = {cracky = 3}, - drop = 'default:gold_lump', + --drop = 'default:gold_lump', is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/goblin_ice.lua b/goblin_ice.lua index f36d343..6a623de 100644 --- a/goblin_ice.lua +++ b/goblin_ice.lua @@ -109,7 +109,7 @@ mobs:register_mob("fun_caves:goblin_ice", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, {"default:torch"}, "air") --fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, {"default:ice"}, "fun_caves:ice_trap") + fun_caves.search_replace(self.object:getpos(), 500, {"default:ice"}, "fun_caves:ice_trap") fun_caves.surface_damage(self, true) end, diff --git a/goblin_iron.lua b/goblin_iron.lua index 4b1b572..f46d0bd 100644 --- a/goblin_iron.lua +++ b/goblin_iron.lua @@ -112,7 +112,7 @@ mobs:register_mob("fun_caves:goblin_iron", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 5, 1, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, 1, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap") fun_caves.surface_damage(self) end, @@ -125,7 +125,7 @@ minetest.register_node("fun_caves:stone_with_iron_trap", { description = "Iron Trap", tiles = {"default_cobble.png^default_mineral_iron.png"}, groups = {cracky = 3}, - drop = 'default:iron_lump', + --drop = 'default:iron_lump', is_ground_content = false, sounds = default.node_sound_stone_defaults(), }) diff --git a/goblin_king.lua b/goblin_king.lua index 0afd1e0..56bd305 100644 --- a/goblin_king.lua +++ b/goblin_king.lua @@ -111,11 +111,11 @@ mobs:register_mob("fun_caves:goblin_king", { do_custom = function(self) fun_caves.search_replace(self.object:getpos(), 2, {"default:torch"}, "air") fun_caves.search_replace(self.object:getpos(), 20, {"default:stone"}, "default:mossycobble") - fun_caves.search_replace(self.object:getpos(), 50, {"default:mossycobble"}, "fun_caves:mossycobble_trap") - fun_caves.search_replace(self.object:getpos(), 50, {"group:stone"}, "fun_caves:stone_with_coal_trap") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap") - fun_caves.search_replace(self.object:getpos(), 50, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap") + fun_caves.search_replace(self.object:getpos(), 500, {"default:mossycobble"}, "fun_caves:mossycobble_trap") + fun_caves.search_replace(self.object:getpos(), 500, {"group:stone"}, "fun_caves:stone_with_coal_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_copper_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_gold_trap") + fun_caves.search_replace(self.object:getpos(), 500, 5, {"group:stone"}, "fun_caves:stone_with_iron_trap") fun_caves.surface_damage(self) end, diff --git a/mapgen.lua b/mapgen.lua index 06780c2..32c29f1 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -208,7 +208,8 @@ function fun_caves.generate(p_minp, p_maxp, seed) if bullshit_heightmap or y <= heightmap[index] - 20 then data[ivm] = fun_caves.decorate_cave(data, area, minp, y, ivm, biome_n[index3d]) or data[ivm] elseif y < heightmap[index] and not bullshit_heightmap then - if data[ivm] == node("air") and data[ivm - area.ystride] ~= node('air') then + --if data[ivm] == node("air") and data[ivm - area.ystride] ~= node('air') then + if data[ivm] == node("air") and (data[ivm - area.ystride] == node('default:stone') or data[ivm - area.ystride] == node('default:sandstone')) then data[ivm - area.ystride] = node("dirt") end else diff --git a/nodes.lua b/nodes.lua index 121aa6b..66ea4c2 100644 --- a/nodes.lua +++ b/nodes.lua @@ -423,8 +423,8 @@ end) -- mushroom growth minetest.register_abm({ nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"}, - interval = 50 * fun_caves.time_factor, - chance = 100, + interval = 200 * fun_caves.time_factor, + chance = 25, action = function(pos, node) local pos_up = {x=pos.x,y=pos.y+1,z=pos.z} local node_up = minetest.get_node_or_nil(pos_up) @@ -449,8 +449,8 @@ minetest.register_abm({ -- mushroom growth minetest.register_abm({ nodenames = {"fun_caves:huge_mushroom_cap"}, - interval = 100 * fun_caves.time_factor, - chance = 150, + interval = 500 * fun_caves.time_factor, + chance = 30, action = function(pos, node) if minetest.get_node_light(pos, nil) >= 14 then minetest.set_node(pos, {name = "air"}) @@ -483,8 +483,8 @@ minetest.register_abm({ -- mushroom growth minetest.register_abm({ nodenames = {"fun_caves:giant_mushroom_stem"}, - interval = 5 * fun_caves.time_factor, - chance = 5, + interval = 15 * fun_caves.time_factor, + chance = 10, action = function(pos, node) local pos_up = {x=pos.x,y=pos.y+1,z=pos.z} local node_up = minetest.get_node_or_nil(pos_up) @@ -503,8 +503,8 @@ minetest.register_abm({ -- mushroom spread minetest.register_abm({ nodenames = {"fun_caves:giant_mushroom_cap", "fun_caves:huge_mushroom_cap"}, - interval = 3 * fun_caves.time_factor, - chance = 40, + interval = 15 * fun_caves.time_factor, + chance = 10, action = function(pos, node) if minetest.get_node_light(pos, nil) >= 14 then minetest.set_node(pos, {name = "air"}) @@ -533,8 +533,8 @@ minetest.register_abm({ -- Mushroom spread and death minetest.register_abm({ nodenames = {"flowers:mushroom_brown", "flowers:mushroom_red"}, - interval = 3 * fun_caves.time_factor, - chance = 50, + interval = 15 * fun_caves.time_factor, + chance = 10, action = function(pos, node) if minetest.get_node_light(pos, nil) == 15 then minetest.remove_node(pos) @@ -612,8 +612,8 @@ end minetest.register_abm({ nodenames = hot_spikes, --neighbors = {"default:lava_source", "default:lava_flowing"}, - interval = 6 * fun_caves.time_factor, - chance = 50, + interval = 30 * fun_caves.time_factor, + chance = 10, action = function(pos, node) local spike_num for i = 1, #hot_spikes do