diff --git a/libs/enemys.js b/libs/enemys.js index bbd05e97..2dacd65f 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -243,6 +243,7 @@ enemys.prototype._nextCriticals_useBinarySearch = function (enemy, info, number, while (start < end) { var mid = Math.floor((start + end) / 2); + if (mid - start > end - mid) mid--; var nextInfo = core.enemys.getDamageInfo(enemy, {"atk": mid}, x, y, floorId); if (nextInfo == null || (typeof nextInfo == 'number')) return null; if (pre > nextInfo.damage) end = mid; diff --git a/libs/maps.js b/libs/maps.js index 3a2a69b3..f6ecd5df 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -406,7 +406,7 @@ maps.prototype.resizeMap = function (floorId) { core.bigmap.v2 = core.bigmap.width * core.bigmap.height > core.bigmap.threshold; var width = core.bigmap.v2 ? core.__PIXELS__ + 64 : core.bigmap.width * 32; - var height = core.bigmap.v2 ? core.__PIXELS__ + 64 : core.bigmap.width * 32; + var height = core.bigmap.v2 ? core.__PIXELS__ + 64 : core.bigmap.height * 32; core.bigmap.canvas.forEach(function (cn) { core.canvas[cn].canvas.setAttribute("width", width);