1.3 KiB
1.3 KiB
Card Metadata Enhancement
Objective
Enhance the Scryfall data fetching and internal card representation to include full metadata (CMC, Oracle Text, Power/Toughness, Collector Number, etc.). This allows strictly precise pack generation and potential future features like mana curve analysis or specific slot targeting.
Changes
-
Updated
ScryfallService.ts:- Extended
ScryfallCardinterface to include:cmc(number)mana_cost(string)oracle_text(string)power,toughness(strings)collector_number(string)color_identity(string[])keywords(string[])booster(boolean)promo,reprint(booleans)
- Verified that
fetchcalls already return this data; TS interface update exposes it.
- Extended
-
Updated
PackGeneratorService.ts:- Extended
DraftCardinternal interface to include the same metadata fields (normalized names likemanaCost,oracleText). - Updated
processCardsfunction to map these fields from the Scryfall response to theDraftCardobject.
- Extended
Impact
- Pack generation now has access to rich metadata.
- Future-proofs the system for "The List" exact matching (via collector number or promo types) and game logic (CMC sorting).