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

+14 -1
View File
@@ -87,4 +87,17 @@ A trainer sighting whose script is refused is not restarted until the player mov
## Next slice
Route 29, Cherrygrove and Route 30 are enabled with item balls, hidden items, fruit trees and the daily reset, the Pokémon Center nurse, the recorded whiteout spawn and map trainers. NPCs roam. Next: Mr. Pokémon's house and the Mystery Egg, capture with the catching tutorial, Reflect/Light Screen, and party, bag and Pokégear menus over the native models. Other specials stay refused until translated.
Route 29, Cherrygrove and Route 30 are enabled with item balls, hidden items, fruit trees and the daily reset, the Pokémon Center nurse, the recorded whiteout spawn and map trainers. NPCs roam. Next: Mr. Pokémon's house and the Mystery Egg, capture with the catching tutorial, and party, bag and Pokégear menus over the native models. Other specials stay refused until translated.
## Reflect and Light Screen
`BattleCommand_Screen` in `engine/battle/effect_commands.asm` and `HandleScreens`
in `engine/battle/core.asm` now run natively. Each screen has a side-owned
five-turn counter, including its setup turn. Repeated use fails without
refreshing it; send-outs preserve it. Expiration runs after defrost, before
healing items, player before enemy and Light Screen before Reflect. Messages
come from the ROM. The existing damage path doubles the appropriate defense
and retains the original critical/stage rule. Safeguard and other screen
flags remain refused. Seven local-ROM tests cover move execution, counters,
PP, damage stats and send-out persistence; no screen-routine emulator parity
or physical-device validation is claimed.