feat: add first-victory camp exploration

This commit is contained in:
2026-07-27 09:17:09 +09:00
parent 89c755ca42
commit e9fcd27611
17 changed files with 4557 additions and 113 deletions

View File

@@ -12,6 +12,7 @@ const characterDirectory = join('src', 'assets', 'images', 'exploration', 'chara
const modulePath = join('src', 'game', 'data', 'explorationCharacterAssets.ts');
const villageScenePath = join('src', 'game', 'scenes', 'PrologueVillageScene.ts');
const militiaCampScenePath = join('src', 'game', 'scenes', 'PrologueMilitiaCampScene.ts');
const campVisitScenePath = join('src', 'game', 'scenes', 'CampVisitExplorationScene.ts');
const expectedBaseMappings = {
'unit-liu-bei': 'exploration-liu-bei',
'unit-guan-yu': 'exploration-guan-yu',
@@ -23,7 +24,8 @@ const expectedNamedTextureFallbacks = {
'exploration-zhuo-recruiting-clerk': 'unit-shu-officer',
'exploration-zhuo-villager': 'unit-shu-infantry',
'exploration-zhuo-quartermaster': 'unit-shu-officer',
'exploration-zou-jing': 'unit-shu-officer'
'exploration-zou-jing': 'unit-shu-officer',
'exploration-jian-yong': 'unit-shu-officer'
};
const expectedSceneNpcTextureKeys = [
{
@@ -94,7 +96,7 @@ assert.deepEqual(
assert.deepEqual(
readStringMap(moduleSource, 'explorationCharacterNamedTextureKeyFallbacks'),
expectedNamedTextureFallbacks,
'Exploration character named-sheet fallbacks must exactly match the four dedicated NPC sheets.'
'Exploration character named-sheet fallbacks must exactly match the dedicated NPC sheets.'
);
expectedSceneNpcTextureKeys.forEach(({ scenePath, sceneLabel, mappingName, mappings }) => {
@@ -106,6 +108,19 @@ expectedSceneNpcTextureKeys.forEach(({ scenePath, sceneLabel, mappingName, mappi
);
});
assert(existsSync(campVisitScenePath), `Missing first-camp visit exploration scene: ${campVisitScenePath}`);
const campVisitSceneSource = readFileSync(campVisitScenePath, 'utf8');
assert.match(
campVisitSceneSource,
/id:\s*['"]jian-yong['"][\s\S]*?textureKey:\s*['"]exploration-jian-yong['"]/,
'The first-camp visit scene must render Jian Yong with his dedicated exploration sheet.'
);
assert.match(
campVisitSceneSource,
/initialPosition:\s*\{\s*x:\s*definition\.x,\s*y:\s*definition\.y\s*\}/,
'The first-camp visit scene must retain each NPC initial position for no-teleport verification.'
);
assert(
existsSync(characterDirectory),
`Missing exploration character asset directory: ${characterDirectory}`
@@ -116,7 +131,7 @@ const deployedFiles = readdirSync(characterDirectory)
assert.deepEqual(
deployedFiles,
expectedFiles,
`Expected exactly the nine mapped exploration character sheets in ${characterDirectory}.`
`Expected exactly the ${expectedFiles.length} mapped exploration character sheets in ${characterDirectory}.`
);
deployedFiles.forEach((fileName) => {