add Holiday to CHARACTER_SERIES, remove Standard season

This commit is contained in:
Justin Edmund 2025-12-15 09:51:54 -08:00
parent 8a44d588c8
commit dd16718c03

View file

@ -1,125 +1,135 @@
export enum GridType { export enum GridType {
Character = 'character', Character = 'character',
Weapon = 'weapon', Weapon = 'weapon',
Summon = 'summon' Summon = 'summon'
} }
export enum TeamElement { export enum TeamElement {
Any = 0, Any = 0,
Wind = 1, Wind = 1,
Fire = 2, Fire = 2,
Water = 3, Water = 3,
Earth = 4, Earth = 4,
Dark = 5, Dark = 5,
Light = 6 Light = 6
} }
export function getElementClass(element: number): string | null { export function getElementClass(element: number): string | null {
switch (element) { switch (element) {
case TeamElement.Wind: return 'wind' case TeamElement.Wind:
case TeamElement.Fire: return 'fire' return 'wind'
case TeamElement.Water: return 'water' case TeamElement.Fire:
case TeamElement.Earth: return 'earth' return 'fire'
case TeamElement.Dark: return 'dark' case TeamElement.Water:
case TeamElement.Light: return 'light' return 'water'
default: return null case TeamElement.Earth:
} return 'earth'
case TeamElement.Dark:
return 'dark'
case TeamElement.Light:
return 'light'
default:
return null
}
} }
// Character season (gacha availability window) // Character season - display disambiguation for seasonal variants (e.g., "Vane [Halloween]")
// If no season, value should be null (not a default value)
export enum CharacterSeason { export enum CharacterSeason {
Standard = 1, Valentine = 1,
Valentine = 2, Formal = 2,
Formal = 3, Summer = 3,
Summer = 4, Halloween = 4,
Halloween = 5, Holiday = 5
Holiday = 6
} }
export const CHARACTER_SEASON_NAMES: Record<number, string> = { export const CHARACTER_SEASON_NAMES: Record<number, string> = {
[CharacterSeason.Standard]: 'Standard', [CharacterSeason.Valentine]: 'Valentine',
[CharacterSeason.Valentine]: 'Valentine', [CharacterSeason.Formal]: 'Formal',
[CharacterSeason.Formal]: 'Formal', [CharacterSeason.Summer]: 'Summer',
[CharacterSeason.Summer]: 'Summer', [CharacterSeason.Halloween]: 'Halloween',
[CharacterSeason.Halloween]: 'Halloween', [CharacterSeason.Holiday]: 'Holiday'
[CharacterSeason.Holiday]: 'Holiday'
} }
export function getSeasonName(season: number | null): string | null { export function getSeasonName(season: number | null): string | null {
if (season === null) return null if (season === null) return null
return CHARACTER_SEASON_NAMES[season] ?? null return CHARACTER_SEASON_NAMES[season] ?? null
} }
// Character series (identity/pool membership) // Character series (identity/pool membership)
export enum CharacterSeries { export enum CharacterSeries {
Standard = 1, Standard = 1,
Grand = 2, Grand = 2,
Zodiac = 3, Zodiac = 3,
Promo = 4, Promo = 4,
Collab = 5, Collab = 5,
Eternal = 6, Eternal = 6,
Evoker = 7, Evoker = 7,
Saint = 8, Saint = 8,
Fantasy = 9, Fantasy = 9,
Summer = 10, Summer = 10,
Yukata = 11, Yukata = 11,
Valentine = 12, Valentine = 12,
Halloween = 13, Halloween = 13,
Formal = 14, Formal = 14,
Event = 15 Holiday = 15,
Event = 16
} }
export const CHARACTER_SERIES_NAMES: Record<number, string> = { export const CHARACTER_SERIES_NAMES: Record<number, string> = {
[CharacterSeries.Standard]: 'Standard', [CharacterSeries.Standard]: 'Standard',
[CharacterSeries.Grand]: 'Grand', [CharacterSeries.Grand]: 'Grand',
[CharacterSeries.Zodiac]: 'Zodiac', [CharacterSeries.Zodiac]: 'Zodiac',
[CharacterSeries.Promo]: 'Promo', [CharacterSeries.Promo]: 'Promo',
[CharacterSeries.Collab]: 'Collab', [CharacterSeries.Collab]: 'Collab',
[CharacterSeries.Eternal]: 'Eternal', [CharacterSeries.Eternal]: 'Eternal',
[CharacterSeries.Evoker]: 'Evoker', [CharacterSeries.Evoker]: 'Evoker',
[CharacterSeries.Saint]: 'Saint', [CharacterSeries.Saint]: 'Saint',
[CharacterSeries.Fantasy]: 'Fantasy', [CharacterSeries.Fantasy]: 'Fantasy',
[CharacterSeries.Summer]: 'Summer', [CharacterSeries.Summer]: 'Summer',
[CharacterSeries.Yukata]: 'Yukata', [CharacterSeries.Yukata]: 'Yukata',
[CharacterSeries.Valentine]: 'Valentine', [CharacterSeries.Valentine]: 'Valentine',
[CharacterSeries.Halloween]: 'Halloween', [CharacterSeries.Halloween]: 'Halloween',
[CharacterSeries.Formal]: 'Formal', [CharacterSeries.Formal]: 'Formal',
[CharacterSeries.Event]: 'Event' [CharacterSeries.Holiday]: 'Holiday',
[CharacterSeries.Event]: 'Event'
} }
export function getSeriesNames(series: number[]): string[] { export function getSeriesNames(series: number[]): string[] {
return series.map(s => CHARACTER_SERIES_NAMES[s]).filter((name): name is string => Boolean(name)) return series
.map((s) => CHARACTER_SERIES_NAMES[s])
.filter((name): name is string => Boolean(name))
} }
// Weapon/Summon promotions (gacha pool membership) // Weapon/Summon promotions (gacha pool membership)
export enum Promotion { export enum Promotion {
Premium = 1, Premium = 1,
Classic = 2, Classic = 2,
ClassicII = 3, ClassicII = 3,
Flash = 4, Flash = 4,
Legend = 5, Legend = 5,
Valentine = 6, Valentine = 6,
Summer = 7, Summer = 7,
Halloween = 8, Halloween = 8,
Holiday = 9, Holiday = 9,
Collab = 10, Collab = 10,
Formal = 11 Formal = 11
} }
export const PROMOTION_NAMES: Record<number, string> = { export const PROMOTION_NAMES: Record<number, string> = {
[Promotion.Premium]: 'Premium', [Promotion.Premium]: 'Premium',
[Promotion.Classic]: 'Classic', [Promotion.Classic]: 'Classic',
[Promotion.ClassicII]: 'Classic II', [Promotion.ClassicII]: 'Classic II',
[Promotion.Flash]: 'Flash', [Promotion.Flash]: 'Flash',
[Promotion.Legend]: 'Legend', [Promotion.Legend]: 'Legend',
[Promotion.Valentine]: 'Valentine', [Promotion.Valentine]: 'Valentine',
[Promotion.Summer]: 'Summer', [Promotion.Summer]: 'Summer',
[Promotion.Halloween]: 'Halloween', [Promotion.Halloween]: 'Halloween',
[Promotion.Holiday]: 'Holiday', [Promotion.Holiday]: 'Holiday',
[Promotion.Collab]: 'Collab', [Promotion.Collab]: 'Collab',
[Promotion.Formal]: 'Formal' [Promotion.Formal]: 'Formal'
} }
export function getPromotionNames(promotions: number[]): string[] { export function getPromotionNames(promotions: number[]): string[] {
return promotions.map(p => PROMOTION_NAMES[p]).filter((name): name is string => Boolean(name)) return promotions.map((p) => PROMOTION_NAMES[p]).filter((name): name is string => Boolean(name))
} }