Skip to content

Commit

Permalink
Show avg pulls per type of character
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Feb 11, 2025
1 parent f2a7281 commit 15f772f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/renderer/client/assets/css/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ $transition: 0.25s;
$ratio: 1.618;
$padding: 16px;
$frame-bar-height: 24px;
$stats-width: 420px;

// ----------------------------------------------------------------------------
// App Colors
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/client/pages/Banner/BannerPagePityCounter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const props = withDefaults(defineProps<{
align-items: center;
justify-content: space-between;
padding: ($padding * 4) ($padding * 2);
width: 400px;
width: $stats-width;
> span,
> strong{
Expand Down
11 changes: 10 additions & 1 deletion src/renderer/client/pages/Banner/BannerPageStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const num4Star = computed(() => props.bannerWarps.filter((warp) => warp.rarity =
const percent5StarStr = computed(() => formatPercent(num5Star.value, totalWarps.value))
const percent4StarStr = computed(() => formatPercent(num4Star.value, totalWarps.value))
const avgPullsPer5Star = computed(() => (totalWarps.value / num5Star.value).toFixed())
const avgPullsPer4Star = computed(() => (totalWarps.value / num4Star.value).toFixed())
const rateUpWinRateStr = computed<string>(() => {
const rateUpItems = props.bannerWarps.filter((warp) => warp.rarity === 5 && !warp.isGuaranteed)
const limitedItems = rateUpItems.filter((warp) => Boolean(warp.isLimited))
Expand All @@ -39,6 +42,12 @@ const rateUpWinRateStr = computed<string>(() => {
<strong>Number of 4<q-icon name="star" /></strong>
<span>{{ num4Star.toLocaleString() }} ({{ percent4StarStr }})</span>

<strong>Avg Pulls per 5<q-icon name="star" /></strong>
<span>{{ avgPullsPer5Star }}</span>

<strong>Avg Pulls per 4<q-icon name="star" /></strong>
<span>{{ avgPullsPer4Star }}</span>

<template v-if="props.bannerType === GachaBannerType.EventCharacter">
<strong>50/50 Win Rate</strong>
<span>{{ rateUpWinRateStr }}</span>
Expand All @@ -65,7 +74,7 @@ const rateUpWinRateStr = computed<string>(() => {
align-items: center;
justify-content: space-between;
padding: $padding * 2;
width: 400px;
width: $stats-width;
> span,
> strong{
Expand Down

0 comments on commit 15f772f

Please # to comment.