Port Reflect and Light Screen

BattleCommand_Screen and HandleScreens run natively. Each side owns
independent five-turn counters that include the setup turn, do not
refresh on repeated use and survive enemy send-outs. Screens expire in
the original non-Link order with ROM messages; the existing damage path
already doubles the right defense and keeps the critical/stage rule.
This closes the only refusal found by the Route 30 stress run
(Chikorita's Reflect).

The NPC movement test now reads the ROM in beforeAll, so it skips
cleanly without one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-24 19:38:13 +02:00
1 parent e00dfab42e
commit 7c1c0cc45b
8 files changed
+282 -5

No files matched your search

+23
View File
@@ -226,3 +226,26 @@ builds; reference, release and vendor checks; `git diff --check`. Not committed.
Next: Mr. Pokémon's house (Oak, Pokédex, Mystery Egg) and the return to Elm;
Reflect/Light Screen; then Smart AI before the rival. Joey (after the Egg)
needs `askforphonenumber` and the phone standard scripts.
## Reflect and Light Screen: 2026-09-24
Completed the battle gap found in the Route 30 stress run. `screen` now runs
both moves from ROM effect scripts. Independent five-turn counters include
the setup turn, do not refresh on repeated use, survive enemy send-outs and
expire with ROM text in `HandleScreens` order. The existing damage path handles
physical/special defense and critical stage rules.
Seven new local-ROM regressions cover player and enemy use, PP on failure,
concurrent durations, expiration order, send-out persistence and damage stats.
Also moved the NPC test's eager ROM read into `beforeAll`, restoring its
intended skip behavior when no ROM is available.
Checks: 167 unit tests with the local ROM; 76 passed and 91 skipped without it;
44 Chromium/WebKit browser tests; native and reference builds; reference,
release and vendor checks; `git diff --check`. Screen routines were reviewed
against pinned PRET source, not compared by executing the original routines.
Changes are uncommitted.
Next: Mr. Pokémon's house and the Mystery Egg; Smart AI before enabling the
rival; capture and the catching tutorial. Joey's post-Egg phone scripts remain
unsupported.