diff --git a/src/data/tips.json b/src/data/tips.json index e0050a5..2aac0c8 100644 --- a/src/data/tips.json +++ b/src/data/tips.json @@ -30,5 +30,7 @@ "觉得卡顿?可以去试着设置里面关闭一些特性!", "从第二章开始,怪物负伤害量不会超过其生命的1/4", "生命回复不会超过防御的十分之一", - "不想看小贴士?设置里面可以关掉!" + "不想看小贴士?设置里面可以关掉!", + "不小心进入了追猎范围?读取自动存档撤回到进入前吧!", + "不小心进入了电摇嘲讽范围?读取自动存档撤回到进入前吧!" ] \ No newline at end of file diff --git a/src/game/game.ts b/src/game/game.ts index fc1dbb0..1973e9d 100644 --- a/src/game/game.ts +++ b/src/game/game.ts @@ -161,7 +161,7 @@ class GameListener extends EventEmitter { x: px, y: py, size - } = core.actions._getClickLoc(e.clientX, e.clientY); + } = core.actions._getClickLoc(e.offsetX, e.offsetY); const [bx, by] = getBlockLoc(px, py, size); const blocks = core.getMapBlocksObj(); if (this.mouseX !== bx || this.mouseY !== by) { @@ -207,7 +207,7 @@ class GameListener extends EventEmitter { x: px, y: py, size - } = core.actions._getClickLoc(e.clientX, e.clientY); + } = core.actions._getClickLoc(e.offsetX, e.offsetY); const [bx, by] = getBlockLoc(px, py, size); const blocks = core.getMapBlocksObj(); const block = blocks[`${bx},${by}`]; diff --git a/src/plugin/game/replay.ts b/src/plugin/game/replay.ts index 65eb71a..5d18ffa 100644 --- a/src/plugin/game/replay.ts +++ b/src/plugin/game/replay.ts @@ -218,10 +218,11 @@ export function init() { (core.flags.flyNearStair && !core.nearStair()) ) return false; - if (core.flyTo(floorId, core.replay)) { - tipAndWait(`飞往:${floorId}`, 1000); - return true; - } - return false; + tipAndWait(`飞往:${floorId}`, 1000).then(() => { + if (!core.flyTo(floorId, core.replay)) { + core.control._replay_error(action); + } + }); + return true; }); } diff --git a/src/types/control.d.ts b/src/types/control.d.ts index f32644b..4917879 100644 --- a/src/types/control.d.ts +++ b/src/types/control.d.ts @@ -1165,6 +1165,7 @@ interface Control { _moveAction_popAutomaticRoute(): void; _replay_SL(): void; _replay_viewMap(): void; + _replay_error(action: string): void; } declare const control: new () => Control;