25 lines
911 B
JavaScript
25 lines
911 B
JavaScript
|
|
/**
|
||
|
|
* Game systems available for card targeting. Values match the codes the
|
||
|
|
* catalog already uses for imported cards ('MTG', 'Pokemon', 'Lorcana')
|
||
|
|
* so designer cards filter correctly alongside imports.
|
||
|
|
*/
|
||
|
|
export const EXISTING_GAMES = [
|
||
|
|
{ value: 'MTG', label: 'Magic: The Gathering' },
|
||
|
|
{ value: 'Pokemon', label: 'Pokémon' },
|
||
|
|
{ value: 'Lorcana', label: 'Disney Lorcana' },
|
||
|
|
{ value: 'Star Wars Unlimited', label: 'Star Wars: Unlimited' },
|
||
|
|
{ value: 'Flesh and Blood', label: 'Flesh and Blood' },
|
||
|
|
{ value: 'One Piece', label: 'One Piece' },
|
||
|
|
{ value: 'Sorcery', label: 'Sorcery: Contested Realm' },
|
||
|
|
{ value: 'Grand Archive', label: 'Grand Archive' },
|
||
|
|
];
|
||
|
|
|
||
|
|
export function isExistingGame(value) {
|
||
|
|
return EXISTING_GAMES.some((g) => g.value === value);
|
||
|
|
}
|
||
|
|
|
||
|
|
export function gameLabel(value) {
|
||
|
|
const match = EXISTING_GAMES.find((g) => g.value === value);
|
||
|
|
return match ? match.label : value;
|
||
|
|
}
|