feat: 重构英雄与怪物系统并添加等级机制
- 调整怪物配置映射,将兽人系列怪物ID从5xxx改为6xxx - 为英雄系统添加等级支持,英雄属性随等级线性增长 - 重构卡牌系统,区分英雄卡和功能卡显示逻辑 - 重新组织英雄配置数据,按职业分类并添加等级字段 - 扩展技能配置,为各等级添加对应技能变体 - 简化特殊卡配置结构,添加名称和描述字段
This commit is contained in:
@@ -25,25 +25,7 @@ export interface CardConfig {
|
||||
cost: number
|
||||
weight: number
|
||||
lv: CardKind
|
||||
}
|
||||
|
||||
/** 特殊卡效果类型 */
|
||||
export enum SpecialEffectType {
|
||||
DrawHero = 1,
|
||||
RepeatNextUse = 2,
|
||||
}
|
||||
|
||||
/** 特殊卡效果参数 */
|
||||
export interface SpecialCardEffect {
|
||||
type: SpecialEffectType
|
||||
drawHeroCount?: number
|
||||
drawHeroLv?: CardKind
|
||||
repeatNextUseTimes?: number
|
||||
}
|
||||
|
||||
/** 特殊卡完整配置 */
|
||||
export interface SpecialCardConfig extends CardConfig {
|
||||
effect: SpecialCardEffect
|
||||
hero_lv?: number
|
||||
}
|
||||
|
||||
/** 卡池默认初始等级 */
|
||||
@@ -53,62 +35,56 @@ export const CARD_POOL_MAX_LEVEL = CardKind.LV6
|
||||
|
||||
/** 基础卡池(英雄、技能、Buff、Debuff) */
|
||||
export const CardPoolList: CardConfig[] = [
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 20, lv: 1 },
|
||||
{ uuid: 5003, type: CardType.Hero, cost: 3, weight: 20, lv: 1 },
|
||||
{ uuid: 5002, type: CardType.Hero, cost: 3, weight: 25, lv: 2 },
|
||||
{ uuid: 5005, type: CardType.Hero, cost: 3, weight: 25, lv: 2 },
|
||||
{ uuid: 5004, type: CardType.Hero, cost: 3, weight: 30, lv: 3 },
|
||||
{ uuid: 5006, type: CardType.Hero, cost: 3, weight: 35, lv: 4 },
|
||||
{ uuid: 5007, type: CardType.Hero, cost: 3, weight: 40, lv: 5 },
|
||||
{ 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: 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: 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: 6001, type: CardType.Skill, cost: 1, weight: 20, lv: 1 },
|
||||
{ uuid: 6002, type: CardType.Skill, cost: 1, weight: 20, lv: 1 },
|
||||
{ uuid: 6003, type: CardType.Skill, cost: 2, weight: 25, lv: 2 },
|
||||
{ uuid: 6100, type: CardType.Skill, cost: 4, weight: 25, lv: 2 },
|
||||
{ uuid: 6004, type: CardType.Skill, cost: 3, weight: 30, lv: 3 },
|
||||
{ uuid: 6102, type: CardType.Skill, cost: 4, weight: 35, lv: 4 },
|
||||
{ uuid: 6101, type: CardType.Skill, cost: 5, weight: 40, lv: 5 },
|
||||
{ uuid: 6103, type: CardType.Skill, cost: 6, weight: 45, lv: 6 },
|
||||
|
||||
{ uuid: 10001, type: CardType.Buff, cost: 2, weight: 30, lv: 1 },
|
||||
{ uuid: 10101, type: CardType.Buff, cost: 3, weight: 26, lv: 2 },
|
||||
{ uuid: 10011, type: CardType.Buff, cost: 3, weight: 24, lv: 3 },
|
||||
{ uuid: 10311, type: CardType.Buff, cost: 4, weight: 20, lv: 4 },
|
||||
{ uuid: 10302, type: CardType.Buff, cost: 5, weight: 18, lv: 5 },
|
||||
|
||||
{ uuid: 10201, type: CardType.Debuff, cost: 3, weight: 24, lv: 2 },
|
||||
{ uuid: 10211, type: CardType.Debuff, cost: 4, weight: 20, lv: 3 },
|
||||
{ uuid: 10312, type: CardType.Debuff, cost: 4, weight: 18, lv: 4 },
|
||||
{ uuid: 20001, type: CardType.Debuff, cost: 5, weight: 14, lv: 5 },
|
||||
{ uuid: 20011, type: CardType.Debuff, cost: 6, weight: 12, lv: 6 },
|
||||
{ uuid: 7001, type: CardType.Special, cost: 1, weight: 20, lv: 1 },
|
||||
]
|
||||
|
||||
/** 特殊卡定义表 */
|
||||
|
||||
/** 功能卡效果类型 */
|
||||
export enum SpecialEffectType {
|
||||
DrawHero = 1,
|
||||
RepeatNextUse = 2,
|
||||
}
|
||||
|
||||
/** 功能卡效果参数 */
|
||||
export interface SpecialCardEffect {
|
||||
type: SpecialEffectType
|
||||
drawHeroCount?: number
|
||||
drawHeroLv?: CardKind
|
||||
repeatNextUseTimes?: number
|
||||
}
|
||||
|
||||
/** 功能卡完整配置 */
|
||||
export interface SpecialCardConfig extends CardConfig {
|
||||
name: string
|
||||
info: string
|
||||
effect: SpecialCardEffect
|
||||
}
|
||||
|
||||
/** 功能卡定义表 */
|
||||
|
||||
|
||||
|
||||
export const SpecialCardList: Record<number, SpecialCardConfig> = {
|
||||
7001: {
|
||||
uuid: 7001,
|
||||
type: CardType.Special,
|
||||
cost: 6,
|
||||
weight: 20,
|
||||
lv: CardKind.LV3,
|
||||
effect: {
|
||||
type: SpecialEffectType.DrawHero,
|
||||
drawHeroCount: 4,
|
||||
drawHeroLv: CardKind.LV3,
|
||||
},
|
||||
7001: { uuid: 7001,type: CardType.Special,cost: 6,weight: 20,lv: CardKind.LV1,name:"哈哈",info: "抽取4张等级3的英雄",
|
||||
effect: {type: SpecialEffectType.DrawHero,drawHeroCount: 4,drawHeroLv: CardKind.LV3,},
|
||||
},
|
||||
7002: {
|
||||
uuid: 7002,
|
||||
type: CardType.Special,
|
||||
cost: 5,
|
||||
weight: 20,
|
||||
lv: CardKind.LV4,
|
||||
effect: {
|
||||
type: SpecialEffectType.RepeatNextUse,
|
||||
repeatNextUseTimes: 1,
|
||||
},
|
||||
7002: { uuid: 7002,type: CardType.Special,cost: 5,weight: 20,lv: CardKind.LV2,name:"哈哈哈", info: "重复使用下一张卡1次",
|
||||
effect: {type: SpecialEffectType.RepeatNextUse,repeatNextUseTimes: 1,},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user