From 861a44ae20b098489d6ef6881d16543c20d7b61e Mon Sep 17 00:00:00 2001 From: oc Date: Fri, 14 Dec 2018 00:26:29 +0800 Subject: [PATCH] Fix battle check --- project/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/functions.js b/project/functions.js index a9fd87ac..9e06e527 100644 --- a/project/functions.js +++ b/project/functions.js @@ -554,7 +554,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = init_damage += Math.floor(core.values.purify * hero_mdef); // 勇士每回合对怪物造成的伤害 - var hero_per_damage = hero_atk - mon_def; + var hero_per_damage = Math.max(hero_atk - mon_def, 0); // 如果没有破防,则不可战斗 if (hero_per_damage <= 0) return null;