feat: port all six scenarios' NPC cast rosters into the data model
Populate cast[] (kind:'npc') for every Continuum scenario, transcribed
from the gm-utility NPC sources — normalising the two schemas (console
{id,name,ess,sec} and module {name,tag,secret}) into
{ id, name, kind, note, secret? }. 57 NPCs total. Pregens/PCs excluded
(separate character-sheet system).
No cast UI consumer yet — the design reserves scenario.cast for a future
cast dashboard, so this is a data-model port guarded by
tests/scenarios/cast.test.js (shape + unique ids). 131 tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ce91b4ce98
commit
4096291b1d
@@ -0,0 +1,27 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import continuum from '../../src/con/continuum-2026.js';
|
||||
import { getScenario } from '../../src/scenarios/index.js';
|
||||
|
||||
const scenarios = continuum.slots.map((s) => getScenario(s.scenarioId));
|
||||
|
||||
describe('ported cast rosters', () => {
|
||||
it('every Continuum scenario has a non-empty cast', () => {
|
||||
for (const sc of scenarios) {
|
||||
expect(sc.cast.length, sc.meta.id).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
|
||||
it('cast entries are well-formed with unique ids and a valid kind', () => {
|
||||
for (const sc of scenarios) {
|
||||
const ids = sc.cast.map((c) => c.id);
|
||||
expect(new Set(ids).size, sc.meta.id + ' unique ids').toBe(ids.length);
|
||||
for (const c of sc.cast) {
|
||||
expect(typeof c.id, sc.meta.id).toBe('string');
|
||||
expect(c.id.length, sc.meta.id).toBeGreaterThan(0);
|
||||
expect(typeof c.name, sc.meta.id).toBe('string');
|
||||
expect(c.name.length, sc.meta.id).toBeGreaterThan(0);
|
||||
expect(['pc', 'npc'], sc.meta.id + ' ' + c.id).toContain(c.kind);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user