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:
1 parent
eb03a20d8f
commit
f8e0f9c65a
20 files changed
+1902
-96
No files matched your search
+10
-1
@@ -2,7 +2,7 @@ import { CrystalAssets } from "../src/game/rom/assets";
|
||||
import { generatePartyMon } from "../src/game/party/pokemon";
|
||||
import { GameWorld } from "../src/game/world/world";
|
||||
|
||||
export type BattleScenario = "win" | "loss" | "unsupported" | "catch";
|
||||
export type BattleScenario = "win" | "loss" | "unsupported" | "catch" | "switch" | "potion";
|
||||
|
||||
/** Test-only encounters on an existing floor: production maps stay gated.
|
||||
* Everything after selection runs through the ROM's real wild-battle script. */
|
||||
@@ -28,7 +28,16 @@ export function battleFixtureWorld(assets: CrystalAssets, scenario: BattleScenar
|
||||
mon.pp = [10, 0, 0, 0];
|
||||
}
|
||||
world.state.party.push(mon);
|
||||
if (scenario === "switch")
|
||||
world.state.party.push(generatePartyMon(assets.pokemon, {
|
||||
species: 158, level: 5, item: 0, otId: world.playerId,
|
||||
ot: "CHRIS", dvs: 0x823b, caughtData: 0,
|
||||
}));
|
||||
if (scenario === "catch") world.state.bag.balls = [{ item: 5, quantity: 10 }]; // POKé BALL
|
||||
if (scenario === "potion") {
|
||||
mon.hp = 3;
|
||||
world.state.bag.items = [{ item: 18, quantity: 1 }]; // POTION
|
||||
}
|
||||
world.state.pokedex.seen.add(155);
|
||||
world.state.pokedex.caught.add(155);
|
||||
world.state.money = 3001;
|
||||
|
||||
Reference in new issue
Block a user