From ae518e5c928f108eb9c414b641622899634fc0f5 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 10 May 2024 19:42:01 +0800 Subject: [PATCH] raaaaa --- ica-rs/plugins/md5/md5-api.js | 14 +++++++------- ica-rs/plugins/md5/md5-api.ts | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ica-rs/plugins/md5/md5-api.js b/ica-rs/plugins/md5/md5-api.js index 233b75a..eacfd52 100644 --- a/ica-rs/plugins/md5/md5-api.js +++ b/ica-rs/plugins/md5/md5-api.js @@ -168,10 +168,10 @@ function wrap_any(names, round) { win_rate_str = win_rate_1.toFixed(4); output_str_1 = "\u6700\u7EC8\u80DC\u7387:|".concat(win_rate_str, "|(").concat(round, "\u8F6E)"); // 每 500 轮, 输出一次 - if (round > 1000) { + if (round > 500) { output_datas_1 = []; result.raw_data.forEach(function (data, index) { - if (index % 500 === 0) { + if (data.round === 0) { output_datas_1.push(data); } }); @@ -185,17 +185,17 @@ function wrap_any(names, round) { } else { win_rate_2 = (result.score * 10000 / round).toFixed(2); - output_str_2 = "\u5206\u6570:|".concat(win_rate_2, "%|(").concat(round, "\u8F6E)"); - if (round > 1000) { + output_str_2 = "\u5206\u6570:|".concat(win_rate_2, "|(").concat(round, "\u8F6E)"); + if (round > 500) { output_datas_2 = []; result.raw_data.forEach(function (data, index) { - if (index % 500 === 0) { + if (data.round % 500 === 0) { output_datas_2.push(data); } }); output_datas_2.forEach(function (data, index) { - var win_rate = (data.score / data.round * 100).toFixed(2); - output_str_2 += "\n".concat(win_rate, "%(").concat(data.round, ")"); + var win_rate = (data.score / data.round * 10000).toFixed(2); + output_str_2 += "\n".concat(win_rate, "(").concat(data.round, ")"); }); } return [2 /*return*/, output_str_2]; diff --git a/ica-rs/plugins/md5/md5-api.ts b/ica-rs/plugins/md5/md5-api.ts index efacc03..f7d68a0 100644 --- a/ica-rs/plugins/md5/md5-api.ts +++ b/ica-rs/plugins/md5/md5-api.ts @@ -150,11 +150,11 @@ async function wrap_any(names: string, round: number): Promise { let win_rate_str = win_rate.toFixed(4); let output_str = `最终胜率:|${win_rate_str}|(${round}轮)`; // 每 500 轮, 输出一次 - if (round > 1000) { + if (round > 500) { // 把所有要找的数据拿出来 let output_datas: WinRate[] = []; result.raw_data.forEach((data, index) => { - if (index % 500 === 0) { + if (data.round === 0) { output_datas.push(data); } }); @@ -168,18 +168,18 @@ async function wrap_any(names: string, round: number): Promise { } else { // 分数结果其实还是个胜率, 不过需要 * 100 const win_rate = (result.score * 10000 / round).toFixed(2); - let output_str = `分数:|${win_rate}%|(${round}轮)`; - if (round > 1000) { + let output_str = `分数:|${win_rate}|(${round}轮)`; + if (round > 500) { // 把所有要找的数据拿出来 let output_datas: Score[] = []; result.raw_data.forEach((data, index) => { - if (index % 500 === 0) { + if (data.round % 500 === 0) { output_datas.push(data); } }); output_datas.forEach((data, index) => { - const win_rate = (data.score / data.round * 100).toFixed(2); - output_str += `\n${win_rate}%(${data.round})`; + const win_rate = (data.score / data.round * 10000).toFixed(2); + output_str += `\n${win_rate}(${data.round})`; }); } return output_str;