修复统率无法选将的严重bug

This commit is contained in:
157 2024-01-14 12:39:19 +08:00
parent 3d737f1fe5
commit 35d166a4e1
1 changed files with 3 additions and 3 deletions

View File

@ -7135,14 +7135,14 @@ export class Game extends Uninstantable {
event.avatars[i].classList.add('selecting'); event.avatars[i].classList.add('selecting');
} }
} }
let rand2 = []; let rand = [];
for (let i = 0; i < event.config.width; i++) { for (let i = 0; i < event.config.width; i++) {
for (let j = 0; j < event.config.width - i; j++) { for (let j = 0; j < event.config.width - i; j++) {
rand2.push(i); rand.push(i);
} }
} }
for (let i = 0; i < event.config.num; i++) { for (let i = 0; i < event.config.num; i++) {
let rand2 = rand2.randomGet(); let rand2 = rand.randomGet();
for (let j = 0; j < rand2.length; j++) { for (let j = 0; j < rand2.length; j++) {
if (rand2[j] == rand2) { if (rand2[j] == rand2) {
rand2.splice(j--, 1); rand2.splice(j--, 1);