Skip to content

Commit

Permalink
some ZO fixes (#2609)
Browse files Browse the repository at this point in the history
  • Loading branch information
frzyc authored Jan 25, 2025
1 parent 905643a commit 3d446c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions libs/zzz/page-optimize/src/BaseStatCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default function BaseStatCard({
[key]: v,
})
}
float={getUnitStr(key) === '%'}
inputProps={{ sx: { textAlign: 'right', minWidth: '5em' } }}
InputProps={{
startAdornment: statKeyTextMap[key] ?? key,
Expand Down
5 changes: 3 additions & 2 deletions libs/zzz/solver/src/calc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { objKeyMap } from '@genshin-optimizer/common/util'
import { clamp01, objKeyMap } from '@genshin-optimizer/common/util'
import type {
AnomalyDamageKey,
AttributeDamageKey,
Expand All @@ -23,7 +23,7 @@ export function getSum(baseStats: BaseStats, discs: DiscStats[]) {
}
}
for (const [key, value] of Object.entries(sum)) {
if (value > 2 && disc2pEffect[key as DiscSetKey])
if (value >= 2 && disc2pEffect[key as DiscSetKey])
for (const [k, v] of Object.entries(disc2pEffect[key as DiscSetKey]))
sum[k] = s(k) + v
}
Expand All @@ -36,6 +36,7 @@ export function getSum(baseStats: BaseStats, discs: DiscStats[]) {
sum['final_def'] = s('initial_def') * (1 + s('cond_def_')) + s('cond_def')
sum['impact'] = s('impact') * (1 + s('impact_'))
sum['anomMas'] = s('anomMas') * (1 + s('anomMas_'))
sum['crit_'] = clamp01(sum['crit_'])
return sum
}

Expand Down
2 changes: 1 addition & 1 deletion libs/zzz/ui/src/Disc/DiscCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function SubstatDisplay({
>
<span>
<StatDisplay statKey={key} />{' '}
{upgrades > 1 && <ColorText color="warning">+{upgrades}</ColorText>}
{upgrades > 1 && <ColorText color="warning">+{upgrades - 1}</ColorText>}
</span>
<span>
{displayValue}
Expand Down

0 comments on commit 3d446c7

Please sign in to comment.