OPTION in the start menu runs _Option with the ROM's labels and settings, OptionsControl's cursor wrapping and each option's bit handling. The four option bytes live in the script state and saves, defaulting to DefaultOptions. The battle style now decides whether a trainer's next Pokémon brings an offer to switch, and the menu account whether the start menu describes its items; the other settings are kept for later. Closes #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
47698565ab
commit
c4cc0e756c
19 files changed
+732
-21
No files matched your search
@@ -388,6 +388,49 @@ test("the trainer card turns to the badges and back", async ({ page }) => {
|
||||
await expect(page.locator("#game-notice")).toHaveText("");
|
||||
});
|
||||
|
||||
test("the options change the battle style and the menu account", async ({
|
||||
page,
|
||||
}) => {
|
||||
await start(page, "pokegear");
|
||||
const choices = page.locator("#dialogue-choice"),
|
||||
screen = page.locator("#options"),
|
||||
list = page.locator("#options-list");
|
||||
await page.keyboard.press("Enter");
|
||||
await expect(choices).toContainText("Party Pokémon status");
|
||||
await choices.getByRole("option", { name: /^OPTION/ }).click();
|
||||
await expect(screen).toBeVisible();
|
||||
await expect(page.locator("#native-dialogue")).toBeHidden();
|
||||
await expect(list.locator('[aria-current="true"]')).toContainText(
|
||||
"TEXT SPEED",
|
||||
);
|
||||
await page.keyboard.press("ArrowDown");
|
||||
await page.keyboard.press("ArrowDown");
|
||||
await page.keyboard.press("ArrowRight");
|
||||
await expect(list.locator('[aria-current="true"]')).toHaveText(
|
||||
"BATTLE STYLESET",
|
||||
);
|
||||
await page.keyboard.press("ArrowDown");
|
||||
await page.keyboard.press("ArrowDown");
|
||||
await page.keyboard.press("ArrowDown");
|
||||
await page.keyboard.press("ArrowLeft");
|
||||
await expect(list.locator('[aria-current="true"]')).toHaveText(
|
||||
"MENU ACCOUNTOFF",
|
||||
);
|
||||
await page.keyboard.press("KeyZ");
|
||||
await expect(screen).toBeHidden();
|
||||
await expect(choices).not.toContainText("Party Pokémon status");
|
||||
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.options).toEqual({
|
||||
options: 3 | (1 << 6),
|
||||
textboxFrame: 0,
|
||||
printerBrightness: 0x40,
|
||||
options2: 0,
|
||||
});
|
||||
});
|
||||
|
||||
test("Mom keeps the player's money with the digit box", async ({ page }) => {
|
||||
await start(page, "mom");
|
||||
const text = page.locator("#dialogue-text"),
|
||||
|
||||
Reference in new issue
Block a user