Port the trainer card and the play time
The player's name in the start menu opens TrainerCard: page 1 with the name, ID, money, Pokédex count and play time, page 2 with the Johto leaders and the badges owned, turned and closed with the original buttons. The card picture, leader faces and animated badges come from the ROM with _CGB_TrainerCard's palettes. GameTimer now counts the play time from the end of the introduction, capped at 999:59:59, and saves keep it. Closes #23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
38b9562bd3
commit
47698565ab
24 files changed
+954
-30
No files matched your search
@@ -6,6 +6,7 @@ import { OW } from "../src/game/world/constants";
|
||||
import { trainerFixtureWorld } from "./trainer-fixture";
|
||||
import { migrateSave, type GameWorld } from "../src/game/world/world";
|
||||
import { DecorationData } from "../src/game/world/decorations";
|
||||
import { withoutPlayTime } from "./world-driver";
|
||||
|
||||
const romPath = process.env.CRYSTAL_ROM_PATH ?? "Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc";
|
||||
|
||||
@@ -208,7 +209,7 @@ describe.skipIf(!existsSync(romPath))("scripted trainer world transactions", ()
|
||||
world.interact();
|
||||
finish(world);
|
||||
expect(world.notice).toContain("not been ported");
|
||||
expect(world.save()).toEqual(before);
|
||||
expect(withoutPlayTime(world.save())).toEqual(withoutPlayTime(before));
|
||||
});
|
||||
|
||||
it("restores a midbattle save without partially paying the reward", () => {
|
||||
@@ -219,7 +220,7 @@ describe.skipIf(!existsSync(romPath))("scripted trainer world transactions", ()
|
||||
if (world.battle?.message?.prompt) world.interact();
|
||||
else world.tick();
|
||||
}
|
||||
expect(world.save()).toEqual(before);
|
||||
expect(withoutPlayTime(world.save())).toEqual(withoutPlayTime(before));
|
||||
world.restore(before);
|
||||
expect(world.battle).toBeUndefined();
|
||||
expect(world.save()).toEqual(before);
|
||||
|
||||
Reference in new issue
Block a user