1.2 KiB
1.2 KiB
Plan: Enhance Card Metadata
Objective
Update Scryfall fetching and parsing logic to include comprehensive metadata for cards. This will enable more precise pack generation algorithms in the future (e.g., filtering by legality, format, artist, or specific frame effects).
Steps
-
Update
ScryfallCardInterface (src/client/src/services/ScryfallService.ts)- Add fields for
legalities,finishes,games,produced_mana,artist,released_at,frame_effects,security_stamp,promo_types. - Define a more robust
ScryfallCardFaceinterface.
- Add fields for
-
Update
DraftCardInterface (src/client/src/services/PackGeneratorService.ts)- Add corresponding fields to the internal
DraftCardinterface to store this data in the application state.
- Add corresponding fields to the internal
-
Update
PackGeneratorService.processCards- Map the new fields from
ScryfallCardtoDraftCardduring the processing phase. - Ensure
cardFacesare also mapped correctly if present (useful for Flip cards where we might want front/back info).
- Map the new fields from
-
Verification
- Build the project to ensure no type errors.
- (Optional) Run a test script or verify in browser if possible, but static analysis should suffice for interface updates.