From e7f68331859800386bf46d5a7aade58f94ea4afc Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 19 Jan 2020 03:38:59 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20Pages=E3=81=A7DRPWPM=E3=81=8C=E6=9C=80?= =?UTF-8?q?=E5=88=9D=E3=81=AE=E3=81=97=E3=81=8B=E5=87=BA=E3=81=A6=E3=81=93?= =?UTF-8?q?=E3=81=AA=E3=81=84=20(#5707)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/misc/aiscript/evaluator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/aiscript/evaluator.ts b/src/misc/aiscript/evaluator.ts index 857de1308..c53cef75b 100644 --- a/src/misc/aiscript/evaluator.ts +++ b/src/misc/aiscript/evaluator.ts @@ -195,7 +195,7 @@ export class ASEvaluator { const r = seedrandom(`${day}:${block.id}`)() * totalFactor; let stackedFactor = 0; for (const x of xs) { - if (r >= stackedFactor && r <= x.factor) { + if (r >= stackedFactor && r <= stackedFactor + x.factor) { return x.text; } else { stackedFactor += x.factor;