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 @@
{{item.totalCount}}
抽卡总数
+ {{if (item.name === '音擎频段' || item.name === '独家频段')}} +
+
{{item.noWai}}
+
不歪率
+
+ {{/if}}