Update wish tally
parent
d36f862fc0
commit
ec18f32990
|
@ -310,6 +310,7 @@
|
|||
"wonFiftyFifty": "won 50:50",
|
||||
"fromFiveStar": "from all 5★",
|
||||
"fromFourStar": "from all 4★",
|
||||
"fromFourStarFeatured": "from featured 4★",
|
||||
"show": "Show",
|
||||
"name": "Name",
|
||||
"total": "Total",
|
||||
|
|
|
@ -281,6 +281,7 @@
|
|||
"wonFiftyFifty": "menang 50:50",
|
||||
"fromFiveStar": "dari semua 5★",
|
||||
"fromFourStar": "dari semua 4★",
|
||||
"fromFourStarFeatured": "dari featured 4★",
|
||||
"show": "Tampilkan",
|
||||
"name": "Nama",
|
||||
"total": "Total",
|
||||
|
|
|
@ -105,6 +105,12 @@
|
|||
max: 0,
|
||||
};
|
||||
|
||||
const rareInclude = {
|
||||
300011: ['rosaria'],
|
||||
300012: ['yanfei', 'noelle', 'diona'],
|
||||
};
|
||||
let promotedRarePercentage = 0;
|
||||
|
||||
let legendaryList = [];
|
||||
let legendaryPity = [];
|
||||
let rarePity = [];
|
||||
|
@ -165,6 +171,23 @@
|
|||
];
|
||||
}
|
||||
|
||||
// only for zhongli banner upward
|
||||
if (id > 300011 && id < 400000) {
|
||||
const totalRare = data.list.reduce((prev, current) => {
|
||||
if (rareInclude[id].includes(current.name)) {
|
||||
prev.total += current.count;
|
||||
}
|
||||
if (featured[1] === current.name) {
|
||||
prev.featured = current.count;
|
||||
}
|
||||
return prev;
|
||||
}, {
|
||||
total: 0,
|
||||
featured: 0,
|
||||
});
|
||||
promotedRarePercentage = totalRare.featured / totalRare.total * 100
|
||||
}
|
||||
|
||||
legendary = {
|
||||
total: data.total.legendary,
|
||||
percentage: (data.total.legendary / data.total.all) * 100,
|
||||
|
@ -310,13 +333,16 @@
|
|||
<span class="text-gray-400">{$t('wish.tally.summoned')}</span>
|
||||
</p>
|
||||
<p class="text-gray-400">
|
||||
{#if id === 300011 && i === 0}
|
||||
{#if id >= 300011 && id < 400000 && i === 0}
|
||||
{numberFormat.format(
|
||||
((featuredValues[i].total - featuredValues[i].guaranteed) /
|
||||
(data.total.legendary - featuredValues[i].guaranteed)) *
|
||||
100,
|
||||
)}%
|
||||
{$t('wish.tally.wonFiftyFifty')}
|
||||
{:else if id > 300011 && id < 400000 && i === 1}
|
||||
{numberFormat.format(promotedRarePercentage)}%
|
||||
{$t('wish.tally.fromFourStarFeatured')}
|
||||
{:else}
|
||||
{numberFormat.format(featuredValues[i].percentage)}% {$t(
|
||||
type === 'character' && i === 1 ? 'wish.tally.fromFourStar' : 'wish.tally.fromFiveStar',
|
||||
|
|
Loading…
Reference in New Issue