fix a severe issue causing a stuck state

This commit is contained in:
Yang-z
2024-11-30 12:12:01 +08:00
parent a6cd222fc4
commit 243c351e77
11 changed files with 93 additions and 51 deletions

View File

@@ -29,8 +29,7 @@
"(恢复)狗粮-稻妻-神无冢.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂①-6个21个.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂②-7个21个.json",
"【收尾】狗粮-稻妻-神无冢-踏鞴砂③-8个21个.json",
"(恢复)狗粮-稻妻-神无冢.json"
"【收尾】狗粮-稻妻-神无冢-踏鞴砂③-8个21个.json"
]; // 97+21个
const pathingB = [
@@ -62,8 +61,7 @@
"狗粮-稻妻-鹤观-东偏中-2个.json",
"狗粮-稻妻-鹤观-南-2个.json",
"(恢复)狗粮-稻妻-清籁岛.json",
"【收尾】狗粮-稻妻-清籁岛-清籁丸-20个.json",
"(恢复)狗粮-稻妻-清籁岛.json",
"【收尾】狗粮-稻妻-清籁岛-清籁丸-20个.json"
]; // 97+20个
const pathingE = [
@@ -91,17 +89,20 @@
}
// 准备
async function init() {
async function init(resizeMap = true) {
// restore and alignment
await genshin.tp("253.146484375", "1285.14306640625"); await sleep(3000);
// zoom map to 75%
keyPress("M"); await sleep(1000);
for (let i = 0; i < 5; i++) {
click(42, 420); await sleep(500); // zoom in
if (resizeMap) {
// zoom map to 75%
keyPress("M"); await sleep(1000);
for (let i = 0; i < 5; i++) {
click(42, 420); await sleep(500); // zoom in
}
click(42, 645); await sleep(1000); // zoom out
keyPress("M"); await sleep(1000);
}
click(42, 645); await sleep(1000); // zoom out
keyPress("M"); await sleep(1000);
}
// 分解圣遗物
@@ -153,14 +154,15 @@
// main
determinePath();
await init();
// A or B
await init();
log.info(`开始执行${path}线路。`);
if (path == 'A') await batch(folderA, pathingA);
else await batch(folderB, pathingB);
// Extra
await init(false);
log.info(`开始执行额外线路。`);
await batch(folderE, pathingE, true); // 强制交互