resolve!
This commit is contained in:
parent
719cd84c0a
commit
ebbe3180c1
@ -12350,7 +12350,7 @@
|
|||||||
l = H.set_run_time_type_info([], m)
|
l = H.set_run_time_type_info([], m)
|
||||||
n.push(T.f(LanData.get_obfuscated_value("pkGN"), null, null, C._JsInt.ag(p.current_count, 100), null, 0, 0, 0))
|
n.push(T.f(LanData.get_obfuscated_value("pkGN"), null, null, C._JsInt.ag(p.current_count, 100), null, 0, 0, 0))
|
||||||
//原来的代码,用于输出到html
|
//原来的代码,用于输出到html
|
||||||
|
|
||||||
if (p.current_count >= p.target_count) {
|
if (p.current_count >= p.target_count) {
|
||||||
o = H.set_run_time_type_info([], o)
|
o = H.set_run_time_type_info([], o)
|
||||||
m = H.set_run_time_type_info([], m)
|
m = H.set_run_time_type_info([], m)
|
||||||
@ -12359,24 +12359,24 @@
|
|||||||
p.target_count *= 10
|
p.target_count *= 10
|
||||||
}
|
}
|
||||||
q = new T.aq(n, l)
|
q = new T.aq(n, l)
|
||||||
|
|
||||||
|
|
||||||
//捕获胜率
|
//捕获胜率
|
||||||
if (p.current_count >= config[stage].count) {
|
if (p.current_count >= config[stage].count) {
|
||||||
const {
|
const {
|
||||||
score,
|
score,
|
||||||
end,
|
end,
|
||||||
skillLabel
|
skillLabel
|
||||||
} = config[stage];
|
} = config[stage];
|
||||||
|
|
||||||
var winRate=p.win_count * 100 / config[stage].count
|
var winRate = p.win_count * 100 / config[stage].count
|
||||||
if(winRate<score)
|
if (winRate < score)
|
||||||
resolve(false, [], winRate, p.current_count);
|
resolve(false, [], winRate, p.current_count);
|
||||||
else if (stage === config.length - 1)
|
else if (stage === config.length - 1)
|
||||||
resolve(true, [], winRate);
|
resolve(true, [], winRate);
|
||||||
stage++;
|
stage++;
|
||||||
}
|
}
|
||||||
|
|
||||||
async_goto = 1
|
async_goto = 1
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -37,13 +37,13 @@ async function test(str){
|
|||||||
resources: 'usable',
|
resources: 'usable',
|
||||||
beforeParse(window) {
|
beforeParse(window) {
|
||||||
window.FakelocalStorage = localStorageMock;
|
window.FakelocalStorage = localStorageMock;
|
||||||
window.config =[{"count":10000,"score":30}];
|
window.config =[{"count":5000,"score":10}];
|
||||||
window.name_input = str;
|
window.name_input = str;
|
||||||
window.stage = 0;
|
window.stage = 0;
|
||||||
window.skillData = [];
|
window.skillData = [];
|
||||||
window.resolve = (...args) => {
|
window.resolve = (...args) => {
|
||||||
//console.log(args);
|
console.log(args);
|
||||||
resolvePromise(...args);
|
resolvePromise(args);
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ async function test(str){
|
|||||||
});
|
});
|
||||||
|
|
||||||
const result = await resolver
|
const result = await resolver
|
||||||
//console.log(result)
|
console.log(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user