fixed # 更新刘备配置和奖励

This commit is contained in:
2026-09-30 15:43:07 +08:00
parent 82d80397b6
commit 0ccb14cecd
22 changed files with 681 additions and 30 deletions
+7
View File
@@ -66,6 +66,13 @@ Object.entries(nodeContents).forEach(([contentId, content]) => {
validateDialogue(content.victoryDialogue, contentId + " 战后");
validateDialogue(content.openingDialogue, contentId + " 开场");
for (const id of content.fixedRewards || []) if (!rewards[id]) throw new Error("固定奖励不存在:" + id);
if (content.rewardPackage) {
const pack = content.rewardPackage;
if (!Number.isSafeInteger(pack.gold) || pack.gold < 0 ||
!rewardPools[pack.relicPool]?.every(id => rewards[id].relic)) {
throw new Error(`梦三奖励包配置无效:${contentId}`);
}
}
if (content.battlePlan) validateBattlePlan(content.battlePlan);
(content.choices || []).forEach(choice => {
if (!choice.id) throw new Error(`梦三剧情选项缺少ID:${contentId}`);