Commit Graph

5 Commits

Author SHA1 Message Date
Brian Fertig a07d64e9b1 Add player and opponent rows for card placement, implement hover effects with hand validation, and animate card movement to field with proper positioning. 2025-08-13 14:56:03 -06:00
Brian Fertig c6a1d928a6 Add card stat display (attack, shield, health) to player hand cards
This change adds visual indicators for attack, shield, and health values to each card displayed in the player's hand. The stats are shown in specific corners of each card:
- Attack value in upper left corner
- Shield value in lower left corner
- Health value in lower right corner

The stat text elements are properly positioned relative to the card sprite and maintain their positions during hover animations. Each card now stores references to its stat text elements for consistent positioning and updates.
2025-08-13 14:21:29 -06:00
Brian Fertig 8e8bc514ad feat: Implement card data management with multiple decks
- Added card-data.js file to define four different decks (Player default, Warrior, Mage, Archer)
- Each deck contains 10 creature cards with randomized attack, shield, and health values
- Updated index.html to load the new card data script before main.js
- Modified main.js to initialize player deck using predefined deck1 instead of generating random cards
- Removed old deck generation code from main.js
2025-08-12 20:25:55 -06:00
Brian Fertig 282c30eba4 feat: Add card locking mechanism with play/cancel buttons and hand management
- Implemented card locking functionality that prevents cards from being dragged after clicking
- Added visual feedback for locked cards (raised position)
- Created Play and Cancel buttons above locked cards to confirm or revert actions
- Implemented game logic for moving cards to player field and returning them to hand
- Enhanced user interaction with proper button handling and state management
- Updated card display system to handle repositioning of remaining hand cards after interactions
2025-08-12 19:40:02 -06:00
Brian Fertig 7d82c10713 first commit 2025-08-12 19:23:41 -06:00