Restore battle animations with delay-verifiable test infrastructure - #13
Merged
Conversation
…lion City, Diglett's Cave, Rock Tunnel Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new locations and update game map
Add Kanto locations: Routes 5/6/9/10/11, Underground Path, Vermillion City, Diglett's Cave, Rock Tunnel
Mar 12, 2026
Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
Add Kanto locations: Routes 5/6/9/10/11, Underground Path, Vermillion City, Diglett's Cave, Rock Tunnel
Increase route explore counts, give bike a double-step bonus, fix evolution animations
Mar 12, 2026
…AnimatedTextWriter Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
Increase route explore counts, give bike a double-step bonus, fix evolution animations
Restore battle animations and add delay-verifiable animation test infrastructure
Mar 12, 2026
…Animation and TestCatchAnimation Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
Restore battle animations and add delay-verifiable animation test infrastructure
Restore battle animations with delay-verifiable test infrastructure
Mar 12, 2026
MobyNL
marked this pull request as ready for review
March 13, 2026 18:41
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.
Battle animations were gone — encounter intros, fight moves, and catch attempts all wrote output instantly with no wait time. There was also no test mechanism to assert that animations actually request a non-zero delay.
Animation infrastructure
AnimatedTextWriter— recordslast_delayon everywrite_lines_with_delaycall.MockAnimatedTextWriter— records(method_name, delay, lines)per call inrecorded_calls, enabling assertions like:Battle encounter start (wild + trainer)
battle_ui.py: extractedget_battle_start_lines()/get_trainer_battle_start_lines()returningList[str]so callers can animate rather than write instantly.battle_actions.trigger_wild_encounter/trigger_trainer_encounter: accept optionalshow_battle_start_callback(output, on_ready)— battle options +pending_commandfire insideon_ready()after animation completes. Default (no callback) preserves instant behaviour for all existing callers.BattleMixin: passestext_animator.write_medium(0.4 s/line) as the callback.Fight move animations
BattleMixin._build_wild_turn_messages(): executes the opponent turn (side-effects) and returnslist[str], enabling callers to animate.BattleMixin.execute_player_move: chainedtext_animator.write_fastcalls — player attack →on_complete→ opponent attack →on_complete→ EOT effects → show options.Catch (Pokeball throw) animation
battle_actions.attempt_catch_pokemon: optionalanimate_shake_callback(output, lines, on_complete)param; result logic (party-add, PC-store, Pokedex, escape counter-attack) moved into_after_shake().BattleMixin.attempt_catch_pokemon: passestext_animator.write_slow(0.8 s/line) for dramatic shake tension.Tests added
TestBattleStartAnimationwrite_medium, delay > 0, lines contain Pokémon nameTestFightMoveAnimationwrite_fast, delay > 0, lines contain move name, ≥ 2 calls (player + opponent), no animation onback/unknownTestCatchAnimationwrite_slow, delay > 0, wiggle dots in lines, no animation without balls or in trainer battleTestMockAnimatedTextWriterfast=0.2,medium=0.4,slow=0.8,instant=0.0)Original prompt
It;s time to create the next steps.
Let's continue with more locations. We'll add the trainers later:
Next Locations to Add:
Implementation Notes:
- Add location data to
- Add wild Pokemon encounters for new routes
- Update
- Create unit tests in
- Try to ceate a map that is visible, with a marker where the player is
[Chronological Review: The conversation began with the user requesting an analysis of their repository and an update to the implementation plan to reflect current progress and future plans. The user then specified the next steps for adding new locations in their project, detailing completed and pending locations, along with implementation notes.]locations.pyGAME_MAP_OVERVIEW.mdwith new locationstests/game/test_locations.py[Intent Mapping: The user explicitly requested to analyze the repository and update the implementation plan. They also outlined specific next steps for adding new locations, indicating which locations were complete and which were pending, along with implementation notes.]
[Technical Inventory: The user is working on a project related to a Pokémon game, utilizing a file named
locations.pyfor location data, a markdown fileGAME_MAP_OVERVIEW.mdfor an overview of the game map, and a test filetests/game/test_locations.pyfor unit tests.][Code Archaeology: The user mentioned modifying
locations.pyto add location data, updatingGAME_MAP_OVERVIEW.md, and creating unit tests intests/game/test_locations.py. They also indicated the need to create a visible map with a player marker.][Progress Assessment: The user has completed the following locations: Mt. Moon, Route 4, and Cerulean City. The following locations are pending: Route 5, Route 6, Underground Path, Vermillion City, Route 11, Diglett's Cave, Route 9, Route 10, and Rock Tunnel.]
[Context Validation: All critical information for continuation is captured, including the list of locations to be added, the implementation notes, and the files that need to be updated.]
[Recent Commands Analysis: The last agent command involved the user requesting to create the next steps for adding more locations. The tool results included a detailed list of locations with their completion status and implementation notes. The agent was actively working on updating the implementation plan when the token budget was exceeded. These operations connect to the user's goal of progressing in their Pokémon game development by adding new locations and ensuring the implementation plan reflects this progress.]
1. Conversation Overview: - Primary Objectives: The user requested an analysis of the repository and an update to the implementation plan to reflect current progress and future plans. They specified next steps for adding new locations. - Session Context: The conversation flowed from an initial request for repository analysis to outlining specific next steps for location additions, detailing completed and pending tasks. - User Intent Evolution: The user's needs evolved from a general analysis to specific implementation steps for enhancing their Pokémon game.- Technical Foundation:
- Python: Used for the game development, particularly in managing game locations and encounters.
- Markdown: Utilized for documentation in
- Unit Testing Framework: Implied usage in
- Codebase Status:
- Purpose: To manage and store location data for the game.
- Current State: Needs updates to include new locations.
- Key Code Segments: Functions for adding and retrieving location data.
- Dependencies: Interacts with game logic for encounters and map navigation.
- Purpose: To provide an overview of the game map.
- Current State: Requires updates to reflect new locations.
- Purpose: To contain unit tests for location functionality.
- Current State: Needs new tests for added locations.
- Problem Resolution:
- Issues Encountered: None explicitly mentioned, but the need for updates indicates ongoing development challenges.
- Solutions Implemented: The user is actively planning updates to the codebase to enhance functionality.
- Debugging Context: No specific debugging issues were noted.
- Lessons Learned: The importance of maintaining an updated implementation plan alongside development progress.
- Progress Tr...
GAME_MAP_OVERVIEW.md.tests/game/test_locations.pyfor testing game functionality.locations.py:GAME_MAP_OVERVIEW.md:tests/game/test_locations.py:Created from VS Code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.