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
@@ -4,6 +4,7 @@ import { CrystalAssets } from "../src/game/rom/assets";
|
||||
import { battleFixtureWorld, ENCOUNTER_WALK, type BattleScenario } from "./battle-fixture";
|
||||
import type { GameWorld } from "../src/game/world/world";
|
||||
import { generatePartyMon, calcStats } from "../src/game/party/pokemon";
|
||||
import { withoutPlayTime } from "./world-driver";
|
||||
|
||||
const romPath = process.env.CRYSTAL_ROM_PATH ?? "Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc";
|
||||
const fixture = (scenario: BattleScenario = "win") =>
|
||||
@@ -161,7 +162,7 @@ describe.skipIf(!existsSync(romPath))("world battle integration with the local R
|
||||
if (world.battle?.message?.prompt) world.interact();
|
||||
else world.tick();
|
||||
}
|
||||
expect(world.save()).toEqual(committed);
|
||||
expect(withoutPlayTime(world.save())).toEqual(withoutPlayTime(committed));
|
||||
world.restore(committed);
|
||||
expect(world.battle).toBeUndefined();
|
||||
expect(world.save()).toEqual(committed);
|
||||
|
||||
Reference in new issue
Block a user