Bring games 9-18 in line with GAMES-NEW.md:
- Library sorts easiest first, filters by category and difficulty; difficulty 5
  shows a Nightmare chip, and a no-hint finish earns Nightmare Survivors.
- Time limits end on "Out of time" (no rank); Deep Lab Nereid's countdown is a
  rising water gauge behind the header.
- Evidence Locker search, chapter filter and starred clues (partner sees a count).
- One-shot accusations ask "One shot. Are you both sure?" first.
- Symbol font fallback, tight monospace blocks for grids/keypads/SQL.
- Rank rounds reorder by drag or up/down buttons; reveal highlights #1 and #4.
- Telepathy capped at 30 characters; maze:move accepts forward/left/right/back;
  gate buttons read "Gate (won't open from this side)".
- Overtime solver tables checked against Appendix A; keypad generator re-rolls.
- More content checks (rank items, password fixtures, glyphs/gates on traps) and
  sanitize tests for all ten new games.
- GAMES.md carries the full spoiler guide for 9-18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 08:44:28 +02:00
co-authored by Claude Opus 5.5
parent bbe44e84c4
commit 6669be11e5
35 changed files with 921 additions and 215 deletions
+7 -1
View File
@@ -36,6 +36,8 @@ export interface BestResult {
rank: string;
hintsUsed: number;
keysEarned: number;
/** Ever finished this (difficulty 5) game with zero hints. Kept once earned. */
nightmareSurvivors?: boolean;
}
export function getBest(gameId: string): BestResult | null {
@@ -53,6 +55,10 @@ export function saveBest(gameId: string, result: BestResult): boolean {
!best ||
result.keysEarned > best.keysEarned ||
(result.keysEarned === best.keysEarned && result.finalSeconds < best.finalSeconds);
if (better) write(`twokeys:best:${gameId}`, JSON.stringify(result));
const nightmareSurvivors = Boolean(result.nightmareSurvivors || best?.nightmareSurvivors);
if (better) write(`twokeys:best:${gameId}`, JSON.stringify({ ...result, nightmareSurvivors }));
else if (nightmareSurvivors && !best?.nightmareSurvivors) {
write(`twokeys:best:${gameId}`, JSON.stringify({ ...best, nightmareSurvivors }));
}
return better;
}
+1
View File
@@ -43,4 +43,5 @@ export const ROLE_BORDER: Record<Role, string> = { A: 'border-roleA/60', B: 'bor
export const ROLE_BG: Record<Role, string> = { A: 'bg-roleA/15', B: 'bg-roleB/15' };
export const MAX_DIFFICULTY = 5;
export const DIFFICULTY_LABEL: Record<number, string> = { 1: 'Easy', 2: 'Medium', 3: 'Hard', 4: 'Expert', 5: 'Nightmare' };
export const difficultyKeys = (n: number) => '🔑'.repeat(Math.max(0, n));