Finish the opening milestone's switching, items and acceptance run

- Decode evolution lists from the ROM; all 251 match the pinned PRET source.
- Compare CalcMonStats and CalcExpAtLevel against the original routines in
  the reference emulator.
- Add a continuous opening playthrough from the intro to the catching
  tutorial, reloading a JSON save after every stage.
- Port player switching in battle: the PKMN menu, forced choices after a
  faint, Shift mode's offer and double faints, with the original texts.
- Port HP and status healing items in battle through the ROM's ItemEffects,
  HealingHPAmounts and StatusHealingActions tables.
- Add the battle party menu and the Items pocket to the UI.

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:04:11 +02:00
1 parent eb03a20d8f
commit f8e0f9c65a
20 files changed
+1902 -96

No files matched your search

+9 -3
View File
@@ -241,7 +241,7 @@ export interface BattleView {
/** A choice the battle is waiting for, if any. */
prompt?: Extract<
BattleEffect,
{ kind: "action" | "yesno" | "forget" | "stats" | "name" }
{ kind: "action" | "yesno" | "forget" | "stats" | "name" | "party" }
>;
/** Yes/No cursor, as on the original boxes. */
selected: 0 | 1;
@@ -2346,10 +2346,15 @@ export class GameWorld {
return;
this.pumpBattle(name);
}
/** Answer a battle Yes/No (1/0) or the move to forget (0-3, 4 cancels). */
/** Answer a battle Yes/No (1/0), the move to forget (0-3, 4 cancels)
* or a party menu (a party index, or -1 to go back). */
battleChoose(answer: number) {
const prompt = this.battle?.prompt;
if (prompt?.kind === "yesno" || prompt?.kind === "forget")
if (
prompt?.kind === "yesno" ||
prompt?.kind === "forget" ||
prompt?.kind === "party"
)
this.pumpBattle(answer);
}
/** A in battle: continue a prompt message, confirm Yes/No or the stat box. */
@@ -2366,6 +2371,7 @@ export class GameWorld {
const prompt = view.prompt;
if (prompt?.kind === "yesno") return this.pumpBattle(0);
if (prompt?.kind === "forget") return this.pumpBattle(4);
if (prompt?.kind === "party" && prompt.cancel) return this.pumpBattle(-1);
if (prompt?.kind === "stats") return this.pumpBattle();
if (!prompt && view.message?.prompt) this.pumpBattle();
}