去掉skillcom处理 buff skill只负责动画运行和碰撞伤害

This commit is contained in:
2025-08-12 10:31:01 +08:00
parent ca8bbd397b
commit 1273ec6e99
13 changed files with 166 additions and 443 deletions

View File

@@ -36,8 +36,8 @@ export class SkillCom extends CCComp {
burn_count:number=0;
burn_value:number=0;
stun_time:number=0;
stun_ratto:number=0;
frost_ratto:number=0;
stun_ratio:number=0;
frost_ratio:number=0;
frost_time:number=0;
run_time:number=0;
hited_time:number=0;
@@ -46,7 +46,9 @@ export class SkillCom extends CCComp {
caster_crit_d:number=0;
puncture:number=0;
puncture_damage:number=0;
debuff_up:number=0;
debuff_value:number=0;
debuff_count:number=0;
// 组件引用
spine:sp.Skeleton=null;
anim:Animation=null;
@@ -159,23 +161,10 @@ export class SkillCom extends CCComp {
onAnimationFinished(){
// console.log("[SkillCom]:onAnimationFinished",this.s_uuid)
if (!this.skillConfig) return;
if(this.skillConfig.EType==EType.timeEnd) return
if(this.skillConfig.SType!=SType.damage){
this.to_do_buff()
}
this.is_destroy=true
}
to_do_buff(){
if (!this.skillConfig) return;
switch(this.skillConfig.SType){
case SType.shield:
this.caster.add_shield(this.skillConfig.buV)
break;
}
}
//单体伤害
single_damage(target:HeroViewComp,is_range:boolean=false){
// //console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
@@ -188,17 +177,17 @@ export class SkillCom extends CCComp {
}
target.do_atked(ap,this.caster_crit,this.caster_crit_d,
this.burn_count,this.burn_value,
this.stun_time,this.stun_ratto,
this.frost_time,this.frost_ratto,
this.stun_time,this.stun_ratio,
this.frost_time,this.frost_ratio,
this.skillConfig.AtkedType
) // ap 及暴击 属性已经在skill.ts 处理
// console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position)
if(this.skillConfig.debuff>0){
let debuff=this.skillConfig
let dev=debuff.deV*(100+this.caster.DEBUFF_VALUE)/100
let deR=debuff.deR+this.caster.DEBUFF_UP
let dev=debuff.deV*(100+this.debuff_value)/100
let deR=debuff.deR+this.debuff_up
dev=Math.round(dev*100)/100
let deC=debuff.deC+this.caster.DEBUFF_COUNT //dec只作为次数叠加
let deC=debuff.deC+this.debuff_count //dec只作为次数叠加
// //console.log("[SkillCom]:debuff",this.skillConfig.name,debuff.debuff,deUP.deV,deUP.deC)
target.add_debuff(debuff.debuff,dev,deC,deR)
}