Multiple changes:
- Adjust giant tree spawns. - Remove dragon from dungeons. - Adjust all abms. - Allow giant trees to grow back damage. - Revamp ice trap. - Fix iron moonstone and coral teleporters.
This commit is contained in:
parent
fa86013731
commit
6c764f0c3b
11 changed files with 210 additions and 68 deletions
78
abms.lua
78
abms.lua
|
@ -186,8 +186,8 @@ end)
|
|||
-- Exploding fungal fruit
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:fungal_tree_fruit"},
|
||||
interval = 20 * fun_caves.time_factor,
|
||||
chance = 15,
|
||||
interval = 2 * fun_caves.time_factor,
|
||||
chance = 150,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
fun_caves.soft_boom(pos)
|
||||
|
@ -198,8 +198,8 @@ minetest.register_abm({
|
|||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:fungal_tree_fruit"},
|
||||
neighbors = {"fire:basic_flame"},
|
||||
interval = 10 * fun_caves.time_factor,
|
||||
chance = 5,
|
||||
interval = fun_caves.time_factor,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
fun_caves.soft_boom(pos)
|
||||
|
@ -211,8 +211,8 @@ minetest.register_abm({
|
|||
-- since it only checks below the node.
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:giant_mushroom_cap", "fun_caves:huge_mushroom_cap"},
|
||||
interval = 5 * fun_caves.time_factor,
|
||||
chance = 5,
|
||||
interval = fun_caves.time_factor,
|
||||
chance = 25,
|
||||
action = function(pos, node)
|
||||
-- Check for stem under the cap.
|
||||
local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
|
@ -226,8 +226,8 @@ minetest.register_abm({
|
|||
-- Destroy mushroom caps in the light.
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:giant_mushroom_cap", "fun_caves:huge_mushroom_cap"},
|
||||
interval = 15 * fun_caves.time_factor,
|
||||
chance = 15,
|
||||
interval = 2 * fun_caves.time_factor,
|
||||
chance = 110,
|
||||
action = function(pos, node)
|
||||
if (minetest.get_node_light(pos, nil) or 99) >= fun_caves.light_max + 2 then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
|
@ -240,12 +240,40 @@ minetest.register_abm({
|
|||
-- creation
|
||||
------------------------------------------------------------
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { "fun_caves:tree", 'fun_caves:ironwood', 'fun_caves:diamondwood' },
|
||||
neighbors = {'air'},
|
||||
interval = 5 * fun_caves.time_factor,
|
||||
chance = 900,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local new_pos = minetest.find_node_near(pos, 1, {'fun_caves:bark', 'fun_caves:leaves'})
|
||||
if new_pos then
|
||||
return
|
||||
end
|
||||
|
||||
new_pos = minetest.find_node_near(pos, 1, "air")
|
||||
if not new_pos then
|
||||
return
|
||||
end
|
||||
|
||||
if math.random(50) == 1 then
|
||||
minetest.set_node(new_pos, {name = "fun_caves:diamondwood"})
|
||||
elseif math.random(25) == 1 then
|
||||
minetest.set_node(new_pos, {name = "fun_caves:ironwood"})
|
||||
else
|
||||
minetest.set_node(new_pos, {name = "fun_caves:tree"})
|
||||
end
|
||||
print('tree +1')
|
||||
end
|
||||
})
|
||||
|
||||
-- vacuum sucks
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:vacuum"},
|
||||
neighbors = {"air"},
|
||||
interval = fun_caves.time_factor,
|
||||
chance = 1,
|
||||
chance = 10,
|
||||
action = function(pos, node)
|
||||
if pos.y <= 11168 or pos.y >= 15168 then
|
||||
return
|
||||
|
@ -267,8 +295,8 @@ minetest.register_abm({
|
|||
minetest.register_abm({
|
||||
nodenames = fungal_tree_leaves,
|
||||
neighbors = {"air", "group:liquid"},
|
||||
interval = 5 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
interval = fun_caves.time_factor,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
if (minetest.get_node_light(pos, nil) or 99) >= fun_caves.light_max + 2 then
|
||||
|
@ -308,8 +336,8 @@ minetest.register_abm({
|
|||
-- mushroom growth -- caps regenerate in time
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:giant_mushroom_stem"},
|
||||
interval = 15 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
interval = 2 * fun_caves.time_factor,
|
||||
chance = 75,
|
||||
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)
|
||||
|
@ -327,8 +355,8 @@ minetest.register_abm({
|
|||
minetest.register_abm({
|
||||
nodenames = {"default:dirt"},
|
||||
neighbors = {"air"},
|
||||
interval = 10 * fun_caves.time_factor,
|
||||
chance = 15,
|
||||
interval = 2 * fun_caves.time_factor,
|
||||
chance = 75,
|
||||
action = function(pos, node)
|
||||
if pos.y > 0 then
|
||||
return
|
||||
|
@ -350,8 +378,8 @@ minetest.register_abm({
|
|||
-- mushroom growth -- small into huge
|
||||
minetest.register_abm({
|
||||
nodenames = mushrooms,
|
||||
interval = 75 * fun_caves.time_factor,
|
||||
chance = 25,
|
||||
interval = 5 * fun_caves.time_factor,
|
||||
chance = 375,
|
||||
action = function(pos, node)
|
||||
-- Clumsy, but it's the best way to limit them to caves.
|
||||
if pos.y > 0 then
|
||||
|
@ -379,8 +407,8 @@ minetest.register_abm({
|
|||
-- mushroom growth -- huge into giant
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:huge_mushroom_cap"},
|
||||
interval = 300 * fun_caves.time_factor,
|
||||
chance = 30,
|
||||
interval = 9 * fun_caves.time_factor,
|
||||
chance = 1000,
|
||||
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)
|
||||
|
@ -404,8 +432,8 @@ minetest.register_abm({
|
|||
-- Spike spread and death
|
||||
minetest.register_abm({
|
||||
nodenames = fun_caves.hot_spikes,
|
||||
interval = 30 * fun_caves.time_factor,
|
||||
chance = 30,
|
||||
interval = 3 * fun_caves.time_factor,
|
||||
chance = 300,
|
||||
action = function(pos, node)
|
||||
if not fun_caves.hot_spike then
|
||||
return
|
||||
|
@ -448,9 +476,9 @@ minetest.register_abm({
|
|||
minetest.register_abm({
|
||||
nodenames = {"default:dirt_with_grass", "default:dirt_with_dry_grass"},
|
||||
neighbors = {"air"},
|
||||
interval = 1000000 * fun_caves.time_factor,
|
||||
interval = 10000 * fun_caves.time_factor,
|
||||
catch_up = false,
|
||||
chance = 30000,
|
||||
chance = 3000000,
|
||||
action = function(pos, node)
|
||||
local ps = {}
|
||||
local players = minetest.get_connected_players()
|
||||
|
@ -478,8 +506,8 @@ minetest.register_abm({
|
|||
-- Remove old craters.
|
||||
minetest.register_abm({
|
||||
nodenames = {"fun_caves:meteorite_crater"},
|
||||
interval = 100 * fun_caves.time_factor,
|
||||
chance = 10,
|
||||
interval = 3 * fun_caves.time_factor,
|
||||
chance = 330,
|
||||
action = function(pos, node)
|
||||
minetest.set_node(pos, {name="default:dirt"})
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue