diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/0P.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/0P.png deleted file mode 100644 index a1afdd58d..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/0P.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/1P.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/1P.png deleted file mode 100644 index b187e2032..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/1P.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2P.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2P.png deleted file mode 100644 index 4f8edeef3..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2P.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2pInBigMap.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2pInBigMap.png deleted file mode 100644 index 2b54b453d..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/2pInBigMap.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3P.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3P.png deleted file mode 100644 index 04cf2d4bc..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3P.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3pInBigMap.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3pInBigMap.png deleted file mode 100644 index 28d076774..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/3pInBigMap.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4P.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4P.png deleted file mode 100644 index 888043566..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4P.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4pInBigMap.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4pInBigMap.png deleted file mode 100644 index 2f61fc9cc..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/4pInBigMap.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/CharacterMenu.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/CharacterMenu.png deleted file mode 100644 index 6896b154d..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/CharacterMenu.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/allowEnter.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/allowEnter.png deleted file mode 100644 index 8c6cd7632..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/allowEnter.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/mora.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/mora.png new file mode 100644 index 000000000..4b5a6a3f6 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/mora.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/renwu.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/renwu.png new file mode 100644 index 000000000..fa1d83bc0 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/renwu.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yUI.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yUI.png deleted file mode 100644 index 4e365bb76..000000000 Binary files a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yUI.png and /dev/null differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yangchengdaoju.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yangchengdaoju.png new file mode 100644 index 000000000..0c328a07b Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/RecognitionObject/yangchengdaoju.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/0.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/0.png new file mode 100644 index 000000000..b3235381c Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/0.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/1.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/1.png new file mode 100644 index 000000000..c63c63d37 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/1.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/2.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/2.png new file mode 100644 index 000000000..8232e9fa0 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/2.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/3.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/3.png new file mode 100644 index 000000000..2e4fca910 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/3.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/4.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/4.png new file mode 100644 index 000000000..b7cad17a6 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/4.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/5.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/5.png new file mode 100644 index 000000000..081b91f2a Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/5.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/6.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/6.png new file mode 100644 index 000000000..aba3db68a Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/6.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/7.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/7.png new file mode 100644 index 000000000..0ccade0c0 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/7.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/8.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/8.png new file mode 100644 index 000000000..0fffc6363 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/8.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/9.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/9.png new file mode 100644 index 000000000..298e7f006 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解可获得经验数字/9.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/0.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/0.png new file mode 100644 index 000000000..b5b2a8d99 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/0.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/1.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/1.png new file mode 100644 index 000000000..2f97ffb32 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/1.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/2.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/2.png new file mode 100644 index 000000000..4416e7f29 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/2.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/3.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/3.png new file mode 100644 index 000000000..3d32a9442 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/3.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/4.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/4.png new file mode 100644 index 000000000..8ae96914f Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/4.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/5.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/5.png new file mode 100644 index 000000000..84681681c Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/5.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/6.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/6.png new file mode 100644 index 000000000..0dce3089d Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/6.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/7.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/7.png new file mode 100644 index 000000000..6f1b10d65 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/7.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/8.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/8.png new file mode 100644 index 000000000..cc41163b2 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/8.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/9.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/9.png new file mode 100644 index 000000000..006ca6085 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/分解数量数字/9.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/0.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/0.png new file mode 100644 index 000000000..b7f065ad9 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/0.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/1.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/1.png new file mode 100644 index 000000000..350d00f05 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/1.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/2.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/2.png new file mode 100644 index 000000000..6c6ee9440 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/2.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/3.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/3.png new file mode 100644 index 000000000..1da9cd0bf Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/3.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/4.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/4.png new file mode 100644 index 000000000..86480edae Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/4.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/5.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/5.png new file mode 100644 index 000000000..4da0de5b7 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/5.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/6.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/6.png new file mode 100644 index 000000000..37cdb5dbf Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/6.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/7.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/7.png new file mode 100644 index 000000000..e4592e848 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/7.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/8.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/8.png new file mode 100644 index 000000000..640ed54be Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/8.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/9.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/9.png new file mode 100644 index 000000000..71948a71d Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/已储存经验数字/9.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/0.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/0.png new file mode 100644 index 000000000..3e08bf713 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/0.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/1.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/1.png new file mode 100644 index 000000000..356a54780 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/1.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/2.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/2.png new file mode 100644 index 000000000..562b3bf89 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/2.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/3.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/3.png new file mode 100644 index 000000000..4857790fe Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/3.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/4.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/4.png new file mode 100644 index 000000000..af92f713c Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/4.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/5.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/5.png new file mode 100644 index 000000000..ca565e88d Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/5.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/6.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/6.png new file mode 100644 index 000000000..1e2dd27ff Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/6.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/7.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/7.png new file mode 100644 index 000000000..de222721b Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/7.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/8.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/8.png new file mode 100644 index 000000000..aa4608259 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/8.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/9.png b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/9.png new file mode 100644 index 000000000..8a4cac4d7 Binary files /dev/null and b/repo/js/AAA-Artifacts-Bulk-Supply/assets/背包摩拉数字/9.png differ diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/main.js b/repo/js/AAA-Artifacts-Bulk-Supply/main.js index 57ae731b0..df1c7c16e 100644 --- a/repo/js/AAA-Artifacts-Bulk-Supply/main.js +++ b/repo/js/AAA-Artifacts-Bulk-Supply/main.js @@ -19,7 +19,6 @@ const AutoAddButtonRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("a const ConfirmButtonRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/ConfirmButton.png")); const DestoryButtonRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/DestoryButton.png")); const MidDestoryButtonRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/DestoryButton.png"), 900, 600, 500, 300); -const CharacterMenuRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/CharacterMenu.png"), 60, 991, 38, 38); const decomposeRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/decompose.png")); const quickChooseRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/quickChoose.png")); @@ -388,7 +387,7 @@ async function processArtifacts(times = 1) { async function decomposeArtifacts() { keyPress("B"); - if (await findAndClick(outDatedRo)) { + if (await findAndClick(outDatedRo, 5)) { log.info("检测到过期物品弹窗,处理"); await sleep(1000); } @@ -402,22 +401,16 @@ async function processArtifacts(times = 1) { await sleep(1000); // 识别已储存经验(1570-880-1650-930) - const regionToCheck1 = { x: 1570, y: 880, width: 80, height: 50 }; - const raw = await recognizeTextInRegion(regionToCheck1); - - // 把识别到的文字里所有非数字字符去掉,只保留数字 - const digits = (raw || '').replace(/\D/g, ''); + const digits = await numberTemplateMatch("assets/已储存经验数字", 1573, 885, 74, 36); let initialValue = 0; - if (digits) { - initialValue = parseInt(digits, 10); + if (digits >= 0) { + initialValue = digits; log.info(`已储存经验识别成功: ${initialValue}`); } else { log.warn(`在指定区域未识别到有效数字: ${initialValue}`); } - let regionToCheck3 = { x: 100, y: 885, width: 170, height: 50 }; - let decomposedNum = 0; let firstNumber = 0; let firstNumber2 = 0; @@ -436,15 +429,11 @@ async function processArtifacts(times = 1) { } await sleep(1000); - decomposedNum = await recognizeTextInRegion(regionToCheck3); + const match = await numberTemplateMatch("assets/分解数量数字", 100, 885, 200, 50); + match = (match - 1000) / 10000; - // 使用正则表达式提取第一个数字 - const match = decomposedNum.match(/已选(\d+)/); - - // 检查是否匹配成功 - if (match) { - // 将匹配到的第一个数字转换为数字类型并存储在变量中 - firstNumber = Number(match[1]); + if (match >= 0) { + firstNumber = match; log.info(`1-4星总数量: ${firstNumber}`); } else { log.info("识别失败"); @@ -474,17 +463,12 @@ async function processArtifacts(times = 1) { await genshin.returnMainUi(); return 0; } - await sleep(1500); + await sleep(2000); - let decomposedNum2 = await recognizeTextInRegion(regionToCheck3); - - // 使用正则表达式提取第一个数字 - const match2 = decomposedNum2.match(/已选(\d+)/); - - // 检查是否匹配成功 - if (match2) { - // 将匹配到的第一个数字转换为数字类型并存储在变量中 - firstNumber2 = Number(match2[1]); + let match2 = await numberTemplateMatch("assets/分解数量数字", 100, 885, 200, 50); + match2 = (match2 - 1000) / 10000; + if (match2 >= 0) { + firstNumber2 = match2 log.info(`分解总数是: ${firstNumber2}`); } else { log.info("识别失败"); @@ -494,15 +478,12 @@ async function processArtifacts(times = 1) { notification.Send(`当前经验如图`); } // 当前总经验(1470-880-205-70) - const regionToCheck2 = { x: 1470, y: 880, width: 205, height: 70 }; - const raw2 = await recognizeTextInRegion(regionToCheck2); - // 只保留数字 - const digits2 = (raw2 || '').replace(/\D/g, ''); + const digits2 = await numberTemplateMatch("assets/分解可获得经验数字", 1469, 899, 180, 37, 0.95, 0.85, 5, 1); let newValue = 0; - if (digits2) { - newValue = parseInt(digits2, 10); + if (digits2 >= 0) { + newValue = digits2 log.info(`当前总经验识别成功: ${newValue}`); } else { log.warn(`在指定区域未识别到有效数字: ${newValue}`); @@ -550,29 +531,6 @@ async function processArtifacts(times = 1) { return result; } - async function findAndClick(target, maxAttempts = 20) { - for (let attempts = 0; attempts < maxAttempts; attempts++) { - const gameRegion = captureGameRegion(); - try { - const result = gameRegion.find(target); - if (result.isExist) { - await sleep(50); - result.click(); - await sleep(50); - return true; // 成功立刻返回 - } - log.warn(`识别失败,第 ${attempts + 1} 次重试`); - } catch (err) { - } finally { - gameRegion.dispose(); - } - if (attempts < maxAttempts - 1) { // 最后一次不再 sleep - await sleep(250); - } - } - return false; - } - async function destroyArtifacts(times = 1) { await genshin.returnMainUi(); await sleep(250); @@ -637,149 +595,72 @@ async function processArtifacts(times = 1) { } async function mora() { - // 定义一个函数用于识别图像 - async function recognizeImage(recognitionObject, timeout = 5000) { - let startTime = Date.now(); - while (Date.now() - startTime < timeout) { - try { - // 尝试识别图像 - const gameRegion = captureGameRegion(); - let imageResult = gameRegion.find(recognitionObject); - gameRegion.dispose(); - if (imageResult) { - // log.info(`成功识别图像,坐标: x=${imageResult.x}, y=${imageResult.y}`); - // log.info(`图像尺寸: width=${imageResult.width}, height=${imageResult.height}`); - return { success: true, x: imageResult.x, y: imageResult.y }; - } - } catch (error) { - log.error(`识别图像时发生异常: ${error.message}`); - } - await sleep(500); // 短暂延迟,避免过快循环 - } - log.warn(`经过多次尝试,仍然无法识别图像`); - return { success: false }; - } + let result = 0; let tryTimes = 0; while (result === 0 && tryTimes < 3) { await genshin.returnMainUi(); await sleep(100); log.info("开始尝试识别摩拉"); - // 按下 C 键 - keyPress("C"); + keyPress("B"); await sleep(1500); - let recognized = false; - // 识别“角色菜单”图标或“天赋”文字 + //切换到任务或养成道具 let startTime = Date.now(); while (Date.now() - startTime < 5000) { - // 尝试识别“角色菜单”图标 - let characterMenuResult = await recognizeImage(CharacterMenuRo, 5000); - if (characterMenuResult.success) { - await click(177, 433); - await sleep(500); + // 尝试识别“任务”图标 + const renwuRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/renwu.png")); + let res = await findAndClick(renwuRo); + if (res) { recognized = true; break; } - // 尝试识别“天赋”文字 - let targetText = "天赋"; - let ocrRegion = { x: 133, y: 395, width: 115, height: 70 }; // 设置对应的识别区域 - let talentResult = await recognizeTextAndClick(targetText, ocrRegion); - if (talentResult.success) { - log.info(`点击天赋文字,坐标: x=${talentResult.x}, y=${talentResult.y}`); + // 尝试识别“养成道具”文字 + const yangchengdaojuRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/yangchengdaoju.png")); + res = await findAndClick(yangchengdaojuRo); + if (res) { recognized = true; break; } - await sleep(1000); // 短暂延迟,避免过快循环 + await sleep(500); // 短暂延迟,避免过快循环 } - let recognizedText = ""; + let moraRes = 0; + await sleep(1000); + if (settings.notify) { + notification.Send(`当前摩拉如图`); + } - // 如果识别到了“角色菜单”或“天赋”,则识别“摩拉数值” - if (recognized) { - if (settings.notify) { - notification.Send(`当前摩拉如图`); - } - let ocrRegionMora = { x: 1620, y: 25, width: 152, height: 46 }; // 设置对应的识别区域 - recognizedText = await recognizeTextInRegion(ocrRegionMora); - if (recognizedText) { - log.info(`成功识别到摩拉数值: ${recognizedText}`); - result = recognizedText; - } else { - log.warn("未能识别到摩拉数值。"); + const moraRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/mora.png")); + const gameRegion = captureGameRegion(); + let moraX = 336; + let moraY = 1004; + try { + const result = gameRegion.find(moraRo); + if (result.isExist()) { + moraX = result.x; + moraY = result.y; } + } catch (err) { + } finally { + gameRegion.dispose(); + } + + moraRes = await numberTemplateMatch("assets/背包摩拉数字", moraX, moraY, 300, 40); + + if (moraRes >= 0) { + log.info(`成功识别到摩拉数值: ${moraRes}`); + result = moraRes; } else { - log.warn("未能识别到角色菜单或天赋"); + log.warn("未能识别到摩拉数值。"); } + await sleep(500); tryTimes++; await genshin.returnMainUi(); } - return Number(result); -} - -// 定义一个独立的函数用于在指定区域进行 OCR 识别并输出识别内容 -async function recognizeTextInRegion(ocrRegion, timeout = 5000) { - let startTime = Date.now(); - let retryCount = 0; // 重试计数 - while (Date.now() - startTime < timeout) { - try { - // 在指定区域进行 OCR 识别 - const gameRegion = captureGameRegion(); - let ocrResult = gameRegion.find(RecognitionObject.ocr(ocrRegion.x, ocrRegion.y, ocrRegion.width, ocrRegion.height)); - gameRegion.dispose(); - if (ocrResult) { - let correctedText = ocrResult.text; - return correctedText; // 返回识别到的内容 - } else { - log.warn(`OCR 识别区域未找到内容`); - return null; // 如果 OCR 未识别到内容,返回 null - } - } catch (error) { - retryCount++; // 增加重试计数 - log.warn(`OCR 识别失败,正在进行第 ${retryCount} 次重试...`); - } - await sleep(500); // 短暂延迟,避免过快循环 - } - log.warn(`经过多次尝试,仍然无法在指定区域识别到文字`); - return null; // 如果未识别到文字,返回 null -} - -// 定义一个函数用于识别文字并点击 -async function recognizeTextAndClick(targetText, ocrRegion, timeout = 3000) { - let startTime = Date.now(); - let retryCount = 0; // 重试计数 - while (Date.now() - startTime < timeout) { - try { - // 尝试 OCR 识别 - const gameRegion = captureGameRegion(); - let resList = gameRegion.findMulti(RecognitionObject.ocr(ocrRegion.x, ocrRegion.y, ocrRegion.width, ocrRegion.height)); // 指定识别区域 - gameRegion.dispose(); - // 遍历识别结果,检查是否找到目标文本 - for (let res of resList) { - let correctedText = res.text; - if (correctedText.includes(targetText)) { - // 如果找到目标文本,计算并点击文字的中心坐标 - let centerX = Math.round(res.x + res.width / 2); - let centerY = Math.round(res.y + res.height / 2); - await click(centerX, centerY); - await sleep(500); // 确保点击后有足够的时间等待 - return { success: true, x: centerX, y: centerY }; - } - } - } catch (error) { - retryCount++; // 增加重试计数 - log.warn(`页面标志识别失败,正在进行第 ${retryCount} 次重试...`); - } - await sleep(1000); // 短暂延迟,避免过快循环 - } - log.warn(`经过多次尝试,仍然无法识别文字: ${targetText},尝试点击默认中心位置`); - let centerX = Math.round(ocrRegion.x + ocrRegion.width / 2); - let centerY = Math.round(ocrRegion.y + ocrRegion.height / 2); - await click(centerX, centerY); - await sleep(1000); - return { success: false }; + return result; } //切换队伍 @@ -1444,4 +1325,127 @@ async function recognizeAndInteract() { } return false; } +} + +/** + * 在指定区域内,用 0-9 的 PNG 模板做「多阈值 + 非极大抑制」数字识别, + * 最终把检测到的数字按左右顺序拼成一个整数返回。 + * + * @param {string} numberPngFilePath - 存放 0.png ~ 9.png 的文件夹路径(不含文件名) + * @param {number} x - 待识别区域的左上角 x 坐标,默认 0 + * @param {number} y - 待识别区域的左上角 y 坐标,默认 0 + * @param {number} w - 待识别区域的宽度,默认 1920 + * @param {number} h - 待识别区域的高度,默认 1080 + * @param {number} maxThreshold - 模板匹配起始阈值,默认 0.95(最高可信度) + * @param {number} minThreshold - 模板匹配最低阈值,默认 0.8(最低可信度) + * @param {number} splitCount - 在 maxThreshold 与 minThreshold 之间做几次等间隔阈值递减,默认 3 + * @param {number} maxOverlap - 非极大抑制时允许的最大重叠像素,默认 2;只要 x 或 y 方向重叠大于该值即视为重复框 + * + * @returns {number} 识别出的整数;若没有任何有效数字框则返回 -1 + * + * @example + * const mora = await numberTemplateMatch('摩拉数字', 860, 70, 200, 40); + * if (mora >= 0) console.log(`当前摩拉:${mora}`); + */ +async function numberTemplateMatch( + numberPngFilePath, + x = 0, y = 0, w = 1920, h = 1080, + maxThreshold = 0.95, + minThreshold = 0.8, + splitCount = 3, + maxOverlap = 2 +) { + let ros = []; + for (let i = 0; i <= 9; i++) { + ros[i] = RecognitionObject.TemplateMatch( + file.ReadImageMatSync(`${numberPngFilePath}/${i}.png`), x, y, w, h); + } + + function setThreshold(roArr, newThreshold) { + for (let i = 0; i < roArr.length; i++) { + roArr[i].Threshold = newThreshold; + roArr[i].InitTemplate(); + } + } + + const gameRegion = captureGameRegion(); + const allCandidates = []; + + /* 1. splitCount 次等间隔阈值递减 */ + for (let k = 0; k < splitCount; k++) { + const curThr = maxThreshold - (maxThreshold - minThreshold) * k / Math.max(splitCount - 1, 1); + setThreshold(ros, curThr); + + /* 2. 0-9 每个模板跑一遍,所有框都收 */ + for (let digit = 0; digit <= 9; digit++) { + const res = gameRegion.findMulti(ros[digit]); + if (res.count === 0) continue; + + for (let i = 0; i < res.count; i++) { + const box = res[i]; + allCandidates.push({ + digit: digit, + x: box.x, + y: box.y, + w: box.width, + h: box.height, + thr: curThr + }); + } + } + + } + gameRegion.dispose(); + + /* 3. 无结果提前返回 -1 */ + if (allCandidates.length === 0) { + return -1; + } + + /* 4. 非极大抑制(必须 x、y 两个方向重叠都 > maxOverlap 才视为重复) */ + const adopted = []; + for (const c of allCandidates) { + let overlap = false; + for (const a of adopted) { + const xOverlap = Math.max(0, Math.min(c.x + c.w, a.x + a.w) - Math.max(c.x, a.x)); + const yOverlap = Math.max(0, Math.min(c.y + c.h, a.y + a.h) - Math.max(c.y, a.y)); + if (xOverlap > maxOverlap && yOverlap > maxOverlap) { + overlap = true; + break; + } + } + if (!overlap) { + adopted.push(c); + //log.info(`在 [${c.x},${c.y},${c.w},${c.h}] 找到数字 ${c.digit},匹配阈值=${c.thr}`); + } + } + + /* 5. 按 x 排序,拼整数;仍无有效框时返回 -1 */ + if (adopted.length === 0) return -1; + adopted.sort((a, b) => a.x - b.x); + + return adopted.reduce((num, item) => num * 10 + item.digit, 0); +} + +async function findAndClick(target, maxAttempts = 20) { + for (let attempts = 0; attempts < maxAttempts; attempts++) { + const gameRegion = captureGameRegion(); + try { + const result = gameRegion.find(target); + if (result.isExist) { + await sleep(50); + result.click(); + await sleep(50); + return true; // 成功立刻返回 + } + log.warn(`识别失败,第 ${attempts + 1} 次重试`); + } catch (err) { + } finally { + gameRegion.dispose(); + } + if (attempts < maxAttempts - 1) { // 最后一次不再 sleep + await sleep(250); + } + } + return false; } \ No newline at end of file diff --git a/repo/js/AAA-Artifacts-Bulk-Supply/manifest.json b/repo/js/AAA-Artifacts-Bulk-Supply/manifest.json index 33b113c24..f485ca28a 100644 --- a/repo/js/AAA-Artifacts-Bulk-Supply/manifest.json +++ b/repo/js/AAA-Artifacts-Bulk-Supply/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "AAA狗粮批发", - "version": "1.6.91", + "version": "1.7.0", "tags": [ "狗粮" ], diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/CharacterMenu.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/CharacterMenu.png deleted file mode 100644 index 6896b154d..000000000 Binary files a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/CharacterMenu.png and /dev/null differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose.png deleted file mode 100644 index 3e3bde8bb..000000000 Binary files a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose.png and /dev/null differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose2.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose2.png deleted file mode 100644 index 6f4699bf2..000000000 Binary files a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/doDecompose2.png and /dev/null differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/mora.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/mora.png new file mode 100644 index 000000000..4b5a6a3f6 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/mora.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/renwu.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/renwu.png new file mode 100644 index 000000000..fa1d83bc0 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/renwu.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival.png new file mode 100644 index 000000000..ea655a2e3 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival1.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival1.png new file mode 100644 index 000000000..90d6e7ca8 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/revival1.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/yangchengdaoju.png b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/yangchengdaoju.png new file mode 100644 index 000000000..0c328a07b Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/RecognitionObject/yangchengdaoju.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/0.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/0.png new file mode 100644 index 000000000..b3235381c Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/0.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/1.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/1.png new file mode 100644 index 000000000..c63c63d37 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/1.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/2.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/2.png new file mode 100644 index 000000000..8232e9fa0 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/2.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/3.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/3.png new file mode 100644 index 000000000..2e4fca910 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/3.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/4.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/4.png new file mode 100644 index 000000000..b7cad17a6 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/4.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/5.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/5.png new file mode 100644 index 000000000..081b91f2a Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/5.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/6.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/6.png new file mode 100644 index 000000000..aba3db68a Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/6.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/7.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/7.png new file mode 100644 index 000000000..0ccade0c0 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/7.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/8.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/8.png new file mode 100644 index 000000000..0fffc6363 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/8.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/9.png b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/9.png new file mode 100644 index 000000000..298e7f006 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解可获得经验数字/9.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/0.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/0.png new file mode 100644 index 000000000..b5b2a8d99 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/0.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/1.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/1.png new file mode 100644 index 000000000..2f97ffb32 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/1.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/2.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/2.png new file mode 100644 index 000000000..4416e7f29 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/2.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/3.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/3.png new file mode 100644 index 000000000..3d32a9442 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/3.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/4.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/4.png new file mode 100644 index 000000000..8ae96914f Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/4.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/5.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/5.png new file mode 100644 index 000000000..84681681c Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/5.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/6.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/6.png new file mode 100644 index 000000000..0dce3089d Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/6.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/7.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/7.png new file mode 100644 index 000000000..6f1b10d65 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/7.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/8.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/8.png new file mode 100644 index 000000000..cc41163b2 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/8.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/9.png b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/9.png new file mode 100644 index 000000000..006ca6085 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/分解数量数字/9.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/0.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/0.png new file mode 100644 index 000000000..b7f065ad9 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/0.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/1.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/1.png new file mode 100644 index 000000000..350d00f05 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/1.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/2.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/2.png new file mode 100644 index 000000000..6c6ee9440 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/2.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/3.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/3.png new file mode 100644 index 000000000..1da9cd0bf Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/3.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/4.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/4.png new file mode 100644 index 000000000..86480edae Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/4.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/5.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/5.png new file mode 100644 index 000000000..4da0de5b7 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/5.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/6.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/6.png new file mode 100644 index 000000000..37cdb5dbf Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/6.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/7.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/7.png new file mode 100644 index 000000000..e4592e848 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/7.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/8.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/8.png new file mode 100644 index 000000000..640ed54be Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/8.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/9.png b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/9.png new file mode 100644 index 000000000..71948a71d Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/已储存经验数字/9.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/0.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/0.png new file mode 100644 index 000000000..3e08bf713 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/0.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/1.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/1.png new file mode 100644 index 000000000..356a54780 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/1.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/2.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/2.png new file mode 100644 index 000000000..562b3bf89 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/2.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/3.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/3.png new file mode 100644 index 000000000..4857790fe Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/3.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/4.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/4.png new file mode 100644 index 000000000..af92f713c Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/4.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/5.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/5.png new file mode 100644 index 000000000..ca565e88d Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/5.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/6.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/6.png new file mode 100644 index 000000000..1e2dd27ff Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/6.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/7.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/7.png new file mode 100644 index 000000000..de222721b Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/7.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/8.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/8.png new file mode 100644 index 000000000..aa4608259 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/8.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/9.png b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/9.png new file mode 100644 index 000000000..8a4cac4d7 Binary files /dev/null and b/repo/js/ArtifactsGroupPurchasing/assets/背包摩拉数字/9.png differ diff --git a/repo/js/ArtifactsGroupPurchasing/main.js b/repo/js/ArtifactsGroupPurchasing/main.js index 8d932f711..8392d4d15 100644 --- a/repo/js/ArtifactsGroupPurchasing/main.js +++ b/repo/js/ArtifactsGroupPurchasing/main.js @@ -28,6 +28,7 @@ let runnedEnding = false; if (settings.logName) { expGain = await processArtifacts(); + moraGain = await mora(); } await genshin.tpToStatueOfTheSeven(); await switchPartyIfNeeded(settings.partyName); @@ -163,8 +164,11 @@ let runnedEnding = false; if (settings.logName) { expGain = await processArtifacts() - expGain; + moraGain = await mora() - moraGain; log.info(`${settings.logName}:联机狗粮分解获得经验${expGain}`); notification.send(`${settings.logName}:联机狗粮分解获得经验${expGain}`); + log.info(`${settings.logName}:联机狗粮获得摩拉${moraGain}`); + notification.send(`${settings.logName}:联机狗粮获得摩拉${moraGain}`); } { @@ -186,49 +190,10 @@ let runnedEnding = false; )(); async function checkP1Name(p1Name) { - if (true) { - //log.info("禁用了房主名称校验,直接视为通过"); - //强制禁用房主检测 - return true; - } - try { - // 加载目标 PNG - const targetPngs = await readFolder(targetsPath, false); - for (const f of targetPngs) { - if (!f.fullPath.endsWith('.png')) continue; - const mat = file.ReadImageMatSync(f.fullPath); - const ro = RecognitionObject.TemplateMatch(mat, 395, 158, 588, 65); - const baseName = f.fileName.replace(/\.png$/i, ''); - targetsRo.push({ ro, baseName }); - } - log.info(`加载完成共 ${targetsRo.length} 个目标`); - await genshin.returnMainUi(); - await keyPress("F2"); - await sleep(2000); - const gameRegion = captureGameRegion(); - for (const { ro, baseName } of targetsRo) { - if (gameRegion.find(ro).isExist()) { gameRegion.dispose(); log.info(`找到房主为${baseName}`); return true; } - } - gameRegion.dispose(); - } catch { } - try { - const gameRegion = captureGameRegion(); - const resList = gameRegion.findMulti(RecognitionObject.ocr(400, 170, 300, 55)); - gameRegion.dispose(); - let hit = null; - let txt; - for (const res of resList) { - txt = res.text.trim(); - if (txt === p1Name) { hit = txt; break; } - } - if (hit) { - log.info(`识别到房主为${hit},与预期相符`); - return true; - } else { - log.warn(`识别结果为${txt},与预期的${p1Name}不符,重试`); - return false; - } - } catch { return false; } + //log.info("禁用了房主名称校验,直接视为通过"); + //强制禁用房主检测 + return true; + } @@ -1409,38 +1374,9 @@ async function recognizeAndInteract() { } async function processArtifacts() { - // 定义一个独立的函数用于在指定区域进行 OCR 识别并输出识别内容 - async function recognizeTextInRegion(ocrRegion, timeout = 5000) { - let startTime = Date.now(); - let retryCount = 0; // 重试计数 - while (Date.now() - startTime < timeout) { - try { - // 在指定区域进行 OCR 识别 - const gameRegion = captureGameRegion(); - let ocrResult = gameRegion.find(RecognitionObject.ocr(ocrRegion.x, ocrRegion.y, ocrRegion.width, ocrRegion.height)); - gameRegion.dispose(); - if (ocrResult) { - let correctedText = ocrResult.text; - return correctedText; // 返回识别到的内容 - } else { - log.warn(`OCR 识别区域未找到内容`); - return null; // 如果 OCR 未识别到内容,返回 null - } - } catch (error) { - retryCount++; // 增加重试计数 - log.warn(`OCR 识别失败,正在进行第 ${retryCount} 次重试...`); - } - await sleep(500); // 短暂延迟,避免过快循环 - } - log.warn(`经过多次尝试,仍然无法在指定区域识别到文字`); - return null; // 如果未识别到文字,返回 null - } - const decomposeRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/decompose.png")); const quickChooseRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/quickChoose.png")); const confirmRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/confirm.png")); - const doDecomposeRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/doDecompose.png")); - const doDecompose2Ro = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/doDecompose2.png")); const outDatedRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/ConfirmButton.png"), 760, 700, 100, 100); await genshin.returnMainUi(); @@ -1456,7 +1392,7 @@ async function processArtifacts() { async function decomposeArtifacts() { keyPress("B"); - if (await findAndClick(outDatedRo)) { + if (await findAndClick(outDatedRo, 5)) { log.info("检测到过期物品弹窗,处理"); await sleep(1000); } @@ -1470,22 +1406,16 @@ async function processArtifacts() { await sleep(1000); // 识别已储存经验(1570-880-1650-930) - const regionToCheck1 = { x: 1570, y: 880, width: 80, height: 50 }; - const raw = await recognizeTextInRegion(regionToCheck1); - - // 把识别到的文字里所有非数字字符去掉,只保留数字 - const digits = (raw || '').replace(/\D/g, ''); + const digits = await numberTemplateMatch("assets/已储存经验数字", 1573, 885, 74, 36); let initialValue = 0; - if (digits) { - initialValue = parseInt(digits, 10); + if (digits >= 0) { + initialValue = digits; log.info(`已储存经验识别成功: ${initialValue}`); } else { log.warn(`在指定区域未识别到有效数字: ${initialValue}`); } - let regionToCheck3 = { x: 100, y: 885, width: 170, height: 50 }; - if (!await findAndClick(quickChooseRo)) { await genshin.returnMainUi(); return 0; @@ -1498,58 +1428,21 @@ async function processArtifacts() { await genshin.returnMainUi(); return 0; } - await sleep(1500); + await sleep(2000); - let decomposedNum2 = await recognizeTextInRegion(regionToCheck3); - - // 使用正则表达式提取第一个数字 - const match2 = decomposedNum2.match(/已选(\d+)/); - - // 检查是否匹配成功 - if (match2) { - // 将匹配到的第一个数字转换为数字类型并存储在变量中 - let firstNumber2 = Number(match2[1]); - log.info(`分解总数是: ${firstNumber2}`); - } else { - log.info("识别失败"); - } - //识别当前总经验 - notification.Send(`当前经验如图`); // 当前总经验(1470-880-205-70) - const regionToCheck2 = { x: 1470, y: 880, width: 205, height: 70 }; - const raw2 = await recognizeTextInRegion(regionToCheck2); - // 只保留数字 - const digits2 = (raw2 || '').replace(/\D/g, ''); + const digits2 = await numberTemplateMatch("assets/分解可获得经验数字", 1469, 899, 180, 37, 0.95, 0.85, 5, 1); let newValue = 0; - if (digits2) { - newValue = parseInt(digits2, 10); + if (digits2 >= 0) { + newValue = digits2 log.info(`当前总经验识别成功: ${newValue}`); } else { log.warn(`在指定区域未识别到有效数字: ${newValue}`); } - /* - // 根据用户配置,分解狗粮 - await sleep(1000); - // 点击分解按钮 - if (!await findAndClick(doDecomposeRo)) { - await genshin.returnMainUi(); - return 0; - } - await sleep(500); - - // 4. "进行分解"按钮// 点击进行分解按钮 - if (!await findAndClick(doDecompose2Ro)) { - await genshin.returnMainUi(); - return 0; - } - await sleep(1000); - - // 5. 关闭确认界面 - await click(1340, 755); - await sleep(1000); - */ + + // 7. 计算分解获得经验=总经验-上次剩余 const resinExperience = Math.max(newValue - initialValue, 0); log.info(`分解可获得经验: ${resinExperience}`); let resultExperience = resinExperience; @@ -1582,4 +1475,173 @@ async function processArtifacts() { } return false; } +} + +async function mora() { + + let result = 0; + let tryTimes = 0; + while (result === 0 && tryTimes < 3) { + await genshin.returnMainUi(); + await sleep(100); + log.info("开始尝试识别摩拉"); + keyPress("B"); + await sleep(1500); + //切换到任务或养成道具 + let startTime = Date.now(); + while (Date.now() - startTime < 5000) { + // 尝试识别“任务”图标 + const renwuRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/renwu.png")); + let res = await findAndClick(renwuRo); + if (res) { + recognized = true; + break; + } + + // 尝试识别“养成道具”文字 + const yangchengdaojuRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/yangchengdaoju.png")); + res = await findAndClick(yangchengdaojuRo); + if (res) { + recognized = true; + break; + } + + await sleep(500); // 短暂延迟,避免过快循环 + } + + let moraRes = 0; + await sleep(1000); + if (settings.notify) { + notification.Send(`当前摩拉如图`); + } + + const moraRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/RecognitionObject/mora.png")); + const gameRegion = captureGameRegion(); + let moraX = 336; + let moraY = 1004; + try { + const result = gameRegion.find(moraRo); + if (result.isExist()) { + moraX = result.x; + moraY = result.y; + } + } catch (err) { + } finally { + gameRegion.dispose(); + } + + moraRes = await numberTemplateMatch("assets/背包摩拉数字", moraX, moraY, 300, 40); + + if (moraRes >= 0) { + log.info(`成功识别到摩拉数值: ${moraRes}`); + result = moraRes; + } else { + log.warn("未能识别到摩拉数值。"); + } + + await sleep(500); + tryTimes++; + await genshin.returnMainUi(); + } + return result; +} + +/** + * 在指定区域内,用 0-9 的 PNG 模板做「多阈值 + 非极大抑制」数字识别, + * 最终把检测到的数字按左右顺序拼成一个整数返回。 + * + * @param {string} numberPngFilePath - 存放 0.png ~ 9.png 的文件夹路径(不含文件名) + * @param {number} x - 待识别区域的左上角 x 坐标,默认 0 + * @param {number} y - 待识别区域的左上角 y 坐标,默认 0 + * @param {number} w - 待识别区域的宽度,默认 1920 + * @param {number} h - 待识别区域的高度,默认 1080 + * @param {number} maxThreshold - 模板匹配起始阈值,默认 0.95(最高可信度) + * @param {number} minThreshold - 模板匹配最低阈值,默认 0.8(最低可信度) + * @param {number} splitCount - 在 maxThreshold 与 minThreshold 之间做几次等间隔阈值递减,默认 3 + * @param {number} maxOverlap - 非极大抑制时允许的最大重叠像素,默认 2;只要 x 或 y 方向重叠大于该值即视为重复框 + * + * @returns {number} 识别出的整数;若没有任何有效数字框则返回 -1 + * + * @example + * const mora = await numberTemplateMatch('摩拉数字', 860, 70, 200, 40); + * if (mora >= 0) console.log(`当前摩拉:${mora}`); + */ +async function numberTemplateMatch( + numberPngFilePath, + x = 0, y = 0, w = 1920, h = 1080, + maxThreshold = 0.95, + minThreshold = 0.8, + splitCount = 3, + maxOverlap = 2 +) { + let ros = []; + for (let i = 0; i <= 9; i++) { + ros[i] = RecognitionObject.TemplateMatch( + file.ReadImageMatSync(`${numberPngFilePath}/${i}.png`), x, y, w, h); + } + + function setThreshold(roArr, newThreshold) { + for (let i = 0; i < roArr.length; i++) { + roArr[i].Threshold = newThreshold; + roArr[i].InitTemplate(); + } + } + + const gameRegion = captureGameRegion(); + const allCandidates = []; + + /* 1. splitCount 次等间隔阈值递减 */ + for (let k = 0; k < splitCount; k++) { + const curThr = maxThreshold - (maxThreshold - minThreshold) * k / Math.max(splitCount - 1, 1); + setThreshold(ros, curThr); + + /* 2. 0-9 每个模板跑一遍,所有框都收 */ + for (let digit = 0; digit <= 9; digit++) { + const res = gameRegion.findMulti(ros[digit]); + if (res.count === 0) continue; + + for (let i = 0; i < res.count; i++) { + const box = res[i]; + allCandidates.push({ + digit: digit, + x: box.x, + y: box.y, + w: box.width, + h: box.height, + thr: curThr + }); + } + } + + } + gameRegion.dispose(); + + /* 3. 无结果提前返回 -1 */ + if (allCandidates.length === 0) { + return -1; + } + + /* 4. 非极大抑制(必须 x、y 两个方向重叠都 > maxOverlap 才视为重复) */ + const adopted = []; + for (const c of allCandidates) { + let overlap = false; + for (const a of adopted) { + const xOverlap = Math.max(0, Math.min(c.x + c.w, a.x + a.w) - Math.max(c.x, a.x)); + const yOverlap = Math.max(0, Math.min(c.y + c.h, a.y + a.h) - Math.max(c.y, a.y)); + if (xOverlap > maxOverlap && yOverlap > maxOverlap) { + overlap = true; + break; + } + } + if (!overlap) { + adopted.push(c); + //log.info(`在 [${c.x},${c.y},${c.w},${c.h}] 找到数字 ${c.digit},匹配阈值=${c.thr}`); + } + } + + /* 5. 按 x 排序,拼整数;仍无有效框时返回 -1 */ + if (adopted.length === 0) return -1; + adopted.sort((a, b) => a.x - b.x); + + return adopted.reduce((num, item) => num * 10 + item.digit, 0); } \ No newline at end of file diff --git a/repo/js/ArtifactsGroupPurchasing/manifest.json b/repo/js/ArtifactsGroupPurchasing/manifest.json index ecb70ad26..ab2521121 100644 --- a/repo/js/ArtifactsGroupPurchasing/manifest.json +++ b/repo/js/ArtifactsGroupPurchasing/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "AAA狗粮联机团购", - "version": "1.11.5", + "version": "1.12.0", "tags": [ "狗粮" ], diff --git a/repo/js/AutoHoeingOneDragon/README.md b/repo/js/AutoHoeingOneDragon/README.md index a85844e20..600cb8092 100644 --- a/repo/js/AutoHoeingOneDragon/README.md +++ b/repo/js/AutoHoeingOneDragon/README.md @@ -57,6 +57,7 @@ - - 蕈兽 :表明路线含有蕈兽,蕈兽遇到雷火元素时会发生转化,转化后占据精英怪物的名额却只掉落少量摩拉,通常建议禁用 - - 小怪 :表明路线只含小怪,战斗强度低,且无需携带万叶来拾取可能掉落的狗粮,可以适当携带等级较低或不上场的角色来获取经验收益 - - 狭窄地形 :表明路线存在部分非常狭窄,任何位移技能都容易导致致命后果 + - - 环境伤害 :路线处于雪山或挪德卡莱苦壑崖区域,环境伤害会持续扣血 - - 分组逻辑:不含路径组1排除标签和任何其他组标签的路径会进入路径组1,剩余路径若含有路径组x的标签之一,则会进入路径组x - - 使用示例:路径组一填写蕈兽,禁用蕈兽路线,路径组二填写次数盾,水免,处理路径组一的配队难以处理的次数盾和水免怪物,路径组三填写小怪,队伍中放升级中角色获取经验,将本js添加到【多个配置组】中,根据路径组的具体情况配置每个配置组的设置 - - 新增支持自定义标签,将会尝试将未知的标签通过文件路径,description匹配,含有对应关键词的路线即视为含有这些标签 @@ -103,4 +104,3 @@ ### 五、**其他** - **想要测作者怎么办** :来q群1057307824测测莫酱(有其他问题也行) - - 不看github issue,只接受通过qq反馈 diff --git a/repo/js/AutoHoeingOneDragon/manifest.json b/repo/js/AutoHoeingOneDragon/manifest.json index 916326c53..e7fb3d6f7 100644 --- a/repo/js/AutoHoeingOneDragon/manifest.json +++ b/repo/js/AutoHoeingOneDragon/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "锄地一条龙", - "version": "1.20.7", + "version": "1.20.9", "description": "一站式解决自动化锄地,支持只拾取狗粮,请仔细阅读README.md后使用", "authors": [ { diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/101蒙德雪山(600_1,200_1).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/101蒙德雪山(600_1,200_1).json index 2a2eedf66..205ca27fd 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/101蒙德雪山(600_1,200_1).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/101蒙德雪山(600_1,200_1).json @@ -15,7 +15,9 @@ "map_match_method": "", "map_name": "Teyvat", "name": "101蒙德雪山(600_1,200_1)", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/102蒙德雪山(600_1).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/102蒙德雪山(600_1).json index b4f107794..061ed846f 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/102蒙德雪山(600_1).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/102蒙德雪山(600_1).json @@ -1,6 +1,9 @@ { "info": { "name": "102蒙德雪山(600_1)", + "tags": [ + "环境伤害" + ], "type": "collect", "author": "汐", "version": "1.0", diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/103蒙德雪山(600_2,200_4).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/103蒙德雪山(600_2,200_4).json index 6a7dab5c9..baca106a3 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/103蒙德雪山(600_2,200_4).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/103蒙德雪山(600_2,200_4).json @@ -14,7 +14,9 @@ } ], "map_name": "Teyvat", - "tags": [], + "tags": [ + "环境伤害" + ], "last_modified_time": 1754740578989, "enable_monster_loot_split": false, "map_match_method": "" diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/733挪德卡莱苦壑崖北(200_5).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/733挪德卡莱苦壑崖北(200_5).json index aab03060d..547cf3506 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/733挪德卡莱苦壑崖北(200_5).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/733挪德卡莱苦壑崖北(200_5).json @@ -13,7 +13,9 @@ "map_match_method": "SIFT", "map_name": "Teyvat", "name": "733挪德卡莱苦壑崖北(200_5)", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/734挪德卡莱苦壑崖西南(200_7).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/734挪德卡莱苦壑崖西南(200_7).json index 07c19c6d5..85ca8fc5a 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/734挪德卡莱苦壑崖西南(200_7).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/734挪德卡莱苦壑崖西南(200_7).json @@ -13,7 +13,9 @@ "map_match_method": "SIFT", "map_name": "Teyvat", "name": "734挪德卡莱苦壑崖西南(200_7)", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/735挪德卡莱苦壑崖西(200_10).json b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/735挪德卡莱苦壑崖西(200_10).json index 368c46f84..7532bb00a 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/735挪德卡莱苦壑崖西(200_10).json +++ b/repo/js/AutoHoeingOneDragon/pathing/0-汐酱/1-精英/735挪德卡莱苦壑崖西(200_10).json @@ -13,7 +13,9 @@ "map_match_method": "SIFT", "map_name": "Teyvat", "name": "735挪德卡莱苦壑崖西(200_10)", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A01-蒙德-龙脊雪山-眠龙谷-北-3只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A01-蒙德-龙脊雪山-眠龙谷-北-3只.json index 402f12425..8d00f36d3 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A01-蒙德-龙脊雪山-眠龙谷-北-3只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A01-蒙德-龙脊雪山-眠龙谷-北-3只.json @@ -14,8 +14,8 @@ "map_match_method": "", "map_name": "Teyvat", "name": "A01-蒙德-龙脊雪山-眠龙谷-北-3只", - "tags": [ - "高危" + "tags": [ + "环境伤害" ], "type": "collect", "version": "1.0" diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A02-蒙德-龙脊雪山-覆雪之路-2只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A02-蒙德-龙脊雪山-覆雪之路-2只.json index b5605a191..3f65c1742 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A02-蒙德-龙脊雪山-覆雪之路-2只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A02-蒙德-龙脊雪山-覆雪之路-2只.json @@ -14,7 +14,9 @@ "map_match_method": "", "map_name": "Teyvat", "name": "A02-蒙德-龙脊雪山-覆雪之路-2只", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A03-蒙德-龙脊雪山-寒天之钉-下方-3只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A03-蒙德-龙脊雪山-寒天之钉-下方-3只.json index b2e151dc7..97ad48d6c 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A03-蒙德-龙脊雪山-寒天之钉-下方-3只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A03-蒙德-龙脊雪山-寒天之钉-下方-3只.json @@ -14,8 +14,8 @@ "map_match_method": "", "map_name": "Teyvat", "name": "A03-蒙德-龙脊雪山-寒天之钉-下方-3只", - "tags": [ - "高危" + "tags": [ + "环境伤害" ], "type": "collect", "version": "1.0" diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A04-蒙德-龙脊雪山-七天神像-东北-3只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A04-蒙德-龙脊雪山-七天神像-东北-3只.json index 4d39e6db3..61773516d 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A04-蒙德-龙脊雪山-七天神像-东北-3只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A04-蒙德-龙脊雪山-七天神像-东北-3只.json @@ -8,7 +8,9 @@ "hash_res": "75441803", "map_name": "Teyvat", "bgi_version": "0.45.0", - "tags": [], + "tags": [ + "环境伤害" + ], "last_modified_time": 1752249603177 }, "positions": [ diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A05-蒙德-龙脊雪山-七天神像-东-3只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A05-蒙德-龙脊雪山-七天神像-东-3只.json index 2deaa9e91..14cbcc674 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A05-蒙德-龙脊雪山-七天神像-东-3只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A05-蒙德-龙脊雪山-七天神像-东-3只.json @@ -14,7 +14,9 @@ "map_match_method": "", "map_name": "Teyvat", "name": "A05-蒙德-龙脊雪山-七天神像-东-3只", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A06-蒙德-龙脊雪山-七天神像-西南-2只.json b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A06-蒙德-龙脊雪山-七天神像-西南-2只.json index 90a71c6b0..74f59e770 100644 --- a/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A06-蒙德-龙脊雪山-七天神像-西南-2只.json +++ b/repo/js/AutoHoeingOneDragon/pathing/1-莫酱/0-飞萤/A06-蒙德-龙脊雪山-七天神像-西南-2只.json @@ -14,7 +14,9 @@ "map_match_method": "", "map_name": "Teyvat", "name": "A06-蒙德-龙脊雪山-七天神像-西南-2只", - "tags": [], + "tags": [ + "环境伤害" + ], "type": "collect", "version": "1.0" }, diff --git a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/004枫丹旧日之海龙蜥 传奇.json b/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/004枫丹旧日之海龙蜥 传奇.json deleted file mode 100644 index 92773d98a..000000000 --- a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/004枫丹旧日之海龙蜥 传奇.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "info": { - "authors": [ - { - "links": "", - "name": "汐" - } - ], - "bgi_version": "0.45.0", - "description": " 路线信息:该路线预计用时100秒,预计收入1200摩拉,包含以下怪物:2只精英传奇倍率三。", - "enable_monster_loot_split": false, - "last_modified_time": 1767726586175, - "map_match_method": "", - "map_name": "SeaOfBygoneEras", - "name": "004枫丹旧日之海龙蜥 传奇", - "tags": [], - "type": "collect", - "version": "1.0" - }, - "positions": [ - { - "action": "", - "action_params": "", - "id": 1, - "move_mode": "walk", - "type": "teleport", - "x": 3542.162841796875, - "y": 1377.1722412109375 - }, - { - "action": "", - "action_params": "", - "id": 2, - "move_mode": "dash", - "type": "path", - "x": 3550.346923828125, - "y": 1430.4874267578125 - }, - { - "action": "fight", - "action_params": "", - "id": 3, - "move_mode": "dash", - "type": "path", - "x": 3544.763427734375, - "y": 1462.154052734375 - }, - { - "action": "fight", - "action_params": "", - "id": 4, - "move_mode": "dash", - "type": "orientation", - "x": 3544.763427734375, - "y": 1462.154052734375 - }, - { - "action": "combat_script", - "action_params": "wait(1)", - "id": 5, - "move_mode": "dash", - "type": "orientation", - "x": 3544.763427734375, - "y": 1462.154052734375 - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/525枫丹切萨勒姆宫(200_2).json b/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/525枫丹切萨勒姆宫(200_2).json deleted file mode 100644 index 406a3cdee..000000000 --- a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/525枫丹切萨勒姆宫(200_2).json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "info": { - "authors": [ - { - "links": "", - "name": "汐" - } - ], - "bgi_version": "0.45.0", - "description": " 路线信息:该路线预计用时51秒,包含以下怪物:2只魔像禁卫。", - "enable_monster_loot_split": false, - "last_modified_time": 1767728650378, - "map_match_method": "", - "map_name": "SeaOfBygoneEras", - "name": "525枫丹切萨勒姆宫(200_2)", - "tags": [], - "type": "collect", - "version": "1.0" - }, - "positions": [ - { - "action": "", - "action_params": "", - "id": 1, - "move_mode": "walk", - "type": "teleport", - "x": 4739.18896484375, - "y": 1354.5679931640625 - }, - { - "action": "", - "action_params": "", - "id": 2, - "move_mode": "dash", - "type": "path", - "x": 4730.55078125, - "y": 1374.54443359375 - }, - { - "action": "fight", - "action_params": "", - "id": 3, - "move_mode": "dash", - "type": "path", - "x": 4713.1474609375, - "y": 1388.3568115234375 - }, - { - "action": "combat_script", - "action_params": "wait(1)", - "id": 4, - "move_mode": "dash", - "type": "orientation", - "x": 4713.1474609375, - "y": 1388.3568115234375 - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/526枫丹切萨勒姆宫东(200_2).json b/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/526枫丹切萨勒姆宫东(200_2).json deleted file mode 100644 index 48be4f4eb..000000000 --- a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/526枫丹切萨勒姆宫东(200_2).json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "info": { - "authors": [ - { - "links": "", - "name": "汐" - } - ], - "bgi_version": "0.45.0", - "description": " 路线信息:该路线预计用时66秒,包含以下怪物:2只魔像禁卫。", - "enable_monster_loot_split": false, - "last_modified_time": 1767728638478, - "map_match_method": "", - "map_name": "SeaOfBygoneEras", - "name": "526枫丹切萨勒姆宫东(200_2)", - "tags": [], - "type": "collect", - "version": "1.0" - }, - "positions": [ - { - "action": "", - "action_params": "", - "id": 1, - "move_mode": "walk", - "type": "teleport", - "x": 4547.02490234375, - "y": 1477.1634521484375 - }, - { - "action": "", - "action_params": "", - "id": 2, - "move_mode": "dash", - "type": "path", - "x": 4564.86767578125, - "y": 1371.078857421875 - }, - { - "action": "combat_script", - "action_params": "keydown(w),wait(2.4),dash", - "id": 3, - "move_mode": "dash", - "type": "orientation", - "x": 4541.044921875, - "y": 1351.780029296875 - }, - { - "action": "", - "action_params": "", - "id": 4, - "move_mode": "dash", - "type": "path", - "x": 4541.044921875, - "y": 1351.780029296875 - }, - { - "action": "fight", - "action_params": "", - "id": 5, - "move_mode": "dash", - "type": "path", - "x": 4556.9306640625, - "y": 1311.4007568359375 - }, - { - "action": "combat_script", - "action_params": "wait(1)", - "id": 6, - "move_mode": "dash", - "type": "orientation", - "x": 4556.9306640625, - "y": 1311.4007568359375 - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/527枫丹旧日之海谐律院(200_2).json b/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/527枫丹旧日之海谐律院(200_2).json deleted file mode 100644 index 9dd49a56b..000000000 --- a/repo/js/AutoHoeingOneDragon/pathing/旧日和圣山锄地路线/旧日之海/527枫丹旧日之海谐律院(200_2).json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "info": { - "authors": [ - { - "links": "", - "name": "汐" - } - ], - "bgi_version": "0.45.0", - "description": " 路线信息:该路线预计用时52秒,包含以下怪物:2只魔像禁卫。", - "enable_monster_loot_split": false, - "last_modified_time": 1767728664745, - "map_match_method": "", - "map_name": "SeaOfBygoneEras", - "name": "527枫丹旧日之海谐律院(200_2)", - "tags": [], - "type": "collect", - "version": "1.0" - }, - "positions": [ - { - "action": "", - "action_params": "", - "id": 1, - "move_mode": "walk", - "type": "teleport", - "x": 4006.736328125, - "y": 1337.83544921875 - }, - { - "action": "", - "action_params": "", - "id": 2, - "move_mode": "dash", - "type": "path", - "x": 3981.960693359375, - "y": 1324.236328125 - }, - { - "action": "fight", - "action_params": "", - "id": 3, - "move_mode": "dash", - "type": "path", - "x": 3967.423583984375, - "y": 1273.9945068359375 - }, - { - "action": "combat_script", - "action_params": "wait(1)", - "id": 4, - "move_mode": "dash", - "type": "orientation", - "x": 3967.423583984375, - "y": 1273.9945068359375 - } - ] -} \ No newline at end of file diff --git a/repo/js/AutoHoeingOneDragon/settings.json b/repo/js/AutoHoeingOneDragon/settings.json index 1269fc77d..6dd1f0e10 100644 --- a/repo/js/AutoHoeingOneDragon/settings.json +++ b/repo/js/AutoHoeingOneDragon/settings.json @@ -114,7 +114,7 @@ { "name": "tagsForGroup1", "type": "input-text", - "label": "允许使用的标签:\n水免,次数盾,高危,传奇,蕈兽,小怪,沙暴,狭窄地形]\n允许使用自定义标签,文件路径或描述包含时将会视为路线含有该标签\n多个标签使用【中文逗号】分隔\n\n路径组一要【排除】的标签", + "label": "允许使用的标签:\n水免,次数盾,高危,传奇,蕈兽,小怪,沙暴,狭窄地形,环境伤害\n允许使用自定义标签,文件路径或描述包含时将会视为路线含有该标签\n多个标签使用【中文逗号】分隔\n\n路径组一要【排除】的标签", "default": "蕈兽,传奇,狭窄地形" }, {