mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-10-11 03:20:01 +08:00
fixed # 更新刘备配置和奖励
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { relicRewardIds } from "../../../relics/definitions.js";
|
||||
|
||||
export const rewardPools = {
|
||||
"act1.pool.liubeiOpening.relics": [...relicRewardIds],
|
||||
"act1.pool.chest": [
|
||||
...relicRewardIds,
|
||||
"shared.reward.item.handCharm",
|
||||
|
||||
@@ -46,8 +46,9 @@ export const openingRewards = {
|
||||
export default {
|
||||
id: "act1.battle.liubeiOpening", kind: "battle", name: "刘备初始剧情", mapName: "初识的卢",
|
||||
requiredCharacter: "mengsan_liubei_shuying",
|
||||
enemies: ["mengsan_soldier_shuying"], gold: 20,
|
||||
enemies: ["mengsan_soldier_shuying"], gold: 400,
|
||||
skipRandomReward: true, fixedRewards: ["act1.reward.dilu"], openingDialogue, victoryDialogue,
|
||||
rewardPackage: { gold: 400, relicPool: "act1.pool.liubeiOpening.relics" },
|
||||
battlePlan: {
|
||||
units: [{
|
||||
id: "soldier", character: "mengsan_soldier_shuying", camp: "enemy",
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user