Skip to content

Commit

Permalink
Merge branch 'main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
fribbels committed Nov 5, 2024
2 parents c59fe0a + eb94a65 commit 3393daa
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 94 deletions.
86 changes: 43 additions & 43 deletions src/data/game_data.json

Large diffs are not rendered by default.

48 changes: 25 additions & 23 deletions src/lib/conditionals/character/Fugue.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import i18next from 'i18next'
import { ComputedStatsObject } from 'lib/conditionals/conditionalConstants'
import {
AbilityEidolon,
findContentId,
gpuStandardAtkFinalizer,
standardAtkFinalizer,
} from 'lib/conditionals/conditionalUtils'

import { AbilityEidolon, findContentId, gpuStandardAtkFinalizer, standardAtkFinalizer } from 'lib/conditionals/conditionalUtils'
import { CURRENT_DATA_VERSION, Stats } from 'lib/constants'

import { Eidolon } from 'types/Character'
Expand Down Expand Up @@ -37,14 +33,6 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
text: 'Foxian Prayer BE buff',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
},
{
formItem: 'slider',
id: 'weaknessBreakBeStacks',
text: 'Enemy broken BE stacks',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
min: 0,
max: 2,
},
{
formItem: 'switch',
id: 'defReduction',
Expand All @@ -59,8 +47,8 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
},
{
formItem: 'switch',
id: 'e4Vulnerability',
text: 'E4 vulnerability',
id: 'e4BreakDmg',
text: 'E4 Break DMG boost',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
disabled: e < 4,
},
Expand All @@ -75,28 +63,41 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {

const teammateContent: ContentItem[] = [
findContentId(content, 'foxianPrayer'),
findContentId(content, 'weaknessBreakBeStacks'),
{
formItem: 'switch',
id: 'be250Buff',
text: 'BE ≥ 250%',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
},
{
formItem: 'slider',
id: 'weaknessBreakBeStacks',
text: 'Enemy broken BE stacks',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
min: 0,
max: 2,
},
findContentId(content, 'defReduction'),
findContentId(content, 'superBreakDmg'),
findContentId(content, 'e4Vulnerability'),
findContentId(content, 'e4BreakDmg'),
]

const defaults = {
torridScorch: true,
foxianPrayer: false,
weaknessBreakBeStacks: 2,
defReduction: true,
superBreakDmg: true,
e4Vulnerability: true,
e4BreakDmg: true,
e6BreakEfficiency: true,
}

const teammateDefaults = {
foxianPrayer: true,
be250Buff: true,
weaknessBreakBeStacks: 2,
defReduction: true,
superBreakDmg: true,
e4Vulnerability: true,
e4BreakDmg: true,
}

return {
Expand Down Expand Up @@ -127,17 +128,18 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
precomputeMutualEffects: (x: ComputedStatsObject, action: OptimizerAction, context: OptimizerContext) => {
const m = action.characterConditionals

x[Stats.BE] += m.weaknessBreakBeStacks * 0.15
x[Stats.BE] += (m.foxianPrayer) ? skillBeValue : 0

x.SUPER_BREAK_MODIFIER += (m.superBreakDmg) ? superBreakScaling : 0
x.DEF_PEN += (m.defReduction) ? skillDefPenValue : 0

x.BREAK_EFFICIENCY_BOOST += (e >= 1 && m.foxianPrayer) ? 0.50 : 0
x.VULNERABILITY += (e >= 4 && m.e4Vulnerability) ? 0.15 : 0
x.BREAK_VULNERABILITY += (e >= 4 && m.e4BreakDmg) ? 0.20 : 0
},
precomputeTeammateEffects: (x: ComputedStatsObject, action: OptimizerAction, context: OptimizerContext) => {
const t = action.characterConditionals

x[Stats.BE] += t.weaknessBreakBeStacks * (0.08 + (t.be250Buff ? 0.16 : 0))
},
finalizeCalculations: (x: ComputedStatsObject, action: OptimizerAction, context: OptimizerContext) => {
standardAtkFinalizer(x)
Expand Down
36 changes: 16 additions & 20 deletions src/lib/conditionals/character/Sunday.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import i18next from 'i18next'
import { ComputedStatsObject } from 'lib/conditionals/conditionalConstants'
import {
AbilityEidolon,
findContentId,
gpuStandardAtkFinalizer,
standardAtkFinalizer,
} from 'lib/conditionals/conditionalUtils'
import { AbilityEidolon, findContentId, gpuStandardAtkFinalizer, standardAtkFinalizer } from 'lib/conditionals/conditionalUtils'
import { ConditionalActivation, ConditionalType, CURRENT_DATA_VERSION, Stats } from 'lib/constants'
import { buffStat, conditionalWgslWrapper } from 'lib/gpu/conditionals/dynamicConditionals'
import { wgslFalse } from 'lib/gpu/injection/wgslUtils'
Expand All @@ -20,8 +15,8 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
const { basic, skill, ult, talent } = AbilityEidolon.ULT_BASIC_3_SKILL_TALENT_5

const skillDmgBoostValue = skill(e, 0.40, 0.44)
const ultCdBoostValue = ult(e, 0.25, 0.28)
const ultCdBoostBaseValue = ult(e, 0.08, 0.0832)
const ultCdBoostValue = ult(e, 0.30, 0.336)
const ultCdBoostBaseValue = ult(e, 0.12, 0.128)
const talentCrBuffValue = talent(e, 0.20, 0.22)

const basicScaling = basic(e, 1.00, 1.10)
Expand Down Expand Up @@ -49,15 +44,15 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
},
{
formItem: 'switch',
id: 'e1ResPen',
text: 'E1 RES PEN',
id: 'e1DefPen',
text: 'E1 DEF PEN',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
disabled: e < 1,
},
{
formItem: 'switch',
id: 'e2SpdBuff',
text: 'E2 SPD buff',
id: 'e2DmgBuff',
text: 'E2 Beatified DMG buff',
content: i18next.t('BetaMessage', { ns: 'conditionals', Version: CURRENT_DATA_VERSION }),
disabled: e < 2,
},
Expand All @@ -82,8 +77,8 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
percent: true,
},
findContentId(content, 'techniqueDmgBuff'),
findContentId(content, 'e1ResPen'),
findContentId(content, 'e2SpdBuff'),
findContentId(content, 'e1DefPen'),
findContentId(content, 'e2DmgBuff'),
{
formItem: 'switch',
id: 'e6CrToCdConversion',
Expand All @@ -97,8 +92,8 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
skillDmgBuff: false,
talentCrBuffStacks: 0,
techniqueDmgBuff: false,
e1ResPen: false,
e2SpdBuff: true,
e1DefPen: false,
e2DmgBuff: false,
}

const teammateDefaults = {
Expand All @@ -107,8 +102,8 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
beatified: true,
teammateCDValue: 2.50,
techniqueDmgBuff: false,
e1ResPen: true,
e2SpdBuff: true,
e1DefPen: true,
e2DmgBuff: true,
e6CrToCdConversion: true,
}

Expand All @@ -132,9 +127,10 @@ export default (e: Eidolon, withContent: boolean): CharacterConditional => {
x.ELEMENTAL_DMG += (m.skillDmgBuff && x.SUMMONS > 0) ? skillDmgBoostValue : 0
x.ELEMENTAL_DMG += (m.techniqueDmgBuff) ? 0.50 : 0

x.RES_PEN += (e >= 1 && m.e1ResPen && m.skillDmgBuff) ? 0.20 : 0
x.DEF_PEN += (e >= 1 && m.e1DefPen && m.skillDmgBuff) ? 0.20 : 0
x.DEF_PEN += (e >= 1 && m.e1DefPen && m.skillDmgBuff && x.SUMMONS > 0) ? 0.20 : 0

x[Stats.SPD] += (e >= 2 && m.e2SpdBuff) ? 20 : 0
x.ELEMENTAL_DMG += (e >= 2 && m.e2DmgBuff) ? 0.30 : 0
},
precomputeTeammateEffects: (x: ComputedStatsObject, action: OptimizerAction, context: OptimizerContext) => {
const t = action.characterConditionals
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import gameData from 'data/game_data.json'
// Semver defined optimizer version
export const CURRENT_OPTIMIZER_VERSION = 'v2.7.1'
// Represents the beta data content version, used for display but not for update notifications
export const CURRENT_DATA_VERSION = '2.7v1'
export const CURRENT_DATA_VERSION = '2.7v3'

export const Stats = {
ATK_P: 'ATK%',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dataParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PresetEffects } from 'components/optimizerTab/optimizerForm/RecommendedPresetsButton'
import { PresetEffects } from 'components/optimizerTab/optimizerForm/RecommendedPresetsButton.tsx'
import gameData from 'data/game_data.json' with { type: 'json' }
import relicMainAffixes from 'data/relic_main_affixes.json' with { type: 'json' }
import relicSubAffixes from 'data/relic_sub_affixes.json' with { type: 'json' }
Expand Down Expand Up @@ -1088,7 +1088,7 @@ function getOverrideTraces(): Record<number, Record<string, number>> {
[Stats.RES]: 0.10,
},
1225: { // Fugue
[Stats.EHR]: 0.28,
[Stats.SPD]: 14,
[Stats.BE]: 0.24,
[Stats.HP_P]: 0.10,
},
Expand Down
12 changes: 7 additions & 5 deletions src/types/Conditionals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export type ContentComponentMap = {
// extracted content to apply to <DisplayFormControl />
export type ContentItem = {
[K in keyof ContentComponentMap]: {
formItem: K
id: string
content: string
teammateIndex?: number
} & Omit<ComponentProps<ContentComponentMap[K]>, 'content' | 'title'>
formItem: K
id: string
content: string
teammateIndex?: number
} & Omit<ComponentProps<ContentComponentMap[K]>, 'content' | 'title'>
}[keyof ContentComponentMap]

export type ConditionalBuff =
Expand Down Expand Up @@ -448,3 +448,5 @@ export type ConditionalBuff =
| 'techniqueDmgBuff'
| 'healAbility'
| 'shieldAbility'
| 'be250Buff'
| 'e4BreakDmg'

0 comments on commit 3393daa

Please sign in to comment.