Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface Serie {
energies?: Array<Types>
}

export type VariantLine = 'main' | 'parallel' | 'restricted' | 'exclusive'
export type VariantType = 'normal' | 'holo' | 'reverse' | 'metal' | 'lenticular'
export type VariantStamps = '1st-edition' | 'w-promo' | 'pre-release' | 'pokemon-center' | 'set-logo' | 'staff' | 'pikachu-tail'
| 'wotc' | 'd-edition-error' | '1st-edition-scratch-error' | "1st-edition-error" | '1st-movie' | '1st-movie-inverted'
Expand Down Expand Up @@ -97,6 +98,21 @@ export interface variant_detailed {
*/
languages?: SupportedLanguages[]

/**
* which line is this variant available from:
* main: this variant is available in booster packs (default)
* parallel: this variant is available in specific products i.e. build and battle kits, preconstructed decks
* restricted: this variant was only available to attendees of a specific event
* exclusive: this variant was only available to workers, winners, top cuts of a specific event or job
*
* None of these are locked and maybe expanded upon as time progresses, when deciding what line to use for a variant
* if it's available in more than one pick the lower line. i.e. some cards in the build and battle kits will be
* available in boosters and therefore are 'main line' but some others the 'non-holo holos' would be parallel
*
* this is meant to assist with sperating out collections between full set/master set/grandmaster set
*/
line?: VariantLine

thirdParty?: {
tcgplayer?: number
cardmarket?: number
Expand Down
1 change: 1 addition & 0 deletions meta/definitions/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ interface variant_detailed {
tcgplayer?: number
}
variantId: string
line: string
}

export interface SetResume {
Expand Down
6 changes: 6 additions & 0 deletions meta/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,11 @@
"phanphy-error": "phanphy-fehler",
"peelable-ditto": "Abziehbares Ditto",
"missing-retreat-cost": "Fehlende Rückzugskosten"
},
"variantLine": {
"main": "main",
"parallel": "parallel",
"restricted": "restricted",
"exclusive": "exclusive"
}
}
6 changes: 6 additions & 0 deletions meta/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,11 @@
"phanphy-error": "Error de phanphy",
"peelable-ditto": "Ditto despegable",
"missing-retreat-cost": "Coste de retirada ausente"
},
"variantLine": {
"main": "main",
"parallel": "parallel",
"restricted": "restricted",
"exclusive": "exclusive"
}
}
6 changes: 6 additions & 0 deletions meta/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,11 @@
"phanphy-error": "Erreur de phanphy",
"peelable-ditto": "Ditto décollable",
"missing-retreat-cost": "Coût de retraite manquant"
},
"variantLine": {
"main": "main",
"parallel": "parallel",
"restricted": "restricted",
"exclusive": "exclusive"
}
}
6 changes: 6 additions & 0 deletions meta/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,11 @@
"phanphy-error": "Errore di phanphy",
"peelable-ditto": "Ditto rimovibile",
"missing-retreat-cost": "Costo di ritirata mancante"
},
"variantLine": {
"main": "main",
"parallel": "parallel",
"restricted": "restricted",
"exclusive": "exclusive"
}
}
6 changes: 6 additions & 0 deletions meta/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,5 +300,11 @@
"phanphy-error": "error de phanphy",
"peelable-ditto": "Ditto destacável",
"misisng-retreat-cost": "Custo de recuo ausente"
},
"variantLine": {
"main": "main",
"parallel": "parallel",
"restricted": "restricted",
"exclusive": "exclusive"
}
}
3 changes: 2 additions & 1 deletion server/compiler/utils/cardUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function variantsToVariantsDetailed(variants: CardSingle['variants'],lang: Suppo
type: type as VariantType,
size: translate('variantSize', "standard", lang) as any,
stamp: stamps.length > 0 ? stamps as Array<VariantStamps> : undefined,
variantId: "generated"
variantId: "generated",
line: "main"
});
};

Expand Down
2 changes: 1 addition & 1 deletion server/compiler/utils/translationUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import pt from '../../../meta/translations/pt.json'
import de from '../../../meta/translations/de.json'
import fr from '../../../meta/translations/fr.json'

type translatable = 'types' | 'rarity' | 'stage' | 'category' | 'suffix' | 'abilityType' | 'trainerType' | 'energyType' | 'variantType' | 'variantSize' | 'variantFoil' | 'variantStamp' | 'variantSubtype'
type translatable = 'types' | 'rarity' | 'stage' | 'category' | 'suffix' | 'abilityType' | 'trainerType' | 'energyType' | 'variantType' | 'variantSize' | 'variantFoil' | 'variantStamp' | 'variantSubtype' | 'variantLine'

const translations: Record<string, Record<translatable, Record<string, string>>> = {
es,
Expand Down
1 change: 1 addition & 0 deletions server/compiler/utils/variantUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function formatVariant(variant: variant_detailed, lang: SupportedLanguage
? variant.stamp.map((stamp) => translate('variantStamp', stamp, lang))
: undefined,
foil: variant.foil ? translate('variantFoil', variant.foil, lang) : undefined,
line: variant.line ? translate('variantLine', variant.line, lang) : translate('variantLine', "main", lang),
thirdParty: variant.thirdParty
};
}