feat: 重构英雄与怪物系统并添加等级机制

- 调整怪物配置映射,将兽人系列怪物ID从5xxx改为6xxx
- 为英雄系统添加等级支持,英雄属性随等级线性增长
- 重构卡牌系统,区分英雄卡和功能卡显示逻辑
- 重新组织英雄配置数据,按职业分类并添加等级字段
- 扩展技能配置,为各等级添加对应技能变体
- 简化特殊卡配置结构,添加名称和描述字段
This commit is contained in:
panw
2026-03-20 10:54:29 +08:00
parent 51d0459f5b
commit 35af88d570
8 changed files with 1749 additions and 948 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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,},
},
}

View File

@@ -202,6 +202,7 @@ export const SkillSet: Record<number, SkillConfig> = {
uuid:6014,name:"闪击1",sp_name:"atk_s3",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max",DTType:DTType.single,
ap:150,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"对多个目标造成150%攻击的伤害",
},
6021: {
uuid:6021,name:"暴射2",sp_name:"arrow_green",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,crt:25,
ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害,暴击率20%",
@@ -285,134 +286,142 @@ export const SkillSet: Record<number, SkillConfig> = {
uuid:6125,name:"月波3",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:200,hit_count:6,hitcd:0.3,speed:300,with:90,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成200%攻击的伤害",
},
6131: {
uuid:6131,name:"光箭4",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成100%攻击的伤害,暴击",
},
6132: {
uuid:6132,name:"电击4",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.collision,buffs:[],info:"对多个目标造成150%攻击的伤害,暴击率20%",
},
6134: {
uuid:6134,name:"火焰击4",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,bck:30,
ap:150,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
6135: {
uuid:6135,name:"月波4",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:200,hit_count:6,hitcd:0.3,speed:300,with:90,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成200%攻击的伤害",
},
6141: {
uuid:6141,name:"光箭5",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成100%攻击的伤害,暴击",
},
6142: {
uuid:6142,name:"电击5",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.collision,buffs:[],info:"对多个目标造成150%攻击的伤害,暴击率20%",
},
6144: {
uuid:6144,name:"火焰击5",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,bck:30,
ap:150,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
6145: {
uuid:6145,name:"月波5",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:200,hit_count:6,hitcd:0.3,speed:300,with:90,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成200%攻击的伤害",
},
6161: {
uuid:6161,name:"光箭6",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成100%攻击的伤害,暴击",
},
6162: {
uuid:6162,name:"电击6",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max",DTType:DTType.single,crt:30,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.collision,buffs:[],info:"对多个目标造成150%攻击的伤害,暴击率20%",
},
6164: {
uuid:6164,name:"火焰击6",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.single,bck:30,
ap:150,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
6165: {
uuid:6165,name:"月波6",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:200,hit_count:6,hitcd:0.3,speed:300,with:90,ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成200%攻击的伤害",
},
/*********************** 高阶群体******************/
6201: {
uuid:6201,name:"陨石术",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
uuid:6201,name:"陨石术1",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,暴击率20%",
},
6202: {
uuid:6202,name:"冰锥",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
uuid:6202,name:"冰锥1",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,冰冻率20%",
},
6203: {
uuid:6203,name:"火墙",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
uuid:6203,name:"火墙1",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
6211: {
uuid:6211,name:"陨石术",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
uuid:6211,name:"陨石术2",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,暴击率20%",
},
6212: {
uuid:6212,name:"冰锥",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
uuid:6212,name:"冰锥2",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,冰冻率20%",
},
6213: {
uuid:6213,name:"火墙",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
uuid:6213,name:"火墙2",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
6221: {
uuid:6221,name:"陨石术",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
uuid:6221,name:"陨石术3",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,crt:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,暴击率20%",
},
6222: {
uuid:6222,name:"冰锥",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
uuid:6222,name:"冰锥3",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,frz:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,冰冻率20%",
},
6223: {
uuid:6223,name:"火墙",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
uuid:6223,name:"火墙3",sp_name:"atk_f2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max",DTType:DTType.range,bck:20,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,击退率20%",
},
//============================= ====== 辅助技能 ====== ==========================
6301:{
uuid:6301,name:"魔法盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
uuid:6301,name:"魔法盾1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:30,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"获得30%最大生命值的护盾",
},
6302: {
uuid:6302,name:"治疗",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
uuid:6302,name:"治疗1",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:30,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"治疗自己,回复30%最大生命值",
},
6303:{
uuid:6303,name:"群体魔法盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
uuid:6303,name:"群体魔法盾1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:20,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体获得20%最大生命值的护盾",
},
6304: {
uuid:6304,name:"群体治疗",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
uuid:6304,name:"群体治疗1",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:20,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体队友,回复20%最大生命值",
},
6311:{
uuid:6311,name:"魔法盾2",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:40,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"获得40%最大生命值的护盾",
},
6312: {
uuid:6312,name:"治疗2",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:40,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"治疗自己,回复40%最大生命值",
},
6313:{
uuid:6313,name:"群体魔法盾2",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:25,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体获得25%最大生命值的护盾",
},
6314: {
uuid:6314,name:"群体治疗2",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:25,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体队友,回复25%最大生命值",
},
6321:{
uuid:6321,name:"魔法盾3",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:50,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"获得50%最大生命值的护盾",
},
6322: {
uuid:6322,name:"治疗3",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:50,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"治疗自己,回复50%最大生命值",
},
6323:{
uuid:6323,name:"群体魔法盾3",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Shield,
ap:30,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体获得30%最大生命值的护盾",
},
6324: {
uuid:6324,name:"群体治疗3",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Heal,
ap:30,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"全体队友,回复30%最大生命值",
},
6401:{
uuid:6401,name:"单体攻击1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1002],info:"自身+5攻击",
},
6402:{
uuid:6402,name:"单体生命1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1102],info:"自身+20最大生命值",
},
6403:{
uuid:6403,name:"单体全能1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1001,1101],info:"自身+2攻击,+10最大生命值",
},
6411:{
uuid:6411,name:"单体攻击2",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1003],info:"自身+10攻击",
},
6412:{
uuid:6412,name:"单体生命2",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1103],info:"自身+30最大生命值",
},
6413:{
uuid:6413,name:"单体全能2",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1002,1102],info:"自身+5攻击,+20最大生命值",
},
6421:{
uuid:6421,name:"单体攻击3",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1004],info:"自身+15攻击",
},
6422:{
uuid:6422,name:"单体生命3",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1104],info:"自身+40最大生命值",
},
6423:{
uuid:6423,name:"单体全能3",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1003,1103],info:"自身+10攻击,+30最大生命值",
},
6431:{
uuid:6431,name:"单体攻击4",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1005],info:"自身+20攻击",
},
6432:{
uuid:6432,name:"单体生命4",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1105],info:"自身+50最大生命值",
},
6433:{
uuid:6433,name:"单体全能4",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1004,1104],info:"自身+15攻击,+40最大生命值",
},
6441:{
uuid:6441,name:"单体攻击5",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1006],info:"自身+25攻击",
},
6442:{
uuid:6442,name:"单体生命5",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1106],info:"自身+60最大生命值",
},
6443:{
uuid:6443,name:"单体全能5",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1005,1105],info:"自身+20攻击,+50最大生命值",
},
6451:{
uuid:6451,name:"单体攻击6",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1007],info:"自身+30攻击",
},
6452:{
uuid:6452,name:"单体生命6",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1107],info:"自身+70最大生命值",
},
6453:{
uuid:6453,name:"单体全能6",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1006,1106],info:"自身+25攻击,+60最大生命值",
},
6601:{
uuid:6601,name:"全体攻击1",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,kind:SkillKind.Support,
ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,buffs:[1001],info:"全体+2攻击",

View File

@@ -60,6 +60,7 @@ export interface heroInfo {
path: string; // 资源路径(对应美术资源名)
fac: FacSet; // 阵营FacSet.HERO 或 FacSet.MON
kind?: number; // 未使用
lv: number; // 等级
as: number; // 攻击间隔(越小越快)
ss:number; // 技能间隔
type: HType; // 攻击定位(近战/中程/远程)
@@ -74,29 +75,48 @@ export interface heroInfo {
export const HeroInfo: Record<number, heroInfo> = {
// ========== 英雄角色 ==========
5001:{uuid:5001,name:"盾战士",path:"hk1", fac:FacSet.HERO, as:1,ss:5,type:HType.Melee,hp:300,ap:25,speed:120,skills:[6001,6201],info:""},
5008:{uuid:5008,name:"圣骑士",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Melee,hp:340,ap:22,speed:115,skills:[6001,6202],info:""},
5014:{uuid:5014,name:"风行剑士",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Melee,hp:210,ap:38,speed:170,skills:[6001,6104],info:""},
5007:{uuid:5007,name:"刺客",path:"hc1", fac:FacSet.HERO, as:1,ss:5,type:HType.Melee,hp:140,ap:50,speed:180,skills:[6001,6102],info:""},
// ========== 近战英雄 ==========
5001:{uuid:5001,name:"盾战士",path:"hk1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Melee,hp:300,ap:25,speed:120,
skills:[6001,6201],info:""},
5002:{uuid:5002,name:"圣骑士",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Melee,hp:340,ap:22,speed:115,
skills:[6001,6202],info:""},
5003:{uuid:5003,name:"风行剑士",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Melee,hp:210,ap:38,speed:170,
skills:[6001,6104],info:""},
5004:{uuid:5004,name:"刺客",path:"hc1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Melee,hp:140,ap:50,speed:180,
skills:[6001,6102],info:""},
5002:{uuid:5002,name:"奥术法师",path:"hm2", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:150,ap:40,speed:95,skills:[6008,6105],info:""},
5004:{uuid:5004,name:"火焰法师",path:"hm1", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:150,ap:45,speed:90,skills:[6006,6007],info:""},
5006:{uuid:5006,name:"冰法法师",path:"hz1", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:200,ap:20,speed:105,skills:[6004,6005],info:""},
5010:{uuid:5010,name:"寒霜术士",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:160,ap:36,speed:105,skills:[6005,6107],info:""},
5011:{uuid:5011,name:"炎爆法师",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:155,ap:42,speed:95,skills:[6007,6108],info:""},
// ========== 法师英雄 ==========
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:150,ap:40,speed:95,
skills:[6008,6105],info:""},
5102:{uuid:5012,name:"火焰法师",path:"hm1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:150,ap:45,speed:90,
skills:[6006,6007],info:""},
5103:{uuid:5013,name:"冰法法师",path:"hz1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:200,ap:20,speed:105,
skills:[6004,6005],info:""},
5104:{uuid:5104,name:"寒霜术士",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:160,ap:36,speed:105,
skills:[6005,6107],info:""},
5105:{uuid:5105,name:"炎爆法师",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:155,ap:42,speed:95,
skills:[6007,6108],info:""},
5003:{uuid:5003,name:"射手",path:"ha1", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:180,ap:30,speed:140,skills:[6002,6003],info:""},
5009:{uuid:5009,name:"游侠",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:170,ap:32,speed:145,skills:[6002,6101],info:""},
// ========== 远程英雄 ==========
5201:{uuid:5201,name:"射手",path:"ha1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:180,ap:30,speed:140,
skills:[6002,6003],info:""},
5202:{uuid:5202,name:"游侠",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:170,ap:32,speed:145,
skills:[6002,6101],info:""},
5005:{uuid:5005,name:"牧师",path:"hh1", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:160,ap:25,speed:100,skills:[6003,6100],info:""},
5012:{uuid:5012,name:"战地医师",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Mid,hp:220,ap:24,speed:120,skills:[6004,6204],info:""},
5013:{uuid:5013,name:"守护祭司",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Mid,hp:240,ap:20,speed:110,skills:[6006,6203],info:""},
5015:{uuid:5015,name:"秘法贤者",path:"", fac:FacSet.HERO, as:1,ss:5,type:HType.Long,hp:175,ap:34,speed:100,skills:[6003,6207],info:""},
// ========== 腐竹英雄 ==========
5301:{uuid:5301,name:"师",path:"hh1", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:160,ap:25,speed:100,
skills:[6003,6100],info:""},
5302:{uuid:5302,name:"战地医师",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Mid,hp:220,ap:24,speed:120,
skills:[6004,6204],info:""},
5303:{uuid:5303,name:"守护祭司",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Mid,hp:240,ap:20,speed:110,
skills:[6006,6203],info:""},
5304:{uuid:5304,name:"秘法贤者",path:"", fac:FacSet.HERO, lv:1,as:1,ss:5,type:HType.Long,hp:175,ap:34,speed:100,
skills:[6003,6207],info:""},
@@ -107,22 +127,22 @@ export const HeroInfo: Record<number, heroInfo> = {
//============== 兽人系列 ===============
// 1. 基础近战型
5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Melee,hp:60,ap:8,speed:180,skills:[6001,6003],info:""},
6001:{uuid:6001,name:"兽人战士",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Melee,hp:60,ap:8,speed:180,skills:[6001,6003],info:""},
// 2. 快速突击型
5301:{uuid:5301,name:"兽人斥候",path:"mo1", fac:FacSet.MON, as:1.2,ss:10,type:HType.Melee,hp:40,ap:12,speed:400,skills:[6001,6003],info:""},
6002:{uuid:6002,name:"兽人斥候",path:"mo1", fac:FacSet.MON, lv:1,as:1.2,ss:10,type:HType.Melee,hp:40,ap:12,speed:400,skills:[6001,6003],info:""},
// 3. 重型坦克型
5401:{uuid:5401,name:"兽人卫士",path:"mo3", fac:FacSet.MON, as:5.0,ss:10,type:HType.Melee,hp:200,ap:15,speed:60,skills:[6001,6003],info:""},
6003:{uuid:6003,name:"兽人卫士",path:"mo3", fac:FacSet.MON, lv:1,as:5.0,ss:10,type:HType.Melee,hp:200,ap:15,speed:60,skills:[6001,6003],info:""},
// 4. 远程骚扰型
5501:{uuid:5501,name:"兽人射手",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Long,hp:50,ap:10,speed:90,skills:[6001,6003],info:""},
6004:{uuid:6004,name:"兽人射手",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Long,hp:50,ap:10,speed:90,skills:[6001,6003],info:""},
// 5. 特殊机制型
5601:{uuid:5601,name:"兽人自爆兵",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Melee,hp:80,ap:200,speed:220,skills:[6001,6003],info:""},
5602:{uuid:5602,name:"兽人召唤师",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:100,skills:[6001,6003],info:""},
5603:{uuid:5603,name:"兽人祭司",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:105,skills:[6001,6003],info:""},
5604:{uuid:5604,name:"兽人图腾师",path:"mo1", fac:FacSet.MON, as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:110,skills:[6001,6003],info:""},
6005:{uuid:6005,name:"兽人自爆兵",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Melee,hp:80,ap:200,speed:220,skills:[6001,6003],info:""},
6006:{uuid:6006,name:"兽人召唤师",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:100,skills:[6001,6003],info:""},
6007:{uuid:6007,name:"兽人祭司",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:105,skills:[6001,6003],info:""},
6008:{uuid:6008,name:"兽人图腾师",path:"mo1", fac:FacSet.MON, lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:110,skills:[6001,6003],info:""},
// 6. 精英/BOSS型
5701:{uuid:5701,name:"兽人首领(BOSS)",path:"mo4", fac:FacSet.MON, as:2.5,ss:10,type:HType.Melee,hp:2000,ap:60,speed:120,skills:[6002,6004],info:""},
6009:{uuid:6009,name:"兽人首领(BOSS)",path:"mo4", fac:FacSet.MON, lv:1,as:2.5,ss:10,type:HType.Melee,hp:2000,ap:60,speed:120,skills:[6002,6004],info:""},
};

View File

@@ -39,7 +39,7 @@ export class Hero extends ecs.Entity {
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001, dropToY:number = pos.y) {
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001, dropToY:number = pos.y,hero_lv:number=1) {
scale = 1
// 查找空闲英雄槽位
let size=1
@@ -67,7 +67,7 @@ export class Hero extends ecs.Entity {
// 设置 Model 层属性(数据相关)
model.hero_uuid = uuid;
model.hero_name = hero.name;
model.lv = 1
model.lv = hero_lv;
model.type = hero.type;
model.fac = FacSet.HERO;
// 只有主角才挂载天赋组件
@@ -75,15 +75,16 @@ export class Hero extends ecs.Entity {
// ✅ 初始化技能数据(迁移到 HeroSkillsComp
// 设置基础属性
model.ap = hero.ap;
model.hp= model.hp_max = hero.hp;
model.ap = hero.ap*model.lv;
model.hp= model.hp_max = hero.hp*model.lv;
model.speed = hero.speed;
model.a_cd_max=hero.as
model.s_cd_max=hero.ss
// 初始化技能信息数组
if(hero.skills[0]) model.atk_id=hero.skills[0]
if(hero.skills[1]) {
model.skill_id=hero.skills[1]
if(hero.skills[0]) model.atk_id=hero.skills[0]*model.lv
let s_lv=hero.skills[model.lv]?model.lv:1
if(hero.skills[s_lv]) {
model.skill_id=hero.skills[s_lv]
}
model.updateSkillDistanceCache(model.skill_id || model.atk_id);

View File

@@ -2,7 +2,7 @@ import { mLogger } from "../common/Logger";
import { _decorator, Animation, AnimationClip, EventTouch, Label, Node, NodeEventType, Sprite, SpriteAtlas, Tween, tween, UIOpacity, Vec3, resources } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { CardConfig, CardType } from "../common/config/CardSet";
import { CardConfig, CardType, SpecialCardList } from "../common/config/CardSet";
import { CardUseComp } from "./CardUseComp";
import { HeroInfo } from "../common/config/heroSet";
import { BuffsList, SkillSet } from "../common/config/SkillSet";
@@ -22,9 +22,9 @@ export class CardComp extends CCComp {
@property(Node)
unLock: Node = null!
@property(Node)
ap_node=null!
info_node=null!
@property(Node)
hp_node=null!
oinfo_node=null!
@property(Node)
name_node=null!
@property(Node)
@@ -320,10 +320,23 @@ export class CardComp extends CCComp {
this.iconVisualToken += 1;
if (this.opacityComp) this.opacityComp.opacity = 255;
this.node.setPosition(this.restPosition);
this.setLabel(this.name_node, `${CardType[this.card_type]}-${this.card_uuid}`);
if(this.card_type===CardType.Hero){
this.setLabel(this.name_node, `${HeroInfo[this.card_uuid].name}Lv.${this.cardData.hero_lv}`);
this.info_node.active = true;
this.oinfo_node.active = false;
this.info_node.getChildByName("ap").getChildByName("val").getComponent(Label).string = `${HeroInfo[this.card_uuid].ap*this.cardData.hero_lv}`;
this.info_node.getChildByName("hp").getChildByName("val").getComponent(Label).string = `${HeroInfo[this.card_uuid].hp*this.cardData.hero_lv}`;
}else{
this.setLabel(this.name_node, `${SpecialCardList[this.card_uuid].name}Lv.${this.cardData.lv}`);
this.info_node.active = false;
this.oinfo_node.active = true;
this.oinfo_node.getChildByName("info").getComponent(Label).string = `${SpecialCardList[this.card_uuid].info}`;
}
this.setLabel(this.cost_node, `${this.card_cost}`);
if (this.ap_node) this.ap_node.active = false;
if (this.hp_node) this.hp_node.active = false;
const iconNode = this.icon_node as Node;
if (this.card_type === CardType.Hero) {
this.updateHeroAnimation(iconNode, this.card_uuid, this.iconVisualToken);
@@ -383,8 +396,8 @@ export class CardComp extends CCComp {
this.iconVisualToken += 1;
this.setLabel(this.name_node, "");
this.setLabel(this.cost_node, "");
if (this.ap_node) this.ap_node.active = false;
if (this.hp_node) this.hp_node.active = false;
if (this.info_node) this.info_node.active = false;
if (this.oinfo_node) this.oinfo_node.active = false;
this.clearIconAnimation(this.icon_node as Node);
const sprite = this.icon_node?.getComponent(Sprite) || this.icon_node?.getComponentInChildren(Sprite);
if (sprite) sprite.spriteFrame = null;

View File

@@ -52,17 +52,17 @@ export class MissionHeroCompComp extends CCComp {
}
private call_hero(event: string, args: any){
this.addHero(args.uuid)
this.addHero(args.uuid,args.hero_lv)
}
/** 添加英雄 */
private addHero(uuid:number=1001) {
private addHero(uuid:number=1001,hero_lv:number=1) {
console.log("addHero uuid:",uuid)
let hero_pos=0
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1
let landingPos:Vec3 = HeroPos[hero_pos].pos;
let spawnPos:Vec3 = v3(landingPos.x, landingPos.y + MissionHeroCompComp.HERO_DROP_HEIGHT, 0);
hero.load(spawnPos,scale,uuid,landingPos.y);
hero.load(spawnPos,scale,uuid,landingPos.y,hero_lv);
}

View File

@@ -22,9 +22,9 @@ export const MonType = {
//
}
export const MonList = {
[MonType.AP]: [5201,5401], // 近战高功
[MonType.SPEED]: [5301], // 高速贴近
[MonType.HP]: [5501], // 高血皮厚
[MonType.AP]: [6001,6002], // 近战高功
[MonType.SPEED]: [6003], // 高速贴近
[MonType.HP]: [6009], // 高血皮厚
//远程攻击
//
}