Claude/game animations clean as0 lc#10
Open
timkindberg wants to merge 8 commits into
Open
Conversation
Implemented Tier 1 priority animations that help players track card movements and game actions: Card Movement Animations: - Card flip animation when drawing from deck - Card slide animations from deck/field to hand - Card hover lift for better interactivity Combat Animations: - Castle damage shake and red flash when taking damage - Raid impact explosion effect on castles - Fortification battle clash animation - Castle destruction animation sequence Phase Transitions: - Dynamic phase banners for Draw, Action, and special phases - Visual indicators for round changes - Raid success and assassin attack notifications Special Effects: - Royal entrance flourish when bringing royals to power - Alliance activation beam effect - Point counter animations for persuasion/threat - Number pop effects for stat changes These animations provide clear visual feedback for all major game actions, making it easier to track what's happening during gameplay.
- Cards now animate from drawn slot to their destinations - Persuade: animates to alliance persuasion track - Threaten: animates to opponent's persuasion track - Fortify: animates to fortification slot with rotation - Battle: animates to opponent's fortification then fades - Bring to Power: animates to royal stack with celebration - Assassinate: animates to target royal - Field: animates to selected field pile All animations use a flying card clone that transitions smoothly from source to destination, making it much easier to track where cards are going during gameplay.
Replace clone-based card movement animations with View Transitions API for smoother, more performant animations. Changes: - Added CSS for view transitions (::view-transition-old/new) - Replaced animateCardMovement with animateWithViewTransition - All card movements now use view-transition-name to mark source/destination - Browser automatically morphs cards between positions - Cleaner code: no DOM cloning, no manual position calculations - Better performance: GPU-accelerated transitions Card animations now use document.startViewTransition() to: - Persuade: card → persuasion track - Threaten: card → opponent persuasion track - Fortify: card → fortification slot - Battle: card → opponent fortification - Bring to Power: card → royal stack - Assassinate: card → target royal - Field: card → field pile The browser handles all the animation tweening automatically, creating smooth morphs between old and new card positions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Fix field draw animation to use View Transitions properly (was animating from far left) - Add UI reference to AIPlayer for animation support - Add AI wrapper methods: aiDrawFromDeck, aiDrawFromField, aiExecuteAction - Modify AI to use UI wrappers when available for animated moves - All AI actions now animate same as player actions Now when the AI plays, cards smoothly animate showing where they're going, making it much easier to follow AI strategy.
- Remove buggy View Transition from field draws (was animating from far left) - Use simple CSS animations for player/AI field draws instead - Add delay() helper method for AI timing - Fix battle animation to show card flying to fortification - Fix assassin animation to show card flying to target royal - Add CSS for card-moving-dest view transition name - Prevents auto-draw bug caused by async click handlers Cards now properly animate from their source locations and battle/assassin actions show clear visual feedback of where attacks are going.
Replace View Transitions API with reliable card cloning for all animations: - Clone card at source position before action executes - Execute action and render to update game state - Animate clone to destination with CSS transitions - Remove clone after animation completes This fixes: - Field piles becoming empty during animations - Cards teleporting from far left during draw - Persuasion not animating to correct zone - Assassin and bring-to-power animations not working Updated methods: - animateCardToRoyalStack() - bring royal to power - animateAssassinToTarget() - assassin attack animation All animations now use consistent, bug-free cloning pattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.