refactor: 统一将 pool_lv 重命名为 card_lv 并清理废弃代码
本次提交完成了全项目范围内的术语统一重构: 1. 将所有`pool_lv`相关变量、字段、注释替换为`card_lv`,对齐卡牌等级的业务含义 2. 移除了配置中冗余的默认`pool_lv`赋值,简化数据结构 3. 删除了废弃的`HlistComp.ts`组件及其元文件 4. 修正了多处逻辑错误,确保卡牌等级正确驱动背景框切换 5. 更新了相关注释和文档,保持代码一致性
This commit is contained in:
@@ -82,11 +82,10 @@ export interface CardConfig {
|
||||
cost: number
|
||||
weight: number
|
||||
kind: CKind
|
||||
pool_lv: CardLV
|
||||
card_lv: number // 卡牌等级(驱动 bg_node 颜色:1=green 2=blue 3=purple 4=red 5=yellow)
|
||||
wave?: number // 针对技能卡:仅在指定波次(wave)才能抽到
|
||||
hero_lv?: number
|
||||
card_lv?: number
|
||||
base_pool_lv?: number
|
||||
base_card_lv?: number
|
||||
|
||||
// 技能卡扩展属性
|
||||
skill?: number // 关联的技能 UUID
|
||||
@@ -151,11 +150,10 @@ HeroList.forEach(uuid => {
|
||||
type: CardType.Hero,
|
||||
cost: baseCost,
|
||||
weight: baseWeight,
|
||||
pool_lv: CardLV.LV1,
|
||||
card_lv: hero.card_lv ?? 1,
|
||||
kind: CKind.Hero,
|
||||
hero_lv: 1,
|
||||
card_lv: 1,
|
||||
base_pool_lv: 1,
|
||||
base_card_lv: hero.card_lv ?? 1,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -192,22 +190,22 @@ export interface SpecialRefreshCardConfig extends CardConfig {
|
||||
*/
|
||||
export const SpecialUpgradeCardList: Record<number, SpecialUpgradeCardConfig> = {
|
||||
7001: {
|
||||
uuid: 7001, type: CardType.SpecialUpgrade, cost: 10, weight: 18, pool_lv: CardLV.LV1, kind: CKind.Card, card_lv: 1, name: t("scard_name_7001"), info: t("scard_info_7001"),
|
||||
uuid: 7001, type: CardType.SpecialUpgrade, cost: 10, weight: 18, card_lv: 1, kind: CKind.Card, name: t("scard_name_7001"), info: t("scard_info_7001"),
|
||||
currentLv: 0, targetLv: 0,
|
||||
},
|
||||
}
|
||||
|
||||
export const SpecialRefreshCardList: Record<number, SpecialRefreshCardConfig> = {
|
||||
7101: {
|
||||
uuid: 7101, type: CardType.SpecialRefresh, cost: 3, weight: 14, pool_lv: CardLV.LV1, kind: CKind.Card, card_lv: 1, name: t("scard_name_7101"), info: t("scard_info_7101"),
|
||||
uuid: 7101, type: CardType.SpecialRefresh, cost: 3, weight: 14, card_lv: 1, kind: CKind.Card, name: t("scard_name_7101"), info: t("scard_info_7101"),
|
||||
refreshLv: 0, refreshHeroType: SpecialRefreshHeroType.Melee,
|
||||
},
|
||||
7102: {
|
||||
uuid: 7102, type: CardType.SpecialRefresh, cost: 3, weight: 14, pool_lv: CardLV.LV1, kind: CKind.Card, card_lv: 1, name: t("scard_name_7102"), info: t("scard_info_7102"),
|
||||
uuid: 7102, type: CardType.SpecialRefresh, cost: 3, weight: 14, card_lv: 1, kind: CKind.Card, name: t("scard_name_7102"), info: t("scard_info_7102"),
|
||||
refreshLv: 0, refreshHeroType: SpecialRefreshHeroType.Ranged,
|
||||
},
|
||||
7103: {
|
||||
uuid: 7103, type: CardType.SpecialRefresh, cost: 4, weight: 12, pool_lv: CardLV.LV1, kind: CKind.Card, card_lv: 1, name: t("scard_name_7103"), info: t("scard_info_7103"),
|
||||
uuid: 7103, type: CardType.SpecialRefresh, cost: 4, weight: 12, card_lv: 1, kind: CKind.Card, name: t("scard_name_7103"), info: t("scard_info_7103"),
|
||||
refreshLv: 0, refreshHeroType: SpecialRefreshHeroType.Any,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user