From e147bf5af42ff6a156f424f69171b4ede38c9f9e Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 22 Dec 2019 09:19:55 -0500 Subject: [PATCH] Simplify cluster calculation --- recursive-macro.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/recursive-macro.js b/recursive-macro.js index d077a40..d835713 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -404,11 +404,9 @@ function fill_area(area, weights, variance=0.15) // if we have nothing at all, it's even better! while (loopvar < limit) { - if (loopvar <= clusters[candidate.name] && loopvar == 0 && Math.random() < cluster_chances[candidate.name]) { - ++count; - } - else if (loopvar <= clusters[candidate.name]) { - if (Math.random() < candidate.weight ? 1 : 0 || Math.random() < 0.75 * cluster_chances[candidate.name]) { + + if (loopvar <= clusters[candidate.name]) { + if (Math.random() < candidate.weight ? 1 : Math.random() < cluster_chances[candidate.name]) { ++count; } }