diff --git a/apps/web/src/pages/RoomPage.tsx b/apps/web/src/pages/RoomPage.tsx index 73f6e13..36b82aa 100644 --- a/apps/web/src/pages/RoomPage.tsx +++ b/apps/web/src/pages/RoomPage.tsx @@ -741,12 +741,18 @@ function ResultPanel({ room, me, players, onLeave, onAgain }: { room: RoomView; const allFirst = !solo && result.ranking.length === 1; const won = !solo && !allFirst && result.ranking[0]?.includes(me.id); const lost = !solo && !allFirst && !won && result.ranking.some((g) => g.includes(me.id)); + // 사건 파일 함께 풀기: everyone who stayed shares one rank, so it is solved or not rather than a draw. + const coop = room.gameId === 'case-file' && (room.options as { mode?: string }).mode !== 'race' && result.reason === 'normal' && !!result.ranking[0]?.includes(me.id); + const coopSolved = coop && Object.values(result.scoreText ?? {}).some((t) => t.includes('해결') && !t.includes('미해결')); useEffect(() => { if (played.current) return; played.current = true; - if (won) sounds.win(); + if (coop) { + if (coopSolved) sounds.win(); + else sounds.lose(); + } else if (won) sounds.win(); else if (lost) sounds.lose(); - }, [won, lost]); + }, [won, lost, coop, coopSolved]); if (hidden) { return (
{result.summary}
{seatedAll.length > seated.length &&🤖 연습 게임이라 기록에는 남지 않아요.
}