1.4 KiB
1.4 KiB
Gameplay Magnified View Details Update
Requirements
- Display detailed card information (Oracle Text, Type Line, Mana Cost) in the magnified view on the battlefield.
Implementation Details
Data Model Updates
CardInstanceInterface: Added optional fieldstypeLine,oracleText, andmanaCostto both client (src/client/src/types/game.ts) and server (src/server/managers/GameManager.ts) definitions.DraftCardInterface: AddedoracleTextandmanaCostto the server-side interface (PackGeneratorService.ts).
Logic Updates
PackGeneratorService.ts: UpdatedprocessCardsto maporacle_textandmana_costfrom Scryfall data toDraftCard.src/server/index.ts: Updated alladdCardToGamecalls (timeout handling, player ready, solo test, start game) to pass the new fields from the draft card/deck source to theCardInstance.
UI Updates (GameView.tsx)
- Updated the Zoom Sidebar to conditionally render:
- Mana Cost: Displayed in a monospace font.
- Type Line: Displayed in emerald color with uppercase styling.
- Oracle Text: Displayed in a formatted block with proper whitespace handling.
- Replaced undefined
cardIsCreaturehelper with an inline check.
Verification
- Hovering over a card in the game view now shows not just the image but also the text details, which is crucial for readability of complex cards.