diff --git a/libs/enemys.js b/libs/enemys.js index bc0eb169..9dc0470f 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -461,7 +461,7 @@ enemys.prototype.hasEnemyLeft = function (enemyId, floorId) { var mapBlocks = core.status.maps[floorId[i]].blocks; for (var b = 0; b < mapBlocks.length; b++) { if (!mapBlocks[b].disable && mapBlocks[b].event.cls.indexOf('enemy') === 0) { - if (enemyMap === null || enemyMap[mapBlocks[b].event.id]) return true; + if (enemyMap === null || enemyMap[core.getFaceDownId(mapBlocks[b])]) return true; } } } diff --git a/runtime.d.ts b/runtime.d.ts index 8223922d..b045a9e9 100644 --- a/runtime.d.ts +++ b/runtime.d.ts @@ -1827,7 +1827,7 @@ declare class maps { getBlockInfo(block?: any): any /** 获得某个图块对应行走图朝向向下的那一项的id;如果不存在行走图绑定则返回自身id */ - getFaceDownIds(block?: any): string + getFaceDownId(block?: any): string /** 根据图块的索引来隐藏图块 */ hideBlockByIndex(index?: any, floorId?: string): void