Port the remaining battle items, the stats screen and hBattleTurn at the menu

- Run every non-ball item effect usable in battle from the ROM's
  ItemEffects: Full Restore, revives, bitter medicine, Bitter Berry, Ethers
  and Elixers, X items, X Accuracy, Guard Spec, Dire Hit and Poké Doll.
- Read happiness changes from HappinessChanges, including the larger
  level-up gain where a Pokémon was caught.
- Model hBattleTurn at the battle menu, including the trainer AI's writes,
  and drop the status-heal refusal.
- Port the stats screen for battles and Bill's PC.
- Compare the send-out and withdraw texts, RestoreHealth, RestorePP,
  ChangeHappiness and CalcPlayerStats with the original routines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-30 11:24:55 +02:00
1 parent cfd083c16d
commit b13e09ec20
22 files changed
+1547 -171

No files matched your search

+35
View File
@@ -320,6 +320,23 @@ export const INTRO = {
"GetTimeOfDayString.day_string": 0x90b7b,
} as const;
/** The Pokémon stats screen's strings and the type names, keyed by their
* PRET labels so that \`npm run check:reference\` can verify each address. */
export const STATS = {
"LoadPinkPage.Status_Type": 0x4e119,
"LoadPinkPage.OK_str": 0x4e127,
"LoadPinkPage.ExpPointStr": 0x4e12b,
"LoadPinkPage.LevelUpStr": 0x4e136,
"LoadPinkPage.ToStr": 0x4e13f,
"LoadPinkPage.PkrsStr": 0x4e142,
"LoadGreenPage.Item": 0x4e1a0,
"LoadGreenPage.ThreeDashes": 0x4e1a5,
"LoadGreenPage.Move": 0x4e1a9,
IDNoString: 0x4e21e,
OTString: 0x4e222,
TypeNames: 0x5097b,
} as const;
/** Pokémon Center and house PCs, Bill's PC and Oak's PC: routines, menu
* data, strings and texts, keyed by their PRET labels so that
* \`npm run check:reference\` can verify each address by name. */
@@ -495,6 +512,24 @@ export const BATTLE = {
ItemCantUseOnEggText: 0xf810,
OakThisIsntTheTimeText: 0x10af3,
UseOnWhichPKMNString: 0x504f3,
FullRestoreEffect: 0xf128,
ReviveEffect: 0xf0c8,
RevivalHerbEffect: 0xf0a9,
EnergypowderEffect: 0xf18c,
EnergyRootEffect: 0xf190,
HealPowderEffect: 0xefad,
BitterBerryEffect: 0xf16a,
RestorePPEffect: 0xf5bf,
XItemEffect: 0xf4c5,
XAccuracyEffect: 0xf482,
GuardSpecEffect: 0xf4ab,
DireHitEffect: 0xf4b8,
PokeDollEffect: 0xf48f,
XItemStats: 0xf504,
HappinessChanges: 0x7221,
ItemLooksBitterText: 0xf80b,
RestoreThePPOfWhichMoveText: 0xf72a,
PPRestoredText: 0xf739,
HungOnText: 0x80e99,
HurtByBurnText: 0x807f8,
HurtByPoisonText: 0x807e2,