feat # 继续补全遗物系统

This commit is contained in:
2026-10-08 23:46:57 +08:00
parent 623f53a1d2
commit 1c93c77f4f
335 changed files with 11528 additions and 1797 deletions
+4 -1
View File
@@ -68,7 +68,10 @@ acts.forEach(act => {
});
});
Object.entries(rewardPools).forEach(([poolId, rewardIds]) => {
if (!Array.isArray(rewardIds) || rewardIds.length < 3) throw new Error(`梦三奖励池至少需要三项:${poolId}`);
// Dedicated relic catalogs can legitimately contain fewer than three
// implemented rewards. Existing gameplay pools retain their three-item gate.
const minimum = /^shared\.pool\.relic\.(?:shop|event|initial|ancient\.[a-z]+)$/.test(poolId) ? 1 : 3;
if (!Array.isArray(rewardIds) || rewardIds.length < minimum) throw new Error(`梦三奖励池至少需要${minimum}项:${poolId}`);
if (new Set(rewardIds).size != rewardIds.length) throw new Error(`梦三奖励池存在重复项:${poolId}`);
rewardIds.forEach(rewardId => {
if (!rewards[rewardId]) throw new Error(`梦三奖励不存在:${poolId} -> ${rewardId}`);
+2 -1
View File
@@ -1,4 +1,4 @@
import { relicRewards, relicRewardIds } from "../../relics/definitions.js";
import { relicRewards, relicRewardIds, relicRewardPools } from "../../relics/definitions.js";
import { cardPackRewards, cardPackRewardIds } from "../../cards/packs/rewards.js";
import { cardDefinitions } from "../../cards/card-definitions.js";
@@ -157,6 +157,7 @@ const battleCardRewardIds = [
];
export const rewardPools = {
...relicRewardPools,
"shared.pool.battle.normal": [...battleCardRewardIds],
"shared.pool.battle.elite": [...battleCardRewardIds],
"shared.pool.elite.relics": [...relicRewardIds],