YNF-AutoEat - V1.6.2版本更新 (#2825)

* YNF-AutoEat - V1.6.2版本更新

修复了一些bug

* 修改描述错误
This commit is contained in:
江紫烟owo
2026-01-31 16:01:34 +08:00
committed by GitHub
parent 8d39e6c960
commit 5bef9841ca
3 changed files with 21 additions and 7 deletions

View File

@@ -20,10 +20,13 @@
## 致谢 ## 致谢
1. 感谢古又老师的悉心指导,没有古又老师就没有现在的~~伊涅芙灭绝计划~~调味品批量生产计划 1. 感谢古又老师的悉心指导,没有古又老师就没有现在的~~伊涅芙灭绝计划~~调味品批量生产计划
2. 感谢氨气老师和秋秋云老师,在审核时提供了宝贵的意见和建议。 2. 感谢氨气老师和秋秋云老师,在审核时提供了宝贵的意见和建议。
3. 感谢所有提供意见和修改建议用户,他们提供的素材让脚本运行更稳定
--------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------
## 更新日志 ## 更新日志
### 1.6.22026.01.31
1. 修复了一些bug
### 1.6.12025.11.04 ### 1.6.12025.11.04
1. 针对资源释放文字识别部分进行了重构 1. 针对资源释放,对文字识别部分进行了重构
2. 优化了代码结构,添加了调试信息 2. 优化了代码结构,添加了调试信息
### 1.62025.11.02 ### 1.62025.11.02
1. 批量添加dispose 1. 批量添加dispose

View File

@@ -305,6 +305,7 @@
throw new Error("未找到指定队伍"); throw new Error("未找到指定队伍");
} // 在神像切换两次都失败,大概率是没有找到哦队伍 } // 在神像切换两次都失败,大概率是没有找到哦队伍
} }
await genshin.returnMainUi();
return true; return true;
} catch (e) { } catch (e) {
log.error("队伍切换失败,可能处于联机模式或其他不可切换状态:" + e.message); log.error("队伍切换失败,可能处于联机模式或其他不可切换状态:" + e.message);
@@ -354,7 +355,7 @@
} }
// 伊涅芙跳楼机 // 伊涅芙跳楼机
async function doit() { async function doit(dieCount) {
const randomNumber = Math.floor(Math.random() * 3) + 1; const randomNumber = Math.floor(Math.random() * 3) + 1;
if (randomNumber == 1) { log.info("即使分离,我们的心始终相连"); } if (randomNumber == 1) { log.info("即使分离,我们的心始终相连"); }
if (randomNumber == 2) { log.info("再见了伊涅芙,希望你喜欢这几分钟的戏份"); } if (randomNumber == 2) { log.info("再见了伊涅芙,希望你喜欢这几分钟的戏份"); }
@@ -411,6 +412,19 @@
} }
} }
let YOffset = 0; // Y轴偏移量根据需要调整
const maxRetries = 20; // 最大重试次数
let retries = 0; // 当前重试次数
if (dieCount == 0) {
await click(165, 1015);
await sleep(800);
await click(165, 1015);
await sleep(800);
await click(495, 1015);
await sleep(800);
}
//滚轮预操作 //滚轮预操作
await moveMouseTo(1287, 131); await moveMouseTo(1287, 131);
await sleep(100); await sleep(100);
@@ -418,9 +432,6 @@
await sleep(100); await sleep(100);
await moveMouseTo(1287, 161); await moveMouseTo(1287, 161);
let YOffset = 0; // Y轴偏移量根据需要调整
const maxRetries = 20; // 最大重试次数
let retries = 0; // 当前重试次数
while (retries < maxRetries) { while (retries < maxRetries) {
const ifpingguo = await imageRecognitionEnhanced(pingguo, 1, 0, 0, 115, 120, 1150, 880);//识别"苹果"图片 const ifpingguo = await imageRecognitionEnhanced(pingguo, 1, 0, 0, 115, 120, 1150, 880);//识别"苹果"图片
if (ifpingguo.found) { if (ifpingguo.found) {
@@ -516,7 +527,7 @@
let dieCount = 0; let dieCount = 0;
// 循环控制运行次数 // 循环控制运行次数
for (let i = 0; i < n; i++) { for (let i = 0; i < n; i++) {
await doit(); await doit(dieCount);
dieCount++; dieCount++;
if (dieCount % 8 === 0 && dieCount != n) { //每8次回一次神像 if (dieCount % 8 === 0 && dieCount != n) { //每8次回一次神像
log.info("队友们的血量好像有点不太健康欸……先回去补一补!"); log.info("队友们的血量好像有点不太健康欸……先回去补一补!");

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "伊涅芙の自助餐", "name": "伊涅芙の自助餐",
"version": "1.6.1", "version": "1.6.2",
"tags": [ "tags": [
"伊涅芙", "伊涅芙",
"调味品" "调味品"