Skip to content

Commit f393526

Browse files
committed
Merge branch 'main' into beta
2 parents 84092e1 + 019add2 commit f393526

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

public/locales/en_US/warpCalculatorTab.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SuperimpositionLevels:
3333
S4: S4
3434
S5: S5
3535
IncomeOptions:
36-
Label: "[v{{versionNumber}} ({{phaseNumber}}/2) | {{type}}]: "
36+
Label: "[v{{versionNumber}} ({{phaseNumber}}/{{totalPhases}}) | {{type}}]: "
3737
Type:
3838
0: None
3939
1: F2P

src/lib/tabs/tabWarp/WarpCalculatorTab.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function Inputs() {
6767

6868
form.setFieldValue("passes", specialPasses.count + Math.floor(undyingStarlight.count / 20))
6969
break
70-
70+
7171
case "GachaResult":
7272
const gachaResult = event.data
7373
const pityUpdate = gachaResult.pity_5
@@ -463,21 +463,21 @@ function generateIncomeOptions() {
463463
selectable: false,
464464
children: WarpIncomeOptions
465465
.filter((option) => option.type === type)
466-
.flatMap((option) => {
466+
.flatMap((option, idx, options) => {
467467
const results = [{
468468
value: option.id,
469469
title: option.type == WarpIncomeType.NONE
470470
? t('Type.0')
471471
: (
472472
<Flex align='center' gap={3}>
473-
<IncomeOptionLabel option={option}/>
473+
<IncomeOptionLabel option={option} totalPhases={Math.max(...options.filter((o) => o.version === option.version).map((o) => o.phase))}/>
474474
{`+${option.passes.toLocaleString(locale)}`}
475475
<img style={{ height: 18 }} src={Assets.getPass()}/>
476476
</Flex>
477477
),
478478
}]
479479

480-
if (option.phase == 2) {
480+
if (options[idx +1]?.version != option.version) {
481481
results.push({
482482
title: <></>,
483483
value: option.id + 'divider',
@@ -495,7 +495,7 @@ function generateIncomeOptions() {
495495
return options
496496
}
497497

498-
function IncomeOptionLabel(props: { option: WarpIncomeDefinition }) {
498+
function IncomeOptionLabel(props: { option: WarpIncomeDefinition, totalPhases: number }) {
499499
const t = i18next.getFixedT(null, 'warpCalculatorTab', 'IncomeOptions')
500500
return (
501501
<div style={{ marginRight: 2 }}>
@@ -504,6 +504,7 @@ function IncomeOptionLabel(props: { option: WarpIncomeDefinition }) {
504504
{
505505
versionNumber: props.option.version,
506506
phaseNumber: props.option.phase,
507+
totalPhases: props.totalPhases,
507508
type: t(`Type.${props.option.type}`),
508509
},
509510
)

src/lib/tabs/tabWarp/warpCalculatorController.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,17 @@ export const WarpIncomeOptions: WarpIncomeDefinition[] = [
5555

5656
...generateOptions('3.6', 96, 64, 119, 76, 128, 84),
5757
...generateOptions('3.7', 107, 82, 130, 94, 138, 102),
58-
...generateOptions('3.8', 109, 66, 141, 78, 149, 82),
58+
...[
59+
generateOption('3.8', 1, WarpIncomeType.F2P, 66),
60+
generateOption('3.8', 2, WarpIncomeType.F2P, 21),
61+
generateOption('3.8', 3, WarpIncomeType.F2P, 22),
62+
generateOption('3.8', 1, WarpIncomeType.EXPRESS, 78),
63+
generateOption('3.8', 2, WarpIncomeType.EXPRESS, 32),
64+
generateOption('3.8', 3, WarpIncomeType.EXPRESS, 31),
65+
generateOption('3.8', 1, WarpIncomeType.BP_EXPRESS, 82),
66+
generateOption('3.8', 2, WarpIncomeType.BP_EXPRESS, 36),
67+
generateOption('3.8', 3, WarpIncomeType.BP_EXPRESS, 31),
68+
],
5969
]
6070

6171
export enum WarpStrategy {

src/types/resources.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6811,7 +6811,7 @@ interface Resources {
68116811
"S5": "S5"
68126812
},
68136813
"IncomeOptions": {
6814-
"Label": "[v{{versionNumber}} ({{phaseNumber}}/2) | {{type}}]: ",
6814+
"Label": "[v{{versionNumber}} ({{phaseNumber}}/{{totalPhases}}) | {{type}}]: ",
68156815
"Type": {
68166816
"0": "None",
68176817
"1": "F2P",

0 commit comments

Comments
 (0)