Integrate battles with the overworld UI and validate browser flows
Checks / web (push) Canceled after 0s

- Drive wild battles through the real UI in Chromium and WebKit using a
  test-only encounter fixture: victory with level-up, escape, whiteout,
  mid-battle backup restore and unsupported-effect rollback.
- Add keyboard and on-screen D-pad navigation for battle menus.
- Accept pending stat experience in saves (awarded without CalcMonStats).
- Commit whiteout healing, money loss and destination callbacks together;
  aborted scripts restore state and map.
- Give long notices their own status-bar row on narrow screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-23 16:37:07 +02:00
1 parent c08d250cf6
commit 11d1153802
11 files changed
+462 -13

No files matched your search

+30
View File
@@ -100,3 +100,33 @@ opening scenes. Audit Route 29 callbacks, scripts and unsupported destinations
before enabling it. Then test wild encounters and battle controls through the
browser, including win, escape, loss and save/reload, and reconcile the roadmap
with the verified behavior.
## Battle integration increment: 2026-09-23 (resumed from Codex)
Codex committed and pushed `c08d250`, then stopped mid-increment with the
keyboard/D-pad battle test failing. Claude Code completed it:
- Browser battle flows run through the real UI via `tests/battle-fixture.ts`
(encounter selection only; production maps stay gated): win with level-up and
Smokescreen, escape, whiteout, keyboard/D-pad menus, mid-battle backup restore
and unsupported-effect rollback. `tests/battle-world.test.ts` covers the same
at world level, plus pending stat experience and whiteout callback rollback.
- Saves accept stored stats between the no-stat-exp and full-stat-exp values,
since `GiveExperiencePoints` awards stat experience without `CalcMonStats`.
- A script warp (e.g. whiteout) validates its destination and commits healing,
money loss and destination callbacks together; aborts restore state and map.
- Keyboard and on-screen D-pad navigate battle menus (`battle-selected`); A
continues messages, B leaves the move list.
- Fixed a phone-width layout bug: a long notice sat in the Play button's auto
grid column and crushed the status text, pushing the game panel off-screen.
Below 720px the notice now has its own row.
- Test fixes: the navigation test now presses A through the intro message, and
uses a real pointer click on the D-pad (synthetic pointer events cannot be
captured).
Final checks: 82 unit tests with the local ROM (55 passed, 27 skipped without
it); 36 Chromium/WebKit browser tests; native and reference builds; release,
vendor and reference checks; `git diff --check`. Not committed.
Next: Route 29 (`24:3`) scripts, catching tutorial and items before enabling it;
then capture, switching and PACK in battle.