mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
%抽卡记录 增加小保底不歪率显示
This commit is contained in:
parent
95a2ee64de
commit
0b3a70b4ad
2 changed files with 13 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@
|
|||
<div class="value">{{item.totalCount}}</div>
|
||||
<div class="label">抽卡总数</div>
|
||||
</div>
|
||||
{{if (item.name === '音擎频段' || item.name === '独家频段')}}
|
||||
<div class="item">
|
||||
<div class="value">{{item.noWai}}</div>
|
||||
<div class="label">不歪率</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment e{{item.emoji}}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue