병합: wt2/g4-party

This commit is contained in:
EJClaw
2026-10-13 13:37:59 +09:00
50 changed files with 1734 additions and 361 deletions

View File

@@ -2469,12 +2469,12 @@ const PLANS: Record<string, Plan> = {
},
},
catchmind: {
// PC host + phone guest, 1 round of 60 s: each player draws once with real mouse strokes; the other sees the strokes
// PC host + phone guest, 1 round with no drawing time limit (무제한): each player draws once with real mouse strokes; the other sees the strokes
// (stroke count + pixels), guesses wrong, gets "아까워요" for a near miss, then the right answer; scores update.
lobby: async (host) => {
await host.getByRole('group', { name: '라운드 수' }).getByRole('button', { name: '1라운드' }).click();
await host.getByRole('group', { name: '그리기 시간' }).getByRole('button', { name: '60초' }).click();
await host.getByText(/^여러 명 맞히기 · 1라운드 · 60초/).first().waitFor();
await host.getByRole('group', { name: '그리기 시간' }).getByRole('button', { name: '무제한' }).click();
await host.getByText(/^여러 명 맞히기 · 1라운드 · 그리기 무제한/).first().waitFor();
},
drive: async (pages) => {
const [host, guest] = pages as [Page, Page];
@@ -2503,7 +2503,10 @@ const PLANS: Record<string, Plan> = {
players: 3,
lobby: async (host) => {
await host.getByRole('group', { name: '설명 바퀴 수' }).getByRole('button', { name: '한 바퀴' }).click();
await host.getByText(/한 바퀴 · 설명 30초/).first().waitFor();
// Every phase without a clock (무제한): the flow below only moves on by what people do.
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
for (const g of ['설명 시간', '토론 시간', '투표 시간', '정답 맞히기 시간']) await host.getByRole('group', { name: g }).getByRole('button', { name: '무제한' }).click();
await host.getByText(/한 바퀴 · 설명 무제한 · 토론 무제한/).first().waitFor();
},
drive: async (pages) => {
const [host, phone] = pages as [Page, Page, Page];
@@ -2601,10 +2604,11 @@ const PLANS: Record<string, Plan> = {
// Night cannot end early (only its clock advances it), so give the night's chat+3 picks ample room under load.
await host.getByRole('group', { name: '밤 시간' }).getByRole('button', { name: '45초' }).click();
await host.getByRole('button', { name: '▼ 자세한 설정' }).click();
await host.getByRole('group', { name: '지목 투표 시간' }).getByRole('button', { name: '10초', exact: true }).click();
// 지목 투표·찬반 투표 무제한: they end as soon as everybody alive has voted.
await host.getByRole('group', { name: '지목 투표 시간' }).getByRole('button', { name: '무제한' }).click();
await host.getByRole('group', { name: '최후의 반론 시간' }).getByRole('button', { name: '10초', exact: true }).click();
await host.getByRole('group', { name: '찬반 투표 시간' }).getByRole('button', { name: '5초', exact: true }).click();
await host.getByText(/밤 45초 · 투표 10초/).first().waitFor();
await host.getByRole('group', { name: '찬반 투표 시간' }).getByRole('button', { name: '무제한' }).click();
await host.getByText(/밤 45초 · 투표 무제한/).first().waitFor();
},
drive: async (pages) => {
const [host, phone] = pages as [Page, Page, Page, Page];
@@ -2667,8 +2671,11 @@ const PLANS: Record<string, Plan> = {
for (const i of [M, P, D]) await mafiaBanner(pages[i]!, '지목 투표', 15_000);
await mafiaPick(pages[P]!, MAFIA_NICKS[M]!);
await pages[P]!.getByRole('timer', { name: '시간 제한 없음' }).waitFor();
await mafiaShots(pages, '3b-vote-unlimited');
await mafiaPick(pages[D]!, MAFIA_NICKS[M]!);
await mafiaPick(pages[M]!, MAFIA_NICKS[P]!);
// The last vote ends the 무제한 vote at once (no pressed state to wait for).
await pages[M]!.locator('button.mf-tile[data-target="ok"]', { has: pages[M]!.locator('.nm', { hasText: new RegExp(`^${MAFIA_NICKS[P]}( \\(나\\))?$`) }) }).click();
await mafiaBanner(host, '최후의 반론', 20_000);
await pages[M]!.locator('.mf-news', { hasText: '지목 투표 결과' }).waitFor();
if (await pages[P]!.getByLabel('전체 채팅 메시지').count()) throw new Error('others can talk during the last defense');
@@ -2677,8 +2684,8 @@ const PLANS: Record<string, Plan> = {
await mafiaShots(pages, '4-defense');
await mafiaBanner(pages[P]!, '찬반 투표', 20_000);
await pages[P]!.getByRole('button', { name: '찬성 (탈락)' }).click();
await pages[D]!.getByRole('button', { name: '찬성 (탈락)' }).click();
await pages[P]!.getByRole('button', { name: '찬성 (탈락)', pressed: true }).waitFor();
await pages[D]!.getByRole('button', { name: '찬성 (탈락)' }).click();
for (const p of pages) await p.getByRole('dialog', { name: '게임 결과' }).waitFor({ timeout: 20_000 });
for (const p of pages) await p.locator('.mf-final', { hasText: '시민 팀 승리' }).waitFor();
@@ -2808,8 +2815,8 @@ const PLANS: Record<string, Plan> = {
// and the refuter see the shown card. After 8 suggestions everybody accuses a guess, so the game ends.
players: 3,
lobby: async (host) => {
await host.getByRole('group', { name: '차례 제한 시간' }).getByRole('button', { name: '30초' }).click();
await host.getByText(/주사위 이동 · 차례 30초/).first().waitFor();
await host.getByRole('group', { name: '차례 제한 시간' }).getByRole('button', { name: '무제한' }).click();
await host.getByText(/주사위 이동 · 차례 시간 무제한/).first().waitFor();
},
drive: async (pages) => {
const [host, guest] = pages as [Page, Page, Page];