🐞 fix(天晶): 洗练随机顺序问题

This commit is contained in:
luying
2022-12-05 19:04:37 +08:00
parent 915a64b839
commit 10d0e13bcc

View File

@@ -1,4 +1,4 @@
import { getRandEelm, } from '../pubUtils/util';
import { getRandEelm, sortArrRandom, } from '../pubUtils/util';
import { EPlace, Stone } from "../db/Hero";
import { gameData, getArtifactWithQuality, getDicArtifactLvByPlanId, getDicArtifactQualityByStage, getJewelConditionByLvAndSeId, getNextArtifact, getNextArtifactQuality, getRandEffectByGroupAndLevel } from "../pubUtils/data";
import { JewelType, RandSe } from '../db/Jewel';
@@ -43,6 +43,7 @@ export function getRandSeResult(id: number, randSe: RandSe[], originSe: RandSe[]
randomResult.push(...allRandom);
}
let arr = sortArrRandom(randomResult);
// console.log('##### getRandSeResult', startId, effectCount)
for (let i = startId; i < effectCount; i++) {
@@ -50,10 +51,10 @@ export function getRandSeResult(id: number, randSe: RandSe[], originSe: RandSe[]
if(randSe[i] && randSe[i].locked) {
newRandSe.push(randSe[i]);
} else {
newRandSe.push(getJewelRandSe(randSe[i].id, randomResult[i]));
newRandSe.push(getJewelRandSe(randSe[i].id, arr[i]));
}
} else {
newRandSe.push(getJewelRandSe(i + 1, randomResult[i]));
newRandSe.push(getJewelRandSe(i + 1, arr[i]));
}
}
if(newRandSe.length < randSe.length) {