Add the TM/HM pocket, Egg screens and Violet's remaining scripts
Checks / web (push) Canceled after 0s

The pack's TM/HM pocket lists TMs and HMs with their moves, gives TMs and teaches either through the ABLE/NOT ABLE party menu, the compatibility and "already knows" checks and LearnMove; a TM is used up and makes the Pokémon happier. Eggs show no level or HP in the party menus, get the Egg stats page with its hatching hint, and are skipped by HealParty. Bug Catcher Wade's number registers (VAR_CALLERID and RandomPhoneMon).

The playthrough now runs through Falkner's ZEPHYRBADGE, the Togepi Egg, Kyle's Onix, Flash in Dark Cave, Wade's number and Earl's blackboard. With MAKE_TEST_SAVES it writes a Violet City backup for the manual checks.

Validated with 610 unit tests, 157 browser tests (including all 256 badge bytes against the original BadgeStatBoosts), native/reference builds and reference/vendor/release checks. Egg hatching (#29) and trainer calls (#30) remain on their cards.

Closes #31

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 16:49:02 +02:00
1 parent 7909302db1
commit 73022b1505
13 files changed
+803 -31

No files matched your search

+13
View File
@@ -399,6 +399,19 @@ export class PokemonData {
const bank = r.byte(SYMBOLS.picsBanks + r.byte(entry) - (pics1 - 0x36));
return decompress(r, r.address(bank, r.word(entry + 1)), 0x2000);
}
/** EggPic (5x5 tiles) in the 7x7 box, as GetFrontpic loads it for EGG,
* with PokemonPalettes' EGG entry. */
eggPic(): Uint8Array {
const tiles = decompress(this.reader, SYMBOLS.eggPic, 0x2000);
if (tiles.length < 25 * 16) throw new Error("Picture data is truncated.");
const padded = new Uint8Array(49 * 16);
for (let column = 0; column < 5; column++)
padded.set(tiles.slice(column * 80, (column + 1) * 80), ((column + 1) * 7 + 2) * 16);
return padded;
}
eggPalette(): Palette {
return this.middleColors(SYMBOLS.pokemonPalettes + 0xfd * 8);
}
/** Front picture tiles, padded into the 7x7 box as PadFrontpic does:
* column-major, bottom-aligned, with a blank left column for 5 and 6. */
frontPic(species: number): Uint8Array {
+17
View File
@@ -59,6 +59,7 @@ export const SYMBOLS = {
caughtAskNicknameText: 0x4db44,
stringEgg: 0xe035,
tmhmMoves: 0x1167a,
eggPic: 0x151caf,
nicknameStrings: 0x11780,
rivalNameString: 0x117c3,
rivalDefaultName: 0xc2b2,
@@ -129,6 +130,7 @@ export const SPECIAL_ROUTINES = {
reloadSpritesNoPalettes: 0xd91,
healParty: 0xc658,
healMachineAnim: 0x12324,
randomPhoneMon: 0x2a567,
checkPokerus: 0xc419,
stubbedTrainerRankingsHealings: 0x1060a2,
warpToSpawnPoint: 0x97c28,
@@ -423,6 +425,12 @@ export const STATS = {
"LoadGreenPage.Move": 0x4e1a9,
IDNoString: 0x4e21e,
OTString: 0x4e222,
EggString: 0x4e3c0,
FiveQMarkString: 0x4e3c4,
EggSoonString: 0x4e3ca,
EggCloseString: 0x4e3fd,
EggMoreTimeString: 0x4e43d,
EggALotMoreTimeString: 0x4e46e,
TypeNames: 0x5097b,
} as const;
@@ -512,6 +520,15 @@ export const PC = {
* outside battle: menu data, strings and texts, keyed by their PRET labels
* so that \`npm run check:reference\` can verify each address by name. */
export const MENU = {
"Pack.MenuData_1": 0x1012c,
"Pack.MenuData_2": 0x10143,
BootedTMText: 0x2c8bf,
BootedHMText: 0x2c8c4,
ContainedMoveText: 0x2c8c9,
TMHMNotCompatibleText: 0x2c8ce,
"KnowsMove.KnowsMoveText": 0xfa06,
"PlacePartyMonTMHMCompatibility.string_able": 0x50221,
"PlacePartyMonTMHMCompatibility.string_not_able": 0x50226,
"StartMenu.Items": 0x126eb,
PartyMenuStrings: 0x504d2,
MonMenuOptionStrings: 0x24caf,