Files
i-want-to-heal/src/modes/iwt2/content/pvpGearNormalization.ts
T
2026-07-08 23:33:57 -04:00

38 lines
936 B
TypeScript

import { IWT2_PARTY_ORDER } from './classes'
import {
IWT2_GEAR_SLOTS,
type Iwt2GearLevel,
type Iwt2GearProgress,
} from './gear'
export type Iwt2PvpGearNormalizationConfig = {
enabled: boolean
gearLevel: Iwt2GearLevel
}
export const IWT2_PVP_NORMALIZED_GEAR_LEVEL: Iwt2GearLevel = 5
export const IWT2_PVP_GEAR_NORMALIZATION: Iwt2PvpGearNormalizationConfig = {
enabled: true,
gearLevel: IWT2_PVP_NORMALIZED_GEAR_LEVEL,
}
export function createIwt2PvpNormalizedGearProgress(
config = IWT2_PVP_GEAR_NORMALIZATION,
): Iwt2GearProgress | undefined {
if (!config.enabled) return undefined
return Object.fromEntries(
IWT2_PARTY_ORDER.map((classId) => [
classId,
{
slots: Object.fromEntries(
IWT2_GEAR_SLOTS.map((slotId) => [slotId, { level: config.gearLevel }]),
),
infusionAbilityId: null,
passiveInfusionId: null,
},
]),
) as Iwt2GearProgress
}