fix 强制拾取 (#653)

This commit is contained in:
起个名字好难的喵
2025-04-27 11:28:29 +08:00
committed by GitHub
parent 1e33d089e6
commit ae2ff070fd
4 changed files with 12 additions and 6 deletions

View File

@@ -82,10 +82,7 @@
await sleep(delayTime);
notification.send(`已抵达突发任务(张牙舞爪的恶党)触发位置`);
}
// 开启急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
"forceInteraction": true
}));
await genshin.relogin();
// OCR识别是否触发任务
@@ -95,7 +92,7 @@
let resList = captureRegion.findMulti(RecognitionObject.ocr(0, 200, 300, 300));
for (let o = 0; o < resList.count; o++) {
let res = resList[o];
if (res.text.includes("打倒") || res.text.includes("所有") || res.text.includes("") || res.text.includes("") || res.text.includes("张牙") || res.text.includes("舞爪") || res.text.includes("的") || res.text.includes("恶党")) {
if (res.text.includes("张牙") || res.text.includes("舞爪") || res.text.includes("恶党") || res.text.includes("打倒") || res.text.includes("所有") || res.text.includes("鳄鱼")) {
ocrStatus = true;
break;
}
@@ -104,6 +101,10 @@
if (ocrStatus) {
log.info(`当前次数:${i + 1}/${runTimes}`);
// 开启急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
"forceInteraction": true
}));
await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`);
// 关闭急速拾取
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
@@ -117,6 +118,7 @@
log.warn(`判定本轮循环执行失败,退回本轮执行次数:${i + 1}/${runTimes}`);
}
} else {
notification.send(`未识别到突发任务(张牙舞爪的恶党),兽肉好感结束`);
break;
}
const estimatedCompletion = calculateEstimatedCompletion(startTime, i + 1, runTimes);

View File

@@ -2,6 +2,7 @@
"manifest_version": 1,
"name": "兽肉好感:自动好感度&刷两只鳄鱼兽肉&卡时间",
"version": "1.3.4",
"bgi_version": "0.44.6",
"description": "通过突发事件:张牙舞爪的恶党刷兽肉并顺带获取好感度好感度超过10次后不再获取请使用满员好感度队伍并为全体队伍角色配置相应的战斗策略",
"authors": [
{