From 0c07d2cb2039cb5f0fc15568f29effba7025ca4e Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Fri, 30 Oct 2020 10:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=95=E6=8D=89canMoveHero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/functions.js b/project/functions.js index 30798fa3..8d52dfa4 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1285,7 +1285,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = var nx = x + core.utils.scan[dir].x, ny = y + core.utils.scan[dir].y, currloc = nx + "," + ny; - if (nx < 0 || nx >= width || ny < 0 || ny >= height) continue; + if (nx < 0 || nx >= width || ny < 0 || ny >= height || !core.canMoveHero(x, y, dir, floorId)) continue; ambush[currloc] = (ambush[currloc] || []).concat([ [x, y, id, dir] ]);