英雄去除 smchp

This commit is contained in:
2025-08-11 22:33:22 +08:00
parent 5bcf5e737b
commit 919ff09351
5 changed files with 33 additions and 83 deletions

View File

@@ -8,7 +8,7 @@ import { HeroInfo } from "../common/config/heroSet";
import { MonModelComp } from "./MonModelComp";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { SkillConComp } from "./SkillConComp";
import { BuffAttr } from "../common/config/SkillSet";
import { BuffAttr, SkillSet } from "../common/config/SkillSet";
/** 角色实体 */
@ecs.register(`Monster`)
export class Monster extends ecs.Entity {
@@ -104,7 +104,13 @@ export class Monster extends ecs.Entity {
hv.cd = hero.cd
hv.atk_skill=hero.skills[0]
for(let i=0;i<hero.skills.length;i++){
hv.skills.push({
cd:0,
uuid:hero.skills[i],
cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd
})
}
// 处理原有Buff
hero.buff.forEach((buff:any)=>{
this.applyBuffToMonster(hv, buff);