Use canonical name-based general icon paths

This commit is contained in:
2026-07-26 05:21:13 +00:00
parent 2030c1240b
commit 55b80dbbc6
69 changed files with 38598 additions and 30513 deletions
+13 -1
View File
@@ -57,11 +57,23 @@ describe('scenario parser', () => {
const firstGeneral = scenario.generals[0]!;
expect(firstGeneral.name).toBe('소제1');
expect(firstGeneral.affinity).toBe(1);
expect(firstGeneral.picture).toBe(1001);
expect(firstGeneral.picture).toBe('장수/소제1.jpg');
expect(firstGeneral.nation).toBe(1);
expect(firstGeneral.city).toBe(null);
expect(firstGeneral.leadership).toBe(20);
expect(firstGeneral.personality).toBe('유지');
expect(firstGeneral.special).toBe(null);
});
it('reuses the canonical name-based icon in a scenario that omitted numeric pictures', async () => {
const defaultsRaw = await readJson(path.join(scenarioRoot, 'default.json'));
const scenarioRaw = await readJson(path.join(scenarioRoot, 'scenario_2220.json'));
const defaults = parseScenarioDefaults(defaultsRaw);
const scenario = parseScenarioDefinition(scenarioRaw, defaults);
expect(scenario.generals[0]).toMatchObject({
name: '아회남',
picture: '장수/아회남.jpg',
});
});
});