feat(卡牌): 添加卡牌大类标识并更新UI显示
- 在CardSet中新增CKind枚举,区分英雄、技能、卡牌、药水等大类 - 在卡牌配置中增加kind字段,并更新所有卡牌配置 - 在CardComp组件中添加Ckind_node属性,用于显示卡牌大类图标 - 重构card.prefab,将大类图标节点重命名为更具语义的名称(如lv1-lv5),并调整节点激活状态 - 在卡牌初始化和重置时,根据cardData.kind动态显示对应的大类图标
This commit is contained in:
@@ -8,6 +8,13 @@ export enum CardType {
|
||||
SpecialUpgrade = 3,
|
||||
SpecialRefresh = 4,
|
||||
}
|
||||
/** 卡牌大类定义 */
|
||||
export enum CKind {
|
||||
Hero = 1, //英雄
|
||||
Skill = 2, //技能
|
||||
Card = 3, //卡牌
|
||||
Potion = 4, //药水
|
||||
}
|
||||
|
||||
/** 卡池等级定义 */
|
||||
export enum CardKind {
|
||||
@@ -25,6 +32,7 @@ export interface CardConfig {
|
||||
type: CardType
|
||||
cost: number
|
||||
weight: number
|
||||
kind: CKind
|
||||
lv: CardKind
|
||||
hero_lv?: number
|
||||
}
|
||||
@@ -47,55 +55,31 @@ export const CARD_POOL_MAX_LEVEL = CardKind.LV6
|
||||
export const CARD_HERO_MAX_LEVEL = 3
|
||||
/** 基础卡池(英雄、技能、功能) */
|
||||
export const CardPoolList: CardConfig[] = [
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 3, weight: 25, lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 3, weight: 25, lv: 1, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 25, lv: 2, hero_lv: 1 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 3, weight: 25, lv: 2, hero_lv: 1 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 3, weight: 25, lv: 2, hero_lv: 1 },
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 25, lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 3, weight: 25, lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 3, weight: 25, lv: 2, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 2 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 2 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 2 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 2 },
|
||||
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 1 },
|
||||
{ uuid: 5103, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 1 },
|
||||
{ uuid: 5202, type: CardType.Hero, cost: 3, weight: 25, lv: 3, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 2 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 2 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 2 },
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 3, weight: 25, lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5103, type: CardType.Hero, cost: 3, weight: 25, lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5202, type: CardType.Hero, cost: 3, weight: 25, lv: 3, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5004, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 1 },
|
||||
{ uuid: 5104, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 1 },
|
||||
{ uuid: 5303, type: CardType.Hero, cost: 3, weight: 25, lv: 4, hero_lv: 1 },
|
||||
{ uuid: 5004, type: CardType.Hero, cost: 3, weight: 25, lv: 4, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5104, type: CardType.Hero, cost: 3, weight: 25, lv: 4, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5303, type: CardType.Hero, cost: 3, weight: 25, lv: 4, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 3 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 3 },
|
||||
{ uuid: 5201, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 3 },
|
||||
{ uuid: 5301, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 3 },
|
||||
{ uuid: 5105, type: CardType.Hero, cost: 3, weight: 25, lv: 5, kind: CKind.Hero, hero_lv: 1 },
|
||||
{ uuid: 5304, type: CardType.Hero, cost: 3, weight: 25, lv: 5, kind: CKind.Hero, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 2 },
|
||||
{ uuid: 5103, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 2 },
|
||||
{ uuid: 5202, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 2 },
|
||||
|
||||
{ uuid: 5105, type: CardType.Hero, cost: 3, weight: 25, lv: 5, hero_lv: 1 },
|
||||
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 25, lv: 6, hero_lv: 3 },
|
||||
{ uuid: 5102, type: CardType.Hero, cost: 3, weight: 25, lv: 6, hero_lv: 3 },
|
||||
{ uuid: 5302, type: CardType.Hero, cost: 3, weight: 25, lv: 6, hero_lv: 3 },
|
||||
|
||||
{ uuid: 5304, type: CardType.Hero, cost: 3, weight: 25, lv: 6, hero_lv: 1 },
|
||||
|
||||
{ uuid: 7001, type: CardType.SpecialUpgrade, cost: 6, weight: 16, lv: 1 },
|
||||
{ uuid: 7002, type: CardType.SpecialUpgrade, cost: 6, weight: 14, lv: 2 },
|
||||
{ uuid: 7101, type: CardType.SpecialRefresh, cost: 4, weight: 14, lv: 1 },
|
||||
{ uuid: 7102, type: CardType.SpecialRefresh, cost: 4, weight: 14, lv: 1 },
|
||||
{ uuid: 7103, type: CardType.SpecialRefresh, cost: 5, weight: 12, lv: 2 },
|
||||
{ uuid: 7001, type: CardType.SpecialUpgrade, cost: 6, weight: 16, lv: 1 ,kind: CKind.Card },
|
||||
{ uuid: 7002, type: CardType.SpecialUpgrade, cost: 6, weight: 14, lv: 2 ,kind: CKind.Card },
|
||||
{ uuid: 7101, type: CardType.SpecialRefresh, cost: 4, weight: 14, lv: 1 ,kind: CKind.Card },
|
||||
{ uuid: 7102, type: CardType.SpecialRefresh, cost: 4, weight: 14, lv: 1 ,kind: CKind.Card },
|
||||
{ uuid: 7103, type: CardType.SpecialRefresh, cost: 5, weight: 12, lv: 2 ,kind: CKind.Card },
|
||||
]
|
||||
|
||||
|
||||
@@ -126,22 +110,22 @@ export interface SpecialRefreshCardConfig extends CardConfig {
|
||||
|
||||
|
||||
export const SpecialUpgradeCardList: Record<number, SpecialUpgradeCardConfig> = {
|
||||
7001: { uuid: 7001,type: CardType.SpecialUpgrade,cost: 6,weight: 16,lv: CardKind.LV1,name:"战术晋升",info: "升级场上随机1个1级英雄到2级",
|
||||
7001: { uuid: 7001,type: CardType.SpecialUpgrade,cost: 6,weight: 16,lv: CardKind.LV1,kind:CKind.Card,name:"战术晋升",info: "升级场上随机1个1级英雄到2级",
|
||||
currentLv: 1, targetLv: 2,
|
||||
},
|
||||
7002: { uuid: 7002,type: CardType.SpecialUpgrade,cost: 6,weight: 14,lv: CardKind.LV2,name:"进阶战术",info: "升级场上随机1个2级英雄到3级",
|
||||
7002: { uuid: 7002,type: CardType.SpecialUpgrade,cost: 6,weight: 14,lv: CardKind.LV2,kind:CKind.Card,name:"进阶战术",info: "升级场上随机1个2级英雄到3级",
|
||||
currentLv: 2, targetLv: 3,
|
||||
},
|
||||
}
|
||||
|
||||
export const SpecialRefreshCardList: Record<number, SpecialRefreshCardConfig> = {
|
||||
7101: { uuid: 7101,type: CardType.SpecialRefresh,cost: 4,weight: 14,lv: CardKind.LV1,name:"近战征召",info: "刷新卡池,都是近战英雄",
|
||||
7101: { uuid: 7101,type: CardType.SpecialRefresh,cost: 4,weight: 14,lv: CardKind.LV1,kind:CKind.Card,name:"近战征召",info: "刷新卡池,都是近战英雄",
|
||||
refreshLv: 0, refreshHeroType: SpecialRefreshHeroType.Melee,
|
||||
},
|
||||
7102: { uuid: 7102,type: CardType.SpecialRefresh,cost: 4,weight: 14,lv: CardKind.LV1,name:"远程征召",info: "刷新卡池,都是远程英雄",
|
||||
7102: { uuid: 7102,type: CardType.SpecialRefresh,cost: 4,weight: 14,lv: CardKind.LV1,kind:CKind.Card,name:"远程征召",info: "刷新卡池,都是远程英雄",
|
||||
refreshLv: 0, refreshHeroType: SpecialRefreshHeroType.Ranged,
|
||||
},
|
||||
7103: { uuid: 7103,type: CardType.SpecialRefresh,cost: 5,weight: 12,lv: CardKind.LV2,name:"精英筛选",info: "刷新卡池,都是3级卡池等级英雄",
|
||||
7103: { uuid: 7103,type: CardType.SpecialRefresh,cost: 5,weight: 12,lv: CardKind.LV2,kind:CKind.Card,name:"精英筛选",info: "刷新卡池,都是3级卡池等级英雄",
|
||||
refreshLv: 3, refreshHeroType: SpecialRefreshHeroType.Any,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user