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

+8 -3
View File
@@ -181,9 +181,14 @@ export function validPartyMon(
!integer(mon.hp, 0, mon.stats[0])
)
return false;
// Stored stats must be the ones the game would calculate.
const stats = calcStats(data, mon.species, mon.dvs, mon.level, mon.statExp);
return stats.every((stat, index) => stat === mon.stats[index]);
// GiveExperiencePoints awards stat experience after every victory, but
// CalcMonStats only runs on a level-up (or a later PC recalculation).
// Preserve legitimate pending gains instead of silently applying them on
// load. Stored stats must stay inside the ROM-derived possible range.
const minimum = calcStats(data, mon.species, mon.dvs, mon.level);
const maximum = calcStats(data, mon.species, mon.dvs, mon.level, mon.statExp);
return mon.stats.every((stat, index) =>
stat >= minimum[index] && stat <= maximum[index]);
} catch {
return false;
}