Update wish tally standard banner count

pull/1/head
Made Baruna 2021-10-02 23:53:18 +07:00
parent 1c5951e35c
commit 6b2a0011cb
No known key found for this signature in database
GPG Key ID: 5AA5DA16AA5DCEAD
2 changed files with 6 additions and 34 deletions

View File

@ -39,29 +39,6 @@ export async function submitWishTally() {
const pityCount = [...banner[i].pityCount].map((e) => e || 0); const pityCount = [...banner[i].pityCount].map((e) => e || 0);
if (pityCount.length > 90) continue; if (pityCount.length > 90) continue;
// skip first 5 star and 4 star on standard banner
if (id === 'standard') {
if (banner[i].legendary.length > 0) {
banner[i].legendary = banner[i].legendary.slice(1);
}
if (banner[i].rare.character.length > 0) {
const removedPullCharacter = banner[i].rare.character[0];
if (removedPullCharacter) {
banner[i].rarePity[removedPullCharacter.pity - 1] -= 1;
}
banner[i].rare.character = banner[i].rare.character.slice(1);
}
if (banner[i].rare.weapon.length > 0) {
const removedPullWeapon = banner[i].rare.weapon[0];
if (removedPullWeapon) {
banner[i].rarePity[removedPullWeapon.pity - 1] -= 1;
}
banner[i].rare.weapon = banner[i].rare.weapon.slice(1);
}
}
const rarePity = banner[i].rarePity; const rarePity = banner[i].rarePity;
const legendaryCount = banner[i].legendary.length; const legendaryCount = banner[i].legendary.length;
const rareCount = banner[i].rare.character.length + banner[i].rare.weapon.length; const rareCount = banner[i].rare.character.length + banner[i].rare.weapon.length;

View File

@ -106,11 +106,6 @@
max: 0, max: 0,
}; };
const rareInclude = {
300011: ['rosaria'],
300012: ['yanfei', 'noelle', 'diona'],
300013: ['xingqiu', 'beidou', 'xinyan'],
};
let promotedRarePercentage = 0; let promotedRarePercentage = 0;
let legendaryList = []; let legendaryList = [];
@ -143,10 +138,7 @@
featuredValues[i] = { featuredValues[i] = {
total: item.count, total: item.count,
guaranteed: item.guaranteed, guaranteed: item.guaranteed,
percentage: percentage: (item.count / (type === 'character' && i === 1 ? data.total.rare : data.total.legendary)) * 100,
(item.count /
(type === 'character' && id !== 200001 && i === 1 ? data.total.rare : data.total.legendary)) *
100,
}; };
} }
} }
@ -157,8 +149,11 @@
for (let i = 0; i < data.list.length; i++) { for (let i = 0; i < data.list.length; i++) {
const feat = data.list[i]; const feat = data.list[i];
const index = feat.type === 'character' ? 0 : 1; if (feat.type === 'character' && characters[feat.name].rarity === 5) {
values[index] += feat.count; values[0] += feat.count;
} else if (feat.type === 'weapon' && weaponList[feat.name].rarity === 5) {
values[1] += feat.count;
}
} }
featuredValues = [ featuredValues = [