技能有bug 需要处理

This commit is contained in:
2025-08-12 11:02:16 +08:00
parent 1273ec6e99
commit 61cbd6e7bd
5 changed files with 382 additions and 505 deletions

View File

@@ -172,7 +172,7 @@ export class HeroViewComp extends CCComp {
hp_show(){
// if(this.node.getComponent(HeroViewComp).fac == 0) return
let hp=this.hp;
let hp_max=this.hp_max;
let hp_max=this.Attrs[BuffAttr.HP_MAX];
let hp_progress= hp/hp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar).progress = hp_progress;
// this.node.getChildByName("top").getChildByName("hp").active = (hp == hp_max) ? false : true;
@@ -211,7 +211,7 @@ export class HeroViewComp extends CCComp {
add_hp(hp: number = 0,is_num:boolean=true) {
this.BUFFCOMP.heathed();
let real_hp=0
let hp_max=this.hp_max
let hp_max=this.Attrs[BuffAttr.HP_MAX]
let lost_hp=hp_max-this.hp
if(is_num){
if(lost_hp > hp){
@@ -306,8 +306,8 @@ export class HeroViewComp extends CCComp {
// this.is_stop=true
break
case DebuffAttr.DEHP:
this.hp_max-=deV/100*this.hp_max
if(this.hp-this.hp_max>0) this.hp=this.hp_max
this.Attrs[BuffAttr.HP_MAX]-=deV/100*this.Attrs[BuffAttr.HP_MAX]
if(this.hp-this.Attrs[BuffAttr.HP_MAX]>0) this.hp=this.Attrs[BuffAttr.HP_MAX]
break
case DebuffAttr.DEATK: //99为具体数字 并且局内永久生效,其他为百分比
if(deC == 99){