todo 天赋逐个验证 + 掉血改独立

This commit is contained in:
2025-07-30 23:25:06 +08:00
parent 23ef6c3ca0
commit db2acbf52e
6 changed files with 20 additions and 25 deletions

View File

@@ -92,7 +92,6 @@ export class Hero extends ecs.Entity {
hv.cd = hv.cd_base = hero.cd
hv.hp= hv.hp_max = hv.hp_base=hero.hp+info.hp
hv.ap = hv.ap_base=hero.ap+info.ap;
hv.def =hero.def+info.def;
hero.buff.forEach((buff:any)=>{
switch(buff.buff_type){
case BuffAttr.CRITICAL:
@@ -110,12 +109,6 @@ export class Hero extends ecs.Entity {
case BuffAttr.CRITICAL_NO:
hv.crit_no=buff.value
break
case BuffAttr.BURN_COUNT:
hv.burn_count=buff.value
break
case BuffAttr.BURN_VALUE:
hv.burn_value=buff.value
break
case BuffAttr.PUNCTURE:
hv.puncture=buff.value
break
@@ -137,17 +130,14 @@ export class Hero extends ecs.Entity {
case BuffAttr.ATK:
hv.ap=hv.ap*(100+buff.value)/100
break
case BuffAttr.STUN_TIME:
hv.stun_time=buff.value
break
case BuffAttr.STUN_RATTO:
hv.stun_ratto=buff.value
break
case BuffAttr.FROST_RATIO:
hv.frost_ratto=buff.value
break
case BuffAttr.FROST_TIME:
hv.frost_time=buff.value
case BuffAttr.KNOCKBACK:
hv.knockback=buff.value
break
case BuffAttr.POWER_UP:
smc.vmdata.hero.POWER_UP+=buff.value

View File

@@ -67,6 +67,7 @@ export class HeroConComp extends CCComp {
case BuffAttr.CRITICAL_DMG:
this.heroView.change_crit_d(buff.value)
break
}
}
}
@@ -145,12 +146,12 @@ export class HeroConComp extends CCComp {
case BuffAttr.STUN_RATTO:
this.heroView.change_stun_ratto(tal.value)
break
case BuffAttr.REFLECT:
this.heroView.change_reflect(tal.value)
break
case BuffAttr.LIFESTEAL:
this.heroView.change_lifesteal(tal.value)
break
case BuffAttr.WFUNY:
this.heroView.change_wfuny(tal.value)
break
}
}
remove_talent_card(e:GameEvent,data:any){

View File

@@ -164,6 +164,7 @@ export class HeroViewComp extends CCComp {
start () {
this.as.idle()
this.BUFFCOMP=this.node.getComponent(BuffComp);
if(this.is_master) this.BUFFCOMP.vmdata_update()
/** 方向 */
this.node.setScale(this.scale,1);
this.node.getChildByName("top").setScale(this.scale,1);
@@ -231,6 +232,11 @@ export class HeroViewComp extends CCComp {
if(this.shield>6) this.shield=6
if(this.shield>0) this.BUFFCOMP.show_shield(true)
}
change_wfuny(wfuny: number){
this.wfuny+=wfuny
if(this.wfuny<0) this.wfuny=0
if(this.is_master) this.BUFFCOMP.vmdata_update()
}
change_puncture(puncture: number){
this.puncture+=puncture
if(this.puncture<1) this.puncture=1

View File

@@ -167,7 +167,7 @@ export class SkillConComp extends CCComp {
this.scheduleOnce(()=>{
this.HeroView.ex_show("blue")
this.doSkill(config,false,dmg)
},0.05)
},0.1)
}
// 保存定时器ID
this._timers[`skill_${config.uuid}`] = timerId;