Classic off-by-one error

This commit is contained in:
thepaperpilot 2022-12-12 22:56:48 -06:00
parent 7c8d31c3e8
commit 02062856f6

View file

@ -1018,7 +1018,7 @@ const layer = createLayer(id, () => {
let x = 0;
focusTargets.value = {};
const newCount = Decimal.min(count, range);
while (newCount.gte(x)) {
while (newCount.gt(x)) {
const roll = Object.values(elfTraining)[Math.floor(Math.random() * range)]?.name ?? "";
if (!focusTargets.value[roll]) {
focusTargets.value[roll] = true;