feat(卡牌系统): 重构卡牌选择逻辑并增加等级分段配置

重构卡牌选择系统,将原有的简单数组配置改为按等级分段的字典结构
- 为技能、英雄、天赋和属性分别添加 CanSelectXXX 配置
- 优化卡牌池构建逻辑,支持按等级筛选可用卡牌
- 改进权重随机算法,增加兜底机制
- 分离卡牌基础信息和权重配置,提高可维护性
This commit is contained in:
panw
2026-01-14 20:22:18 +08:00
parent 4a506555ba
commit 6ddfe7e2c4
5 changed files with 264 additions and 141 deletions

View File

@@ -122,7 +122,16 @@ export interface heroInfo {
info: string; // 描述文案
}
export const CanSelectHeros = [5001, 5002, 5003, 5004, 5005, 5006, 5007];
export const CanSelectHeros: Record<number, number[]> = {
1: [5001, 5002],
2: [5003],
3: [5004],
4: [5005],
5: [5006],
6: [5007],
// 默认全开(或根据需要留空)
99: [5001, 5002, 5003, 5004, 5005, 5006, 5007]
};
export const HeroInfo: Record<number, heroInfo> = {
// ========== 英雄角色 ==========