From fa6f6cf0af69a170175682738b18677446622cc5 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Tue, 26 May 2020 22:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=BB=E5=87=BB=E6=8E=A8?= =?UTF-8?q?=E4=B8=8B=E6=82=AC=E5=B4=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/events.js | 2 +- libs/maps.js | 6 +++--- project/functions.js | 13 +++++++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/libs/events.js b/libs/events.js index 4c7ae9b9..64128ad3 100644 --- a/libs/events.js +++ b/libs/events.js @@ -776,7 +776,7 @@ events.prototype.pushBox = function (data) { // 检测能否推上去 if (!core.canMoveHero()) return; var canGoDeadZone = core.flags.canGoDeadZone; - core.flags.canGoDeadZone = false; + core.flags.canGoDeadZone = true; if (!core.canMoveHero(data.x, data.y, direction)) { core.flags.canGoDeadZone = canGoDeadZone; return; diff --git a/libs/maps.js b/libs/maps.js index d13ece8f..54137aeb 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -511,9 +511,9 @@ maps.prototype._canMoveHero_checkPoint = function (x, y, direction, floorId, ext return false; // 3. 检查是否能进将死的领域 - if (floorId == core.status.floorId - && core.status.hero.hp <= (core.status.checkBlock.damage[nx + "," + ny]||0) - && !core.flags.canGoDeadZone && extraData.eventArray[ny][nx] == 0) + if (floorId == core.status.floorId && !core.flags.canGoDeadZone && + core.status.hero.hp <= (core.status.checkBlock.damage[nx + "," + ny]||0) + && extraData.eventArray[ny][nx] == 0) return false; return true; diff --git a/project/functions.js b/project/functions.js index 9df777c5..2459519b 100644 --- a/project/functions.js +++ b/project/functions.js @@ -126,6 +126,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = // ---------- 重绘新地图;这一步将会设置core.status.floorId ---------- // core.drawMap(floorId); + // item_ratio兼容性... + if (core.status.thisMap.ratio == null && core.status.thisMap.item_ratio != null) { + core.status.thisMap.ratio = core.status.thisMap.item_ratio; + } // 切换楼层BGM if (core.status.maps[floorId].bgm) { @@ -546,6 +550,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } // TODO:如果有其他类型光环怪物在这里仿照添加检查 + // 注:新增新的类光环属性(需要遍历全图的)需要在特殊属性定义那里的第五项写1,参见光环和支援的特殊属性定义。 } }); @@ -1061,6 +1066,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = repulse = {}, // 每个点的阻击怪信息 ambush = {}; // 每个点的捕捉信息 var needCache = false; + var canGoDeadZone = core.flags.canGoDeadZone; + core.flags.canGoDeadZone = true; // 计算血网和领域、阻击、激光的伤害,计算捕捉信息 for (var loc in blocks) { @@ -1116,10 +1123,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = type[currloc]["阻击伤害"] = true; var rdir = core.turnDirection(":back", dir); - // 检查下一个点是否存在事件(从而判定是否移动) - var rnx = x + core.utils.scan[rdir].x, - rny = y + core.utils.scan[rdir].y; - if (rnx >= 0 && rnx < width && rny >= 0 && rny < height && core.getBlock(rnx, rny, floorId) == null) { + if (core.canMoveHero(x, y, rdir, floorId)) { repulse[currloc] = (repulse[currloc] || []).concat([ [x, y, id, rdir] ]); @@ -1217,6 +1221,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } } + core.flags.canGoDeadZone = canGoDeadZone; core.status.checkBlock = { damage: damage, type: type,