- Quote options and labels containing commas so they no longer split
  (In Sync: Deep Cuts d12/d15; accusation options in Blue Lantern,
  Dead Air, Kalahari Expedition and Masquerade)
- Validation: strict choice options; flag sync options that look split
- Hint sheet: timed games say hints take time off the countdown
- How to Play: hint cost covers timed games

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 09:20:16 +02:00
co-authored by Claude Opus 5.5
parent db2653c1ab
commit 4ff95e6018
18 changed files with 73 additions and 25 deletions
+24
View File
@@ -191,6 +191,13 @@ describe('results', () => {
expect(stateOf(room, 'A').result).toMatchObject({ success: false, outOfTime: true, rank: 'Out of time', nightmareSurvivors: false });
});
it('tells the hint sheet when hints come off a countdown', () => {
const timed = getGame('kestrel-heist', 'story');
const untimed = getGame('alchemists-vault', 'story');
expect(stateOf(playingRoom(timed), 'A').views.A).toMatchObject({ chapters: [{ lock: { timeLimited: true } }] });
expect(stateOf(playingRoom(untimed), 'A').views.A).toMatchObject({ chapters: [{ lock: { timeLimited: false } }] });
});
it('a difficulty-5 game with zero hints earns Nightmare Survivors', () => {
const game = getGame('kestrel-heist', 'story');
expect(game.difficulty).toBe(5);
@@ -240,6 +247,23 @@ describe('content validation additions', () => {
expect(validateGame(game).join('\n')).toMatch(/exactly 4 items/);
});
it('keeps options that contain commas whole', () => {
const deep = getGame('in-sync-deep-cuts', 'sync');
expect(deep.predict.find((q) => q.id === 'd12')!.options).toContain('A full, noisy home');
expect(deep.predict.find((q) => q.id === 'd15')!.options).toEqual(['An instrument', 'A language', 'A sport', 'A craft (woodwork, pottery, etc.)']);
const masq = getGame('masquerade-montague', 'story');
if (masq.finale.type !== 'accusation') throw new Error('expected accusation');
expect(masq.finale.questions.flatMap((q) => q.options.map((o) => o.label))).toContain(
'Stabbed with the armoury dagger, then buried it in a dry cactus pot',
);
});
it('rejects a sync option split by an unquoted comma', () => {
const game = clone(getGame('in-sync-deep-cuts', 'sync'));
game.predict[0].options = ['A craft (woodwork', 'pottery', 'etc.)', 'A sport'];
expect(validateGame(game).join('\n')).toMatch(/looks split by an unquoted comma/);
});
it("rejects Overtime tables that don't match the solver's", () => {
const game = clone(getGame('tick-tock-overtime', 'defuse'));
game.modules.passwords!.words[0] = 'ZEBRA';