From 0b3a70b4adfbedca50cb63c79a438f643e30e3c4 Mon Sep 17 00:00:00 2001 From: UCPr <2032385471@qq.com> Date: Wed, 4 Jun 2025 02:58:33 +0800 Subject: [PATCH] =?UTF-8?q?%=E6=8A=BD=E5=8D=A1=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=8F=E4=BF=9D=E5=BA=95=E4=B8=8D=E6=AD=AA?= =?UTF-8?q?=E7=8E=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/gacha.js | 7 +++++++ resources/gachalog/index.html | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/lib/gacha.js b/lib/gacha.js index 4d689f4..2b87279 100644 --- a/lib/gacha.js +++ b/lib/gacha.js @@ -199,6 +199,8 @@ export const anaylizeGachaLog = async uid => { let avgFive = '-'; // 初始化平均UP次数 let avgUp = '-'; + // 小保底不歪的概率 + let noWai = '-'; // 初始化欧非等级 let level = 2; // 如果有数据 @@ -210,6 +212,10 @@ export const anaylizeGachaLog = async uid => { avgFive = ((totalCount - lastFive) / fiveStars).toFixed(1); // 计算平均UP次数 if (upCount > 0) avgUp = ((totalCount - lastFive) / upCount).toFixed(1); + // 计算小保底不歪的概率 + if (+avgFive && +avgUp) { + noWai = ((2 - +avgUp / +avgFive) * 100).toFixed(0) + '%'; + } } // 如果没有最后五星 if (!lastFive && fiveStars === 0) { @@ -249,6 +255,7 @@ export const anaylizeGachaLog = async uid => { totalCount, avgFive, avgUp, + noWai, level, tag, emoji, diff --git a/resources/gachalog/index.html b/resources/gachalog/index.html index 53d9c72..b399759 100644 --- a/resources/gachalog/index.html +++ b/resources/gachalog/index.html @@ -28,6 +28,12 @@