技能设置清理

This commit is contained in:
2025-10-16 11:14:28 +08:00
parent 7ec02c4b9e
commit 31eedceeb3
39 changed files with 812 additions and 2752 deletions

View File

@@ -1,6 +1,6 @@
import { _decorator, Component, Node, ProgressBar, v3, Vec3 } from 'cc';
import { HeroViewComp } from './HeroViewComp';
import { BuffAttr, CdType, DTType, SKILL_CONST, SkillSet, SType, TGroup, TType } from '../common/config/SkillSet';
import { BuffAttr,SKILL_CONST, SkillSet, SType, TGroup, } from '../common/config/SkillSet';
import { Skill } from '../skills/Skill';
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { oops } from 'db://oops-framework/core/Oops';
@@ -41,15 +41,14 @@ export class SkillConComp extends CCComp {
if(this.HeroView.DEBUFF_STUN <= 0&&this.HeroView.DEBUFF_FROST <= 0) {
let skills=this.HeroView.skills
for(let i=0;i<skills.length;i++){
if(SkillSet[skills[i].uuid].CdType==CdType.cd) {
skills[i].cd += dt;
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
this.castSkill(SkillSet[skills[i].uuid])
this.HeroView.skills[i].cd = 0
}
}
skills[i].cd += dt;
if(skills[i].cd > (i==0?this.HeroView.Attrs[BuffAttr.ATK_CD]:skills[i].cd_max)){
if(SkillSet[skills[i].uuid].SType==SType.damage&&this.HeroView.is_atking){
this.castSkill(SkillSet[skills[i].uuid])
this.HeroView.skills[i].cd = 0
}
}
}
if(skills[1]){
if(this.HeroView.fac==FacSet.HERO) {