From 85971d3d8884e984b16e6c47cb9141e84701303b 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 857de13083..c53cef75b6 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;