Update wish tally and homepage banner

This commit is contained in:
Made Baruna 2021-09-21 16:30:26 +07:00
parent 1c1987d4d8
commit c092a528c0
No known key found for this signature in database
GPG key ID: 5AA5DA16AA5DCEAD
6 changed files with 54 additions and 26 deletions
src
data
functions
routes
static/images/home

View file

@ -2728,12 +2728,12 @@ export const builds = {
],
artifacts: [['heart_of_depth']],
mainStats: {
sands: 'TBD',
goblet: 'TBD',
circlet: 'TBD',
sands: 'HP%',
goblet: 'Hydro DMG / HP%',
circlet: 'Healing Bonus / HP%',
},
subStats: ['TBD', 'TBD', 'TBD', 'TBD'],
talent: ['TBD', 'TBD', 'TBD'],
subStats: ['HP%', 'Flat HP', 'Energy Recharge', 'Elemental Mastery'],
talent: ['Burst', 'Skill', 'Normal Attack'],
tip: '',
note: 'WORK IN PROGRESS',
},

View file

@ -73,7 +73,7 @@ export async function process(id) {
total: 0,
legendary: [],
pityCount: [],
rarePity: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
rarePity: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
rare: {
character: [],
weapon: [],

View file

@ -39,6 +39,29 @@ export async function submitWishTally() {
const pityCount = [...banner[i].pityCount].map((e) => e || 0);
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 legendaryCount = banner[i].legendary.length;
const rareCount = banner[i].rare.character.length + banner[i].rare.weapon.length;
@ -53,13 +76,25 @@ export async function submitWishTally() {
]);
// specific 4star include
if (banner[i].rare && banner[i].featuredRare) {
const includedRarePulls = banner[i].rare.character
.filter((e) => banner[i].featuredRare.includes(e.id))
.map((e) => [dayjs(e.time).unix().toString(), e.id, e.type, e.pity, e.group === 'group', e.guaranteed, 4]);
const includedRareWeaponPulls = banner[i].rare.weapon
.filter((e) => banner[i].featuredRare.includes(e.id))
.map((e) => [dayjs(e.time).unix().toString(), e.id, e.type, e.pity, e.group === 'group', e.guaranteed, 4]);
if (banner[i].rare) {
const includedRarePulls = banner[i].rare.character.map((e) => [
dayjs(e.time).unix().toString(),
e.id,
e.type,
e.pity,
e.group === 'group',
e.guaranteed,
4,
]);
const includedRareWeaponPulls = banner[i].rare.weapon.map((e) => [
dayjs(e.time).unix().toString(),
e.id,
e.type,
e.pity,
e.group === 'group',
e.guaranteed,
4,
]);
legendaryPulls.push(...includedRarePulls);
legendaryPulls.push(...includedRareWeaponPulls);
}

View file

@ -13,23 +13,16 @@
const dispatch = createEventDispatcher();
const featured = {
raiden_shogun: {
name: 'Raiden Shogun',
sangonomiya_kokomi: {
name: 'Sangonomiya Kokomi',
rarity: 'legendary',
count: 0,
average: '...',
percentage: '...',
},
kujou_sara: {
name: 'Kujou Sara',
rarity: 'rare',
count: 0,
average: '...',
percentage: '...',
},
};
const bannerId = 300018;
const image = 'raiden_kujou.png';
const bannerId = 300019;
const image = 'kokomi.png';
let loading = true;
let user = '';

View file

@ -46,14 +46,14 @@
this={i < showOld.length - 3 ? ItemNew : Item}
type="character"
banner={banners.characters[banners.characters.length - 3 - i]}
id={300016 - i}
id={300017 - i}
featured={banners.characters[banners.characters.length - 3 - i].featured}
/>
<svelte:component
this={i < showOld.length - 3 ? ItemNew : Item}
type="weapon"
banner={banners.weapons[banners.weapons.length - 3 - i]}
id={400015 - i}
id={400016 - i}
featured={banners.weapons[banners.weapons.length - 3 - i].featured}
/>
{:else}

Binary file not shown.

After

(image error) Size: 99 KiB