feat: Add all 50 Gen 1 TMs + tests to restore coverage above 80% - #11
Merged
Conversation
Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new mechanics for HM/TM system and fishing
feat: HM/TM system, fishing mechanic, Master Ball, and Route 21
Mar 12, 2026
…AM EATER, TRI ATTACK) Co-authored-by: MobyNL <59473010+MobyNL@users.noreply.github.com>
Copilot
AI
changed the title
feat: HM/TM system, fishing mechanic, Master Ball, and Route 21
feat: Full Gen 1 TM set (TM01–TM50) + 4 missing moves
Mar 12, 2026
…n, panel_mixin Add new pytest test classes to four test files: - tests/game/test_advanced_systems.py TestTeachMoveExtra, TestUseHmFieldExtra, TestFieldSurfExtra, TestFieldFlyExtra, TestFieldCutExtra, TestFieldStrengthExtra, TestFieldFlashExtra — covers hm_tm_system.py 72% → 99% - tests/battle/test_battle_mixin.py RealDisplayTerminal, TestRealBattleDisplayMethods, TestThrowDifferentBalls, FaintableTerminal, TestPotionPlayerFaint, TestEndOfTurnEffects, TestSwitchMenuStringEntry, TestExecuteSwitchFaintPath, TestExecuteFaintSwitch, TestQueueMoveLearnNew, TestResumeMoveLearnBranches, EvolutionExceptionTerminal, TestQueueEvolutionException, TestResumeAfterEvolutionTrainerNextEmpty — covers battle_mixin.py 76% → 99% - tests/ui/test_game_flow_mixin.py ExtendedFlowTerminal, TestShowMainMenuCallsActionPanel, TestConfirmOverwriteDispatch, TestFaintSwitchDispatch, TestPcDispatchReturnsToCenter, TestLearnMoveChoiceDispatch, TestSafeExitWithLockFile, TestPromptForQuit, TestConfirmQuitFailedSave, TestSaveCurrentGameFlow, TestPerformSave — covers game_flow_mixin.py 76% → 99% - tests/ui/test_panel_mixin.py TestShowFaintSwitchPanel, TestShowPokemonSwitchPanel, TestShowPcMainPanel, TestShowPcDepositPanel, TestShowPcWithdrawPanel — covers panel_mixin.py 65% → 84% All 1701 tests pass. Ruff format + check clean. CodeQL: 0 alerts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot
AI
changed the title
feat: Full Gen 1 TM set (TM01–TM50) + 4 missing moves
feat: Add all 50 Gen 1 TMs + tests to restore coverage above 80%
Mar 12, 2026
MobyNL
approved these changes
Mar 12, 2026
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.
Only 7 of the 50 Gen 1 TMs existed in
ITEM_DATA, and the new TM entries exposed four source files below the 80% coverage gate.New moves (
move_data.py)Four moves required by TMs were missing from the database:
Full TM catalogue (
items.py)Replaced the 7-entry stub with all 50 Gen 1 TMs (
TM01–TM50). Each entry hascat=CAT_TM(consumed on use) and amovekey pointing to a validated name inMOVES.Coverage fixes (4 files below 80%)
hm_tm_system.pyui/battle_mixin.pyui/game_flow_mixin.pyui/panel_mixin.pyTests added across
test_advanced_systems.py,test_battle_mixin.py,test_game_flow_mixin.py, andtest_panel_mixin.pycovering:teach_moveerror/dict-normalisation paths;_field_surf/fly/cut/strength/flashbranchesexecute_faint_switch,_queue_move_learn,_resume_after_move_learn, evolution-pending/resume branches inBattleMixinlearn_move_choiceflow,safe_exitwith lock-file,prompt_for_quit,failed_save_quitpaths inGameFlowMixinshow_faint_switch_panel,show_pokemon_switch_panel,show_pc_*_panelmethods inPanelMixinOriginal prompt
Created from VS Code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.