제한 시간 보정: 같은 단계의 채팅은 준 시간을 유지, 대표자 마감은 실제 답할 사람 기준, 바뀐 마감은 항상 화면에 전달; 이의있음! 재선택 창은 같은 후보여도 이의있음! 화면 뒤에
- room: reveal을 단계(마감·답할 사람·시간 재는 사람)가 바뀔 때만 새로 시작, clockExtra(대표자는 답할 사람들 중 가장 늦은 화면 기준), 마지막으로 보낸 마감(sentDeadline)과 비교해 deadline 메시지 - 증강 윷놀이 AugSelect: 고를 때마다 새 키(같은 후보 재추첨도 새 창), 열림 조건에 !blocked, 고르는 중(pending)엔 자동으로 안 열림 - 테스트: 오목 마감 연장 전달, 라이어식 공통 단계(대표자 A·답할 사람 B·채팅), e2e 같은 후보 재선택·화면 타이머 = 서버 마감 - e2e 매지컬 애슬릿: 주사위·이동을 다 보여 준 뒤 다음 선택이 나와 한 판이 길어져 시간 한도 420초 → 900초 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -334,15 +334,20 @@ export function AugSelect({ v, act, pending, players, blocked = false }: { v: Yu
|
||||
const [choice, setChoice] = useState<AugId | null>(null);
|
||||
const [target, setTarget] = useState<AugId | ''>('');
|
||||
const mine = sel.offers.length > 0 && sel.picksLeft > 0;
|
||||
const key = sel.offers.join(',');
|
||||
// The window belongs to one set of offers: new offers (혼돈 mode's second pick, the 이의있음! redo) start closed.
|
||||
// One key per set of offers to pick from. Picking (or the turn to pick coming back) starts a new one, so an
|
||||
// 이의있음! redo that happens to deal the very same offers still counts as new.
|
||||
const epoch = useRef({ mine, n: 0 });
|
||||
if (mine && !epoch.current.mine) epoch.current.n += 1;
|
||||
epoch.current.mine = mine;
|
||||
const key = `${epoch.current.n}|${sel.offers.join(',')}`;
|
||||
// The window belongs to one key; it never shows while the 이의있음! call is up (`blocked`).
|
||||
const [openKey, setOpenKey] = useState<string | null>(null);
|
||||
const open = mine && openKey === key;
|
||||
const open = mine && openKey === key && !blocked;
|
||||
const setOpen = (on: boolean) => setOpenKey(on ? key : null);
|
||||
// New offers open the window by themselves, but only after the board has stopped moving (the last move's hop)
|
||||
// and the 이의있음! call is gone (`blocked`), so nothing pops up over an animation.
|
||||
// and the 이의있음! call is gone, so nothing pops up over an animation.
|
||||
const [autoKey, setAutoKey] = useState<string | null>(mine ? key : null);
|
||||
const ready = useMotionSettled(mine && autoKey === key && !blocked);
|
||||
const ready = useMotionSettled(mine && autoKey === key && !blocked && !pending);
|
||||
useEffect(() => {
|
||||
setChoice(sel.forced);
|
||||
setTarget('');
|
||||
@@ -369,6 +374,9 @@ export function AugSelect({ v, act, pending, players, blocked = false }: { v: Yu
|
||||
if (!choice || (needTarget && !target)) return;
|
||||
act({ type: 'AUG_PICK', aug: choice, ...(needTarget ? { target } : {}) });
|
||||
haptic(30);
|
||||
// Whatever comes next (my second pick, an 이의있음! redo, even with the same offers) opens as a new window.
|
||||
epoch.current.n += 1;
|
||||
setOpenKey(null);
|
||||
};
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user