Pokémon that levelled up evolve after a won battle, following EvolveAfterBattle's checks over the ROM's evolution bytes, with the evolution screen that B can stop and move learning outside battle. The pack uses Rare Candy, stones (with ABLE/NOT ABLE labels) and vitamins, and its pocket tabs now sit in their own row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1af2beacdc
commit
45275ba83b
19 files changed
+1032
-39
No files matched your search
@@ -9,7 +9,10 @@ test.beforeEach(() =>
|
||||
test.skip(!existsSync(romPath), "Requires the local user ROM."),
|
||||
);
|
||||
|
||||
async function start(page: Page, room: boolean | "poster" | "center" = false) {
|
||||
async function start(
|
||||
page: Page,
|
||||
room: boolean | "poster" | "center" | "candy" = false,
|
||||
) {
|
||||
await page.route("**/src/game/runtime.ts", async (route) => {
|
||||
const response = await route.fetch(),
|
||||
source = await response.text();
|
||||
@@ -239,3 +242,37 @@ test("Start opens the start menu: SWITCH reorders the party and the pack tosses
|
||||
]);
|
||||
expect(state.bag.items).toEqual([{ item: 18, quantity: 4 }]);
|
||||
});
|
||||
|
||||
test("a Rare Candy levels up and evolves a Pokémon through the pack", async ({
|
||||
page,
|
||||
}) => {
|
||||
await start(page, "candy");
|
||||
const text = page.locator("#dialogue-text"),
|
||||
choices = page.locator("#dialogue-choice"),
|
||||
pack = page.locator("#mart");
|
||||
await page.keyboard.press("Enter");
|
||||
await choices.getByRole("option", { name: /^PACK/ }).click();
|
||||
await pack.getByRole("button", { name: /RARE CANDY/ }).click();
|
||||
await choices.getByRole("option", { name: "USE", exact: true }).click();
|
||||
await choices.getByRole("option", { name: /^CYNDAQUIL/ }).click();
|
||||
await expect(text).toContainText("grew to");
|
||||
await page.keyboard.press("KeyX");
|
||||
await expect(text).toContainText("ATTACK");
|
||||
await page.keyboard.press("KeyX");
|
||||
await expect(text).toContainText("is evolving!");
|
||||
await page.clock.runFor(1500);
|
||||
await expect(page.locator("#pokepic")).toBeVisible();
|
||||
await page.clock.runFor(8000);
|
||||
await expect(text).toContainText("Congratulations!");
|
||||
await page.keyboard.press("KeyX");
|
||||
await expect(text).toContainText("QUILAVA!");
|
||||
await page.keyboard.press("KeyX");
|
||||
await expect(pack).toHaveAttribute("aria-label", "Pack");
|
||||
await pack.getByRole("button", { name: "BACK", exact: true }).click();
|
||||
await choices.getByRole("option", { name: /^EXIT/ }).click();
|
||||
await page.clock.runFor(500);
|
||||
await expect(page.locator("#game-notice")).toHaveText("");
|
||||
const { state } = await backup(page);
|
||||
expect([state.party[0].species, state.party[0].level]).toEqual([156, 14]);
|
||||
expect(state.bag.items).toEqual([{ item: 18, quantity: 5 }]);
|
||||
});
|
||||
Reference in new issue
Block a user