diff --git a/_server/table/functions.comment.js b/_server/table/functions.comment.js index 8dbc5ff0..9326bf12 100644 --- a/_server/table/functions.comment.js +++ b/_server/table/functions.comment.js @@ -153,7 +153,7 @@ var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "_lint": true, "_data": "更新状态栏" }, - "getCheckBlock": { + "updateCheckBlock": { "_leaf": true, "_type": "textarea", "_lint": true, diff --git a/libs/control.js b/libs/control.js index 3aa81cd2..a166c2a3 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1174,19 +1174,9 @@ control.prototype._moveDirectyFollowers = function (x, y) { } } -////// 获取某层的阻激夹域信息 ////// -control.prototype.getCheckBlock = function (floorId) { - return this.controldata.getCheckBlock(floorId); -} - ////// 更新领域、夹击、阻击的伤害地图 ////// control.prototype.updateCheckBlock = function (floorId) { - const checkBlockInfo = this.controldata.getCheckBlock(floorId); - if (checkBlockInfo) { - core.status.checkBlock = checkBlockInfo; - return true; - } - return false; + return this.controldata.updateCheckBlock(floorId); } ////// 检查并执行领域、夹击、阻击事件 ////// diff --git a/libs/maps.js b/libs/maps.js index f92a9a36..ad634fbc 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -832,8 +832,7 @@ maps.prototype._canMoveDirectly_checkGlobal = function (floorId) { } maps.prototype._canMoveDirectly_checkStartPoint = function (sx, sy, floorId) { - let checkBlockInfo = core.getCheckBlock(floorId); - if (checkBlockInfo && checkBlockInfo.damage[sx + "," + sy]) return false; + if (core.status.checkBlock.damage[sx + "," + sy]) return false; var block = core.getBlock(sx, sy, floorId); if (block != null) { // 只有起点是传送点才是能无视 @@ -900,8 +899,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y, floo if (!ignore) return false; } - const checkBlockInfo = core.control.getCheckBlock ? core.control.getCheckBlock(floorId) : - core.status.checkBlock; + const checkBlockInfo = core.status.checkBlock; // 是否存在阻激夹域伤害 if (checkBlockInfo) { if (checkBlockInfo.damage[index]) return false; @@ -909,7 +907,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y, floo // 是否存在捕捉 if (checkBlockInfo.ambush[index]) return false; // 是否在追猎的视野中 - if (checkBlockInfo.chase[index]) return false; + if (checkBlockInfo.chase?.[index]) return false; } return true; } diff --git a/project/functions.js b/project/functions.js index 5aaf34f6..de7a2930 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1353,7 +1353,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = // updateDamage只能在此处执行!!更新全地图显伤 core.updateDamage(); }, - "getCheckBlock": function (floorId) { + "updateCheckBlock": function (floorId) { // 领域、夹击、阻击等的伤害值计算 floorId = floorId || core.status.floorId; if (!floorId || !core.status.maps) return; @@ -1582,7 +1582,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = */ core.flags.canGoDeadZone = canGoDeadZone; - return { + core.status.checkBlock = { damage: damage, type: type, repulse: repulse, diff --git a/runtime.d.ts b/runtime.d.ts index dff66e46..29105fbe 100644 --- a/runtime.d.ts +++ b/runtime.d.ts @@ -838,9 +838,6 @@ interface control { /** 更新跟随者坐标 */ updateFollowers(): void - /** 获取某一层的checkBlock信息 */ - getCheckBlock(floorId?: string): gameStatus['checkBlock'] | undefined; - /** 更新领域、夹击、阻击的伤害地图 */ updateCheckBlock(floorId?: string): boolean