From 4bd2e5566a2cd437a774e1ccc9b340a93d0debb3 Mon Sep 17 00:00:00 2001 From: panfudan Date: Fri, 25 Jul 2025 23:17:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=20=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E8=83=BD=E9=87=8F=E5=A2=9E=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/common/config/Mission.ts | 5 +---- assets/script/game/common/config/SkillSet.ts | 10 ++-------- assets/script/game/hero/Hero.ts | 17 ++--------------- assets/script/game/hero/HeroViewComp.ts | 8 ++++---- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/assets/script/game/common/config/Mission.ts b/assets/script/game/common/config/Mission.ts index 9ba7880f..65ccd3b7 100644 --- a/assets/script/game/common/config/Mission.ts +++ b/assets/script/game/common/config/Mission.ts @@ -128,10 +128,7 @@ export const VmInfo = { wind:0, thorns:0, lifesteal:0, - ATK_TO_POWER:0, - ATKED_TO_POWER:0, - CRIT_TO_POWER:0, - DODGE_TO_POWER:0, + POWER_UP:0, atk_count:0, atked_count:0, crit_count:0, diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index db87081a..dd67debf 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -128,10 +128,7 @@ export enum BuffAttr { STUN_RATTO = 26, //击晕概率 FROST_TIME = 27, //冰冻时间 HP_MAX = 28, //最大生命值数值 - ATK_TO_POWER = 29, //攻击涨能量 - ATKED_TO_POWER = 30, //被攻击涨能量 - CRIT_TO_POWER = 31, //暴击涨能量 - DODGE_TO_POWER = 32, //闪避涨能量 + POWER_UP = 29, //能量增加 } export const geDebuffNum=()=>{ @@ -183,10 +180,7 @@ export const getBuffNum=()=>{ STUN_RATTO:0, FROST_TIME:0, HP_MAX:0,//最大生命值数值 - ATK_TO_POWER:0, - ATKED_TO_POWER:0, - CRIT_TO_POWER:0, - DODGE_TO_POWER:0, + POWER_UP:0,//能量增加 } } diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 0a985fe8..faa47d6f 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -93,10 +93,6 @@ export class Hero extends ecs.Entity { hv.hp= hv.hp_max = hv.hp_base=hero.hp+info.hp hv.ap = hero.ap+info.ap; hv.ap_base=hero.ap+info.ap; - smc.vmdata.hero.ATK_TO_POWER=FightSet.ATK_TO_POWER - smc.vmdata.hero.ATKED_TO_POWER=FightSet.ATKED_TO_POWER - smc.vmdata.hero.CRIT_TO_POWER=FightSet.CRIT_TO_POWER - smc.vmdata.hero.DODGE_TO_POWER=FightSet.DODGE_TO_POWER hero.buff.forEach((buff:any)=>{ switch(buff.buff_type){ case BuffAttr.CRITICAL: @@ -153,17 +149,8 @@ export class Hero extends ecs.Entity { case BuffAttr.FROST_TIME: hv.frost_time=buff.value break - case BuffAttr.ATK_TO_POWER: - smc.vmdata.hero.ATK_TO_POWER+=buff.value - break - case BuffAttr.ATKED_TO_POWER: - smc.vmdata.hero.ATKED_TO_POWER+=buff.value - break - case BuffAttr.CRIT_TO_POWER: - smc.vmdata.hero.CRIT_TO_POWER+=buff.value - break - case BuffAttr.DODGE_TO_POWER: - smc.vmdata.hero.DODGE_TO_POWER+=buff.value + case BuffAttr.POWER_UP: + smc.vmdata.hero.POWER_UP+=buff.value break } }) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 284ab7b2..5ee8bf72 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -461,11 +461,11 @@ export class HeroViewComp extends CCComp { let damage = this.count_damage(remainingDamage) if(is_crit) { damage = Math.floor(damage * (1 + (FightSet.CRIT_DAMAGE+crit_d)/100)) - if(this.fac==FacSet.MON) smc.vmdata.hero.power+=smc.vmdata.hero.CRIT_TO_POWER //暴击涨能量 怪物被暴击,因为只有一个英雄 直接处理 + if(this.fac==FacSet.MON) smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.CRIT_TO_POWER //暴击涨能量 怪物被暴击,因为只有一个英雄 直接处理 } this.hp -= damage; - if(this.fac==FacSet.HERO) {smc.vmdata.hero.power+=smc.vmdata.hero.ATKED_TO_POWER;console.log("被攻击涨能量",this)} //被攻击涨能量 - if(this.fac==FacSet.MON) {smc.vmdata.hero.power+=smc.vmdata.hero.ATK_TO_POWER;console.log("攻击命中涨能量",this)} //攻击命中涨能量 因为是只有1个英雄 直接处理 + if(this.fac==FacSet.HERO) {smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATKED_TO_POWER;console.log("被攻击涨能量",this)} //被攻击涨能量 + if(this.fac==FacSet.MON) {smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATK_TO_POWER;console.log("攻击命中涨能量",this)} //攻击命中涨能量 因为是只有1个英雄 直接处理 if(this.hp <= 0) { if(this == null) return; @@ -531,7 +531,7 @@ export class HeroViewComp extends CCComp { } check_dodge(){ - if(this.fac==FacSet.HERO) smc.vmdata.hero.power+=smc.vmdata.hero.DODGE_TO_POWER //闪避涨能量 + if(this.fac==FacSet.HERO) smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.DODGE_TO_POWER //闪避涨能量 if(this.dod > 0){ let random = Math.random()*100 if(random < this.dod) {