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:
1 parent
e00dfab42e
commit
7c1c0cc45b
8 files changed
+282
-5
No files matched your search
+14
-1
@@ -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.
|
||||
+7
-1
@@ -75,7 +75,13 @@ The emulator-backed prototype is now at `/reference.html`. The default applicati
|
||||
- Hidden items (`BGEVENT_ITEM`) run `HiddenItemScript`.
|
||||
- Route 30 and its Berry house are enabled. Mr. Pokémon's house and Route 31 stay closed; Youngster Joey (after the Egg) needs phone registration and stays hidden until then, as in the original.
|
||||
- A refused trainer script does not restart until the player moves, so a rollback cannot trap the player in a trainer's sight.
|
||||
- A local stress run of 1,080 Route 30 battles (three starters, four levels, three times of day, both trainers and wild encounters) found one refusal: Chikorita's Reflect at level 12 (`screen`, not yet ported).
|
||||
- A local stress run of 1,080 Route 30 battles (three starters, four levels, three times of day, both trainers and wild encounters) found one refusal: Chikorita's Reflect at level 12 (`screen`), now addressed by the screen increment below.
|
||||
|
||||
## Implemented: Reflect and Light Screen
|
||||
|
||||
- Both moves execute their ROM effect scripts, set independent five-turn counters and fail without refreshing an active screen. The setup turn counts toward expiration.
|
||||
- Screens persist across enemy send-outs and expire in the original non-Link order, with ROM messages. Physical/special defenses and critical-hit stage rules use the existing damage path.
|
||||
- Local-ROM regressions cover both sides, repeated use and PP, concurrent durations, send-out persistence, expiration order and damage stats. These checks are not an emulator comparison of the screen routines.
|
||||
|
||||
## In progress: native battles
|
||||
|
||||
|
||||
@@ -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.
|
||||
Reference in new issue
Block a user