This commit is contained in:
2025-09-01 17:27:24 +08:00
parent da0237d49c
commit 8e044fcf3c
9 changed files with 6650 additions and 5553 deletions

View File

@@ -8,7 +8,7 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
import { getHeroStatsByLevel, HeroInfo, HeroPos, HType } from "../common/config/heroSet";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { GameEvent } from "../common/config/GameEvent";
import { BuffAttr, getBuffNum, SkillSet } from "../common/config/SkillSet";
import { BuffAttr, getBuffNum, SkillSet, SType } from "../common/config/SkillSet";
import { FightSet } from "../common/config/Mission";
import { Skill } from "../skills/Skill";
/** 角色实体 */
@@ -87,11 +87,19 @@ export class Hero extends ecs.Entity {
hv.apply_buff(buff.type,buff.value)
})
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
})
if(SkillSet[hero.skills[i]].SType==SType.buff){
let buffs=SkillSet[hero.skills[i]].buffs
buffs.forEach((buff:any)=>{
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
}