fix:自动拾取禁止穿过滑冰

This commit is contained in:
ShakeFlower 2025-02-13 20:25:54 +08:00
parent 0f4441b510
commit eaadbcc4fe
2 changed files with 2 additions and 2 deletions

View File

@ -675,7 +675,7 @@ maps.prototype.getFgMapArray = function (floorId) {
maps.prototype._getBgFgNumber = function (name, x, y, floorId) { maps.prototype._getBgFgNumber = function (name, x, y, floorId) {
if (x == null) x = core.getHeroLoc('x'); if (x == null) x = core.getHeroLoc('x');
if (y == null) y = core.getHeroLoc('y'); if (y == null) y = core.getHeroLoc('y');
return this._getBgFgMapArray(name, floorId)[y][x]; return this._getBgFgMapArray(name, floorId)[x][y];
} }
maps.prototype.getBgNumber = function (x, y, floorId) { maps.prototype.getBgNumber = function (x, y, floorId) {

View File

@ -2002,7 +2002,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
const changeFloor = floor.changeFloor[loc]; const changeFloor = floor.changeFloor[loc];
const isEnemy = autoBattle && cls.startsWith('enemy'), const isEnemy = autoBattle && cls.startsWith('enemy'),
isItem = autoGet && cls === 'items'; isItem = autoGet && cls === 'items';
if (core.onSki(core.getBgNumber(x, y))) return false;
if (has(changeFloor)) { if (has(changeFloor)) {
if (!core.noPass(tx, ty, floorId) && !core.canMoveHero(nx, ny, dir)) { if (!core.noPass(tx, ty, floorId) && !core.canMoveHero(nx, ny, dir)) {
return false; return false;