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
@@ -104,6 +104,21 @@ export function initialMoves(
|
||||
return moves as PartyMon["moves"];
|
||||
}
|
||||
|
||||
/** SetCaughtData (SetBoxmonOrEggmonCaughtData): time of day and level,
|
||||
* then the player's gender bit and the map's landmark. */
|
||||
export function caughtData(
|
||||
timeOfDay: number,
|
||||
level: number,
|
||||
gender: number,
|
||||
landmark: number,
|
||||
): number {
|
||||
return (
|
||||
(((((timeOfDay + 1) & 3) << 6) | level) & 0xff) << 8 |
|
||||
(gender << 7) |
|
||||
landmark
|
||||
);
|
||||
}
|
||||
|
||||
/** GeneratePartyMonStats for a Pokémon given by a script (not a wild or
|
||||
* trainer battle): random DVs, level-up moves, full PP and HP. */
|
||||
export function generatePartyMon(
|
||||
|
||||
Reference in new issue
Block a user