Validate sortie flow after battle ids

This commit is contained in:
2026-07-05 17:07:32 +09:00
parent 430918d4d3
commit 2864654cb8

View File

@@ -59,6 +59,9 @@ for (const flowKey of sortieFlowKeys) {
assert(afterBattleId, `Sortie flow ${flowKey} has no afterBattleId`);
if (afterBattleId) {
assert(battleIds.has(afterBattleId), `Sortie flow ${flowKey} references unknown afterBattleId: ${afterBattleId}`);
if (battleIds.has(flowKey)) {
assert(afterBattleId === flowKey, `Sortie flow ${flowKey} afterBattleId points to ${afterBattleId}`);
}
}
assert(/\bpages\s*:/.test(flowBody), `Sortie flow ${flowKey} must provide story pages`);
for (const fieldName of sortieFlowDisplayFields) {