修复统率可能选将重复的bug

This commit is contained in:
Spmario233 2024-01-21 23:47:26 +08:00
parent 88072dd38b
commit 83d7d2937b
1 changed files with 3 additions and 3 deletions

View File

@ -7159,9 +7159,9 @@ export class Game extends Uninstantable {
} }
for (let i = 0; i < event.config.num; i++) { for (let i = 0; i < event.config.num; i++) {
let rand2 = rand.randomGet(); let rand2 = rand.randomGet();
for (let j = 0; j < rand2.length; j++) { for (let j = 0; j < rand.length; j++) {
if (rand2[j] == rand2) { if (rand[j] == rand2) {
rand2.splice(j--, 1); rand.splice(j--, 1);
} }
} }
event.enemylist.push(event.enemy[rand2]); event.enemylist.push(event.enemy[rand2]);