From 880566649274527e15d834315a80b932877f336d Mon Sep 17 00:00:00 2001 From: panw Date: Thu, 26 Dec 2024 16:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E5=BE=A1=E6=9C=80=E5=A4=9A=E6=8A=B5?= =?UTF-8?q?=E6=B6=8850%=E4=BC=A4=E5=AE=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/Main.ts | 4 ++-- assets/script/game/hero/HeroViewComp.ts | 8 ++++---- assets/script/game/map/HCardComp.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 93631133..ba054f10 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -13,8 +13,8 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - if (DEBUG) profiler.showStats(); - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + // if (DEBUG) profiler.showStats(); + // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb // // | EPhysics2DDrawFlags.Pair // |EPhysics2DDrawFlags.CenterOfMass // |EPhysics2DDrawFlags.Joint diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 178a2035..440e0974 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -352,13 +352,13 @@ export class HeroViewComp extends CCComp { } if(this.check_dodge()) return this.in_atked(); - let l_hp=(skill.ap-this.def)*-1 + let d=this.def/skill.ap + if(d > 1) d = 1 + let l_hp=skill.ap*(1-d*0.5) if(skill.is_crit){ l_hp = l_hp * (150+skill.crit_add)/100 } - if(l_hp >= 0){ - l_hp=-1 //最低1点伤害 - } + l_hp=-1*Math.ceil(l_hp) this.hp_change(l_hp,skill.is_crit); } //能量判断 diff --git a/assets/script/game/map/HCardComp.ts b/assets/script/game/map/HCardComp.ts index bc18fff1..cc4e1abe 100644 --- a/assets/script/game/map/HCardComp.ts +++ b/assets/script/game/map/HCardComp.ts @@ -48,8 +48,8 @@ export class HCardComp extends CCComp { this.node.getChildByName("bg").getComponent(Sprite).grayscale=false this.is_dead=false } - this.hp.string=this.heros[this.hi].HeroView.rhp_max - this.ap.string=this.heros[this.hi].HeroView.ap*(smc.vmdata.mission.ap+100)/100 + this.hp.string=(this.heros[this.hi].HeroView.rhp_max).toFixed(0) + this.ap.string=(this.heros[this.hi].HeroView.ap*(smc.vmdata.mission.ap+100)/100).toFixed(0) this.life.progress=this.heros[this.hi].HeroView.hp/this.heros[this.hi].HeroView.rhp_max this.pw.progress=this.heros[this.hi].HeroView.pw/this.heros[this.hi].HeroView.pwm