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