Port capture and the Route 29 catching tutorial
Battle PACK opens the Balls pocket and runs PokeBallEffect: the Poké, Great, Ultra and Master Ball multipliers, the original HP arithmetic (including the overflow above 341 maximum HP), the sleep/freeze bonus (BRN/PSN/PAR add nothing), HELD_CATCH_CHANCE and the catch draw. GetPokeBallWobble draws per shake from WobbleProbabilities and picks the break-free text. Trainer battles block the ball but still use it and the turn. A catch reloads the Pokémon as LoadEnemyMon does (the wild item roll is redrawn, then the item restored), keeps its HP, status, item and DVs, restores the moves and PP it appeared with, adds it to the party with SetCaughtData, registers it and offers a nickname with InitName's default. A catch with six Pokémon needs the PC and is refused. catchtutorial runs BATTLETYPE_TUTORIAL as "DUDE": no send-out, an automatic catch that keeps nothing and prompts that continue on their own. Both Route 29 triggers, declining and the Dude's repeat offer run from the ROM. The text reader now handles TX_LOW. PLAN.md gains a status overview and done/remaining checklists; the README, help dialog, routine map and handoff describe the milestone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc10343520
commit
9ac111f262
20 files changed
+1101
-65
No files matched your search
@@ -289,3 +289,44 @@ Next: capture and the Route 29 catching tutorial (`catchtutorial`), the
|
||||
first remaining refusal in the opening quest. Then the ringing presentation,
|
||||
player switching and items in battle. Joey's post-Egg phone scripts remain
|
||||
unsupported.
|
||||
|
||||
## Capture and the catching tutorial: 2026-09-24
|
||||
|
||||
Continued the roadmap with the first refusal remaining in the opening quest.
|
||||
|
||||
- Battle PACK opens the Balls pocket and runs `PokeBallEffect`: the Poké,
|
||||
Great, Ultra and Master Ball multipliers, the original HP arithmetic
|
||||
(including the overflow above 341 maximum HP), the sleep/freeze bonus
|
||||
(BRN/PSN/PAR add nothing), `HELD_CATCH_CHANCE` and the catch draw.
|
||||
`GetPokeBallWobble` draws per shake from `WobbleProbabilities` and picks
|
||||
the break-free text. Trainer battles block the ball but still use it and
|
||||
the turn. `catchRate` is exported for pure vectors.
|
||||
- A catch reloads the Pokémon as `LoadEnemyMon` does (the wild item roll is
|
||||
redrawn, then the original item restored), keeps HP/status/item/DVs,
|
||||
restores the moves and PP it appeared with, adds it to the party with
|
||||
`SetCaughtData`, registers it and offers a nickname (`InitName` default
|
||||
for blank names). `NewDexDataText` shows when the Pokédex is owned.
|
||||
`caughtData` is now shared with `givepoke`.
|
||||
- `catchtutorial` runs `BATTLETYPE_TUTORIAL`: "DUDE" from the ROM as
|
||||
`<PLAYER>`, no send-out, an automatic catch that keeps nothing, and
|
||||
prompts that continue on their own. Both Route 29 triggers, declining and
|
||||
`CatchingTutorialDudeScript`'s repeat offer run from the ROM.
|
||||
- Text: `TX_LOW` ($05) is read as a line break (`ItemUsedText` needs it).
|
||||
- UI: PACK lists the Balls pocket (B closes it); the in-battle nickname
|
||||
prompt reuses the naming field. The help dialog and README describe the
|
||||
current milestone.
|
||||
- Refused: a catch with six Pokémon (the PC is not ported), other balls,
|
||||
non-ball items in battle and a transformed target.
|
||||
- Stress (local, not committed): 2,160 wild battles, 2,047 catches, no
|
||||
refusals.
|
||||
|
||||
Checks: 207 unit tests with the local ROM (82 passed, 125 skipped without
|
||||
it); 54 Chromium/WebKit browser tests; native and reference builds;
|
||||
reference, release and vendor checks; `git diff --check`. The existing
|
||||
keyboard/D-pad test now steps through the enabled PACK button. No
|
||||
emulator comparison of the capture routines was run. Not committed.
|
||||
|
||||
Next: the PC and boxes (catching with a full party, `SendMonIntoBox`, Bill's
|
||||
call), then player switching and other items in battle, and party and bag
|
||||
menus. The Dude's back picture, ball animation and Pokédex page are not
|
||||
presented.
|
||||
Reference in new issue
Block a user