mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-10-18 21:30:01 +08:00
feat # 继续补全遗物系统
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user