diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 77cbbf34..a6a5f09b 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -8,6 +8,7 @@ import { BoxSet, FacSet } from "../common/config/BoxSet"; import { HeroInfo, HeroPos, HType } from "../common/config/heroSet"; import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp"; import { GameEvent } from "../common/config/GameEvent"; +import { BuffAttr, getBuffNum, SkillSet, SType } from "../common/config/SkillSet"; /** 角色实体 */ @ecs.register(`Hero`) @@ -72,30 +73,30 @@ export class Hero extends ecs.Entity { hv.hero_name= hero.name; hv.hp=hv.hp_max=hv.hp_base=HeroInfo[uuid].hp; hv.mp=hv.mp_max=hv.mp_base=HeroInfo[uuid].mp; - // hv.Attrs=getBuffNum() - // hv.Attrs[BuffAttr.SPEED]=hv.speed = hero.speed; - // hv.Attrs[BuffAttr.DIS]=hv.dis=hero.dis; - // hv.Attrs[BuffAttr.ATK_CD]=hv.cd=hero.cd - // hv.Attrs[BuffAttr.AP]=hv.ap=HeroInfo[uuid].ap; - // hv.Attrs[BuffAttr.DEF]=HeroInfo[uuid].def; - // hero.buff.forEach((buff:any)=>{ - // hv.apply_buff(buff.type,buff.value) - // }) - // for(let i=0;i{ - // hv.apply_buff(buff.buff, buff.buV) - // }) - // continue - // }else{ - // hv.skills.push({ - // cd:0, - // uuid:hero.skills[i], - // cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd - // }) - // } - // } + hv.Attrs=getBuffNum() + hv.Attrs[BuffAttr.SPEED]=hv.speed = hero.speed; + hv.Attrs[BuffAttr.DIS]=hv.dis=hero.dis; + hv.Attrs[BuffAttr.ATK_CD]=hv.cd=hero.cd + hv.Attrs[BuffAttr.AP]=hv.ap=HeroInfo[uuid].ap; + hv.Attrs[BuffAttr.DEF]=HeroInfo[uuid].def; + hero.buff.forEach((buff:any)=>{ + hv.apply_buff(buff.type,buff.value) + }) + for(let i=0;i{ + hv.apply_buff(buff.buff, buff.buV) + }) + continue + }else{ + hv.skills.push({ + cd:0, + uuid:hero.skills[i], + cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd + }) + } + } return hv } } \ No newline at end of file