balance: tweak decomposition rate.

make leaves decompose bonuses from nearby nodes less powerful, and
increase decomposition cost.
This commit is contained in:
trans_soup 2023-10-19 15:32:24 +02:00
parent c3bff227aa
commit 584187957a

View file

@ -32,7 +32,7 @@ local decompose_scores = {
leaves_decomposing = 30, leaves_decomposing = 30,
} }
local decompose_cost = 2000 local decompose_cost = 30000
blockgame.register_increasing_abm({ blockgame.register_increasing_abm({
id = modname .. ":decompose", id = modname .. ":decompose",
@ -40,7 +40,7 @@ blockgame.register_increasing_abm({
nodenames = {"group:leaves_decomposing"}, nodenames = {"group:leaves_decomposing"},
-- neighbors = {"group:dirty", "group:leaves_decomposing"}, -- neighbors = {"group:dirty", "group:leaves_decomposing"},
interval = 30, interval = 30,
chance = 10, chance = 5,
rate = function (pos, node, data) rate = function (pos, node, data)
local score = 20 local score = 20
@ -58,7 +58,7 @@ blockgame.register_increasing_abm({
end end
end end
gain = math.floor(gain / distance) gain = math.floor(gain / (distance ^ 3))
if gain > 0 then if gain > 0 then
score = score + gain score = score + gain