Move items with Select and browse the party's moves

In the start menu's pack, Select marks an item and asks where it should
go; A or Select on another row moves it there, merging stacks of the
same item unless either holds 99, and B ends the move. The packs that
GIVE and the PC open ignore Select, as in the original.

Left and right on the MOVE screen show the previous or next party
member's moves, skipping Eggs, unless a move is being moved.

Part of #27

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-10-03 00:56:51 +02:00
1 parent 397dcef44c
commit e2dc5ba520
9 files changed
+362 -34

No files matched your search

+15 -5
View File
@@ -302,8 +302,9 @@ when fewer than `NUM_MONMENU_ITEMS` are listed; the strings come from
`MonMenuOptionStrings` and move names. `SwitchPartyMons`/`_SwitchPartyMons`
swap two party entries. `MoveScreenLoop` swaps two moves and their PP; the
original's flag-dependent write into `wBattleMon` after a swap outside
battle is not modelled (the next battle reloads that structure), and left
and right do not move to another Pokémon's moves. `GiveTakePartyMonItem`,
battle is not modelled (the next battle reloads that structure). Its left
and right (`.cycle_left`, `.cycle_right`) arrive as "left" and "right"
answers of a `menu` effect with `sides`. `GiveTakePartyMonItem`,
`TryGiveItemToPartymon` (including the swap and the full-pack refund) and
`TakePartyItem` use `GiveItemToPokemon`/`ReceiveItemFromPokemon` on the
chosen pack slot. Giving MAIL needs `ComposeMailMessage` and is refused
@@ -348,6 +349,13 @@ while the menu is open. A Chromium/WebKit test opens the menu with Start,
switches Pokémon, changes pockets and tosses a Potion. These are not
emulator comparisons.
`Pack_InterpretJoypad`'s Select runs `SwitchItemsInBag` on the bag
(`.try_combining_stacks`, `.combine_stacks`, `.above` and `.below`) through
a `select:` answer of the `pack` effect, which shows the moving entry
(`wSwitchItem`) and `AskItemMoveText`; the original's CANCEL row is the
pack's BACK. The cursor now stays on the last row chosen while the pack is
open.
`DoRepelStep` runs in the world where `CountStep` calls it, after
`CheckSpecialPhoneCall`; the poison, happiness, egg, Day-Care and bike
steps of `CountStep` are not ported yet. `RepelWoreOffScript` starts with
@@ -385,10 +393,12 @@ the keys (a start-menu run with the unopened maps' positions) and the
Squirtbottle (the interpreter facing a test Sudowoodo on Route 36),
`Fish` against the Shore tables, a bite, no bite and no fish in New Bark
Town with the poses and the bubble, the surf and water refusals, and the
Magikarp DV filters. `tests/reference-parity.spec.ts` compares
Magikarp DV filters. `tests/start-menu.test.ts` moves and merges items
with Select (keys included, and none in GIVE's pack) and steps through the
party on the MOVE screen past an Egg. `tests/reference-parity.spec.ts` compares
`magikarpLength` with `CalcMagikarpLength` in the reference emulator over
1,509 DV and ID pairs. A Chromium/WebKit test hooks a Magikarp with the
Old Rod; the four fishing directions were checked in close-up
1,509 DV and ID pairs. Chromium/WebKit tests hook a Magikarp with the
Old Rod and move a Potion below a Rare Candy with the keyboard's Select; the four fishing directions were checked in close-up
screenshots, not against the original.
## Evolution