This commit is contained in:
shenjack 2024-03-18 22:35:48 +08:00
parent 719cd84c0a
commit ebbe3180c1
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 12 additions and 12 deletions

View File

@ -12361,7 +12361,7 @@
q = new T.aq(n, l)
//捕获胜率
//捕获胜率
if (p.current_count >= config[stage].count) {
const {
score,
@ -12369,8 +12369,8 @@
skillLabel
} = config[stage];
var winRate=p.win_count * 100 / config[stage].count
if(winRate<score)
var winRate = p.win_count * 100 / config[stage].count
if (winRate < score)
resolve(false, [], winRate, p.current_count);
else if (stage === config.length - 1)
resolve(true, [], winRate);

View File

@ -37,13 +37,13 @@ async function test(str){
resources: 'usable',
beforeParse(window) {
window.FakelocalStorage = localStorageMock;
window.config =[{"count":10000,"score":30}];
window.config =[{"count":5000,"score":10}];
window.name_input = str;
window.stage = 0;
window.skillData = [];
window.resolve = (...args) => {
//console.log(args);
resolvePromise(...args);
console.log(args);
resolvePromise(args);
window.close();
}
}
@ -54,7 +54,7 @@ async function test(str){
});
const result = await resolver
//console.log(result)
console.log(result)
}