From e97198495bac20a76291a3e37837ba619446d419 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 27 May 2020 02:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=BB=E5=87=BBbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/functions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/functions.js b/project/functions.js index 2459519b..f86b83fa 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1123,7 +1123,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = type[currloc]["阻击伤害"] = true; var rdir = core.turnDirection(":back", dir); - if (core.canMoveHero(x, y, rdir, floorId)) { + // 检查下一个点是否存在事件(从而判定是否移动) + var rnx = x + core.utils.scan[rdir].x, + rny = y + core.utils.scan[rdir].y; + if (core.canMoveHero(x, y, rdir, floorId) && core.getBlock(rnx, rny, floorId) == null) { repulse[currloc] = (repulse[currloc] || []).concat([ [x, y, id, rdir] ]);