From 5add253b8fa8bbc8f9c49504e6576ea7fc6f2098 Mon Sep 17 00:00:00 2001 From: vas <whiterocket@outlook.com> Date: Sun, 23 Jun 2019 13:20:40 -0700 Subject: [PATCH] Generate Genetics distribution adjustments --- src/js/generateGenetics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 587a44afbd0..52e7adc72c2 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -10,7 +10,9 @@ window.generateGenetics = (function() { let V; // intelligence and face parameters are the same so we can use the same distribution for both values - const fuzzy = (a, b) => normalRandInt((a+b)/2, 20, -100, 100); + // clamping makes edge values (-100, 100) more likely; this is expected behaviour + // please see https://gitgud.io/pregmodfan/fc-pregmod/issues/852 + const fuzzy = (a, b) => Math.clamp(normalRandInt((a+b)/2, 20), -100, 100); function generateGenetics(actor1, actor2, x) { V = State.variables; -- GitLab