diff --git a/README.md b/README.md index 3dde0871f1..6fad896147 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ MAA 的意思是 MAA Assistant Arknights - 韩服 支持基本的刷理智功能,请参考 [说明](resource/global/YoStarKR/readme.md) - 繁中服 - 支持基本的刷理智、自动公招、公招识别功能,请参考 [说明](resource/global/txwy/readme.md) + 支持基本的刷理智、自动公招、自动肉鸽、领取日常、公招识别功能,请参考 [说明](resource/global/txwy/readme.md) 由于外服用户较少及项目人手不足的问题,外服目前都仅适配了基本的功能。若您有强需求,欢迎在 [讨论区](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions) 催更,或加入我们一起建设 MAA! diff --git a/README_en-US.md b/README_en-US.md index 8ef60c8b52..d9db23b9f1 100644 --- a/README_en-US.md +++ b/README_en-US.md @@ -79,9 +79,9 @@ Please refer to: [FAQ](docs/en-us/1.2-FAQ.md) - JP Client Supports basic features like Combat, Credit Shopping, Auto Recruiting, Visiting, Collocting, Auto Roguelike(beta), Recruitment calculate, etc. See also [README](resource/global/YoStarJP/readme.md) - KR Client - Supports basic features like Combat, etc. See also [README](resource/global/YoStarKR/readme.md) + Supports basic features like Combat, etc. See also [README](resource/global/YoStarKR/readme.md) - ZH_CHT Client - Supports basic features like Combat, etc. See also [README](resource/global/txwy/readme.md) + Supports basic features like Combat, Auto Recruiting, Auto Roguelike(beta), Recruitment calculate, etc. See also [README](resource/global/txwy/readme.md) Due to the small number of overseas clients users and the lack of project manpower, the overseas clients is currently only adapted to basic functions. If you have strong needs, welcome to ask the progress in the [discussions](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions), or join us to make MAA better! diff --git a/README_ja-JP.md b/README_ja-JP.md index 2fed4eddec..55b505f721 100644 --- a/README_ja-JP.md +++ b/README_ja-JP.md @@ -82,7 +82,7 @@ UIを見れば使い方もすぐ分かる! 基本的な作戦機能のみサポートされている。 サポート内容については[README](resource/global/YoStarKR/readme.md)を参照してください。 - TXWYサーバー - 基本的な作戦、自動公開求人、公開求人認識の機能がサポートされている。 + 基本的な作戦、自動公開求人、統合戦略(ベータ版)、公開求人認識の機能がサポートされている。 サポート内容については[README](resource/global/txwy/readme.md)を参照してください。 海外サーバーのユーザーが不足しており、基本的な機能しかサポートされていません。要件があれば[提案](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions)ページで提案をお願い致します。~~いっしょにMAAの開発に協力しましょう~~ diff --git a/README_zh-TW.md b/README_zh-TW.md index 903387f7a0..d2f74ad098 100644 --- a/README_zh-TW.md +++ b/README_zh-TW.md @@ -81,7 +81,7 @@ MAA 的意思是 MAA Assistant Arknights - 韓服 支援基本的刷理智功能,請參考 [說明](resource/global/YoStarKR/readme.md) - 繁中服 - 支援基本的刷理智、自動公招、公招辨識功能,請參考 [說明](resource/global/txwy/readme.md) + 支援基本的刷理智、自動公招、自動肉鴿、領取日常、公招辨識功能,請參考 [說明](resource/global/txwy/readme.md) 由於外服使用者較少及項目人手不足的問題,外服目前都僅適配了基本的功能。若您有強需求,歡迎在 [討論區](https://github.com/MaaAssistantArknights/MaaAssistantArknights/discussions) 催更,~~或加入我們一起建設 MAA~~ diff --git a/resource/global/YoStarEN/resource/tasks.json b/resource/global/YoStarEN/resource/tasks.json index 32c1a77696..3585b6fcd6 100644 --- a/resource/global/YoStarEN/resource/tasks.json +++ b/resource/global/YoStarEN/resource/tasks.json @@ -1,115 +1,31 @@ { "StartButton1": { - "algorithm": "OcrDetect", "text": [ "Start" - ], - "cache": false, - "preDelay": 500, - "roi": [ - 1000, - 600, - 280, - 120 - ], - "exceededNext": [ - "StageSNReturnFlag", - "Stop" - ], - "action": "ClickSelf", - "next": [ - "StartButton2", - "UseMedicine", - "UseStone", - "NoStone", - "OfflineConfirm", - "AnnihilationConfirm" ] }, - "PRTS": { - "algorithm": "OcrDetect", + "PRTS2": { "text": [ "Takeover" - ], - "roi": [ - 0, - 500, - 1280, - 220 - ], - "action": "DoNothing", - "postDelay": 5000, - "next": [ - "PRTS", - "PRTS3", - "EndOfAction", - "PrtsErrorConfirm", - "OfflineConfirm", - "WaitAfterPRTS" ] }, "VisitNextOcr": { - "algorithm": "OcrDetect", "text": [ "Visit Next" - ], - "action": "ClickSelf", - "roi": [ - 1080, - 570, - 195, - 130 - ], - "next": [ - "VisitLimited", - "VisitNext", - "VisitNextBlack", - "VisitNextOcr" ] }, "VisitLimited": { - "algorithm": "OcrDetect", "text": [ "limit", "reached" - ], - "action": "DoNothing", - "roi": [ - 900, - 50, - 375, - 140 - ], - "next": [ - "Home@ReturnTo" ] }, "NoFriends": { - "algorithm": "OcrDetect", "text": [ "No friends" - ], - "roi": [ - 650, - 100, - 300, - 150 - ], - "action": "DoNothing", - "next": [ - "Home@ReturnTo" ] }, "RecruitTags": { - "algorithm": "OcrDetect", - "fullMatch": true, - "text": [], - "roi": [ - 375, - 360, - 480, - 120 - ], "ocrReplace": [ [ "Starter", @@ -226,135 +142,27 @@ ] }, "Mall": { - "algorithm": "OcrDetect", - "action": "ClickSelf", "text": [ "Store" - ], - "roi": [ - 640, - 360, - 640, - 360 - ], - "next": [ - "CreditStoreOcr", - "Mall", - "Mall@CloseAnno", - "Mall@TodaysSupplies" ] }, "CreditStoreOcr": { - "algorithm": "OcrDetect", "text": [ "Credit Store" - ], - "roi": [ - 1000, - 0, - 280, - 300 - ], - "action": "ClickSelf", - "next": [ - "CollectCredit", - "CreditStoreFailed", - "Stop" ] }, "CreditShop-NoMoney": { - "algorithm": "OcrDetect", "text": [ "Insufficient Credit", "Unable to" - ], - "roi": [ - 940, - 60, - 339, - 110 - ] - }, - "Award": { - "template": "Task.png", - "action": "ClickSelf", - "roi": [ - 650, - 500, - 250, - 170 - ], - "next": [ - "ReceiveAward", - "DailyTask", - "WeeklyTask", - "Award" - ] - }, - "AwardFinished": { - "action": "Stop", - "roi": [ - 400, - 0, - 880, - 150 - ], - "maskRange": [ - 1, - 255 - ] - }, - "DailyTask": { - "action": "ClickSelf", - "cache": false, - "roi": [ - 400, - 0, - 880, - 150 - ], - "next": [ - "ReceiveAward", - "WeeklyTask" - ] - }, - "WeeklyTask": { - "action": "ClickSelf", - "cache": false, - "roi": [ - 400, - 0, - 880, - 150 - ], - "next": [ - "ReceiveAward", - "Stop" ] }, "Roguelike@StageTraderInvestSystemFull": { - "algorithm": "OcrDetect", - "cache": false, - "reduceOtherTimes": [ - "Roguelike@StageTraderInvestConfirm" - ], "text": [ "Storage full" - ], - "roi": [ - 982, - 28, - 298, - 289 - ], - "next": [ - "Roguelike@StageTraderInvestCancel" ] }, "BattleStageName": { - "algorithm": "OcrDetect", - "cache": false, - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及Rouge-like的English识别任务复用", "ocrReplace": [ [ @@ -674,8 +482,6 @@ ] }, "CharsNameOcrReplace": { - "algorithm": "OcrDetect", - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及干员名的English Name识别任务复用", "ocrReplace": [ [ @@ -1925,14 +1731,6 @@ ] }, "RoguelikeCustom-HijackSquad": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 0, - 383, - 1280, - 142 - ], "ocrReplace": [ [ "Leader Squad", @@ -1977,14 +1775,6 @@ ] }, "RoguelikeCustom-HijackRoles": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 54, - 356, - 1172, - 183 - ], "ocrReplace": [ [ "As Your Heart Desires", @@ -2013,14 +1803,6 @@ ] }, "RoguelikeCustom-HijackCoChar": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 186, - 298, - 913, - 200 - ], "ocrReplace": [ [ "Caster", @@ -2058,14 +1840,6 @@ "preDelay": 1000 }, "RoguelikeTraderShoppingOcr": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - -120, - -160, - 190, - 35 - ], "ocrReplace": [ [ "Guard Promotion Voucher", @@ -3198,73 +2972,24 @@ ] }, "StageDrops-DropType-ExpAndLMB": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Normal": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Extra": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Furniture": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Special": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Sanity": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 }, "StageDrops-DropType-Reward": { - "templThreshold": 0.7, - "roi": [ - 0, - 2, - 0, - 25 - ], - "Doc": "roi 只用到了 y 和 height" + "templThreshold": 0.7 } } diff --git a/resource/global/YoStarJP/resource/tasks.json b/resource/global/YoStarJP/resource/tasks.json index f33acca6f5..067e041c29 100644 --- a/resource/global/YoStarJP/resource/tasks.json +++ b/resource/global/YoStarJP/resource/tasks.json @@ -1,105 +1,30 @@ { "StartButton1": { - "algorithm": "OcrDetect", "text": [ "行動開始" - ], - "cache": false, - "preDelay": 500, - "roi": [ - 1000, - 600, - 280, - 120 - ], - "exceededNext": [ - "StageSNReturnFlag", - "Stop" - ], - "action": "ClickSelf", - "next": [ - "StartButton2", - "UseMedicine", - "UseStone", - "NoStone", - "OfflineConfirm", - "AnnihilationConfirm" ] }, - "PRTS": { - "algorithm": "OcrDetect", + "PRTS3": { "text": [ "残り配置可能数" - ], - "roi": [ - 0, - 500, - 1280, - 220 - ], - "action": "DoNothing", - "postDelay": 5000, - "next": [ - "PRTS", - "PRTS3", - "EndOfAction", - "PrtsErrorConfirm", - "OfflineConfirm", - "WaitAfterPRTS" ] }, "VisitNextOcr": { - "algorithm": "OcrDetect", "text": [ "次を訪問" - ], - "action": "ClickSelf", - "roi": [ - 1080, - 570, - 195, - 130 - ], - "next": [ - "VisitLimited", - "VisitNext", - "VisitNextBlack", - "VisitNextOcr" ] }, "VisitLimited": { - "algorithm": "OcrDetect", "text": [ "上限", "達しました", "Fpは入手できません", "再訪問の場合" - ], - "action": "DoNothing", - "roi": [ - 900, - 50, - 375, - 140 - ], - "next": [ - "Home@ReturnTo" ] }, "NoFriends": { - "algorithm": "OcrDetect", "text": [ "戦友があリませれ" - ], - "roi": [ - 650, - 100, - 300, - 150 - ], - "action": "DoNothing", - "next": [ - "Home@ReturnTo" ] }, "StageDrops-Quantity": { @@ -118,15 +43,6 @@ ] }, "RecruitTags": { - "algorithm": "OcrDetect", - "fullMatch": true, - "text": [], - "roi": [ - 375, - 360, - 480, - 120 - ], "ocrReplace": [ [ "初期", @@ -243,116 +159,22 @@ ] }, "Mall": { - "algorithm": "OcrDetect", - "action": "ClickSelf", "text": [ "購買部" - ], - "roi": [ - 640, - 360, - 640, - 360 - ], - "next": [ - "CreditStoreOcr", - "Mall", - "Mall@CloseAnno", - "Mall@TodaysSupplies" ] }, "CreditStoreOcr": { - "algorithm": "OcrDetect", "text": [ "FP交換所" - ], - "roi": [ - 1000, - 0, - 280, - 300 - ], - "action": "ClickSelf", - "next": [ - "CollectCredit", - "CreditStoreFailed", - "Stop" ] }, "CreditShop-NoMoney": { - "algorithm": "OcrDetect", "text": [ "足りません", "FPが" - ], - "roi": [ - 940, - 60, - 339, - 110 - ] - }, - "Award": { - "template": "Task.png", - "action": "ClickSelf", - "roi": [ - 650, - 500, - 250, - 170 - ], - "next": [ - "ReceiveAward", - "DailyTask", - "WeeklyTask", - "Award" - ] - }, - "AwardFinished": { - "action": "Stop", - "roi": [ - 400, - 0, - 880, - 150 - ], - "maskRange": [ - 1, - 255 - ] - }, - "DailyTask": { - "action": "ClickSelf", - "cache": false, - "roi": [ - 400, - 0, - 880, - 150 - ], - "next": [ - "ReceiveAward", - "WeeklyTask" - ] - }, - "WeeklyTask": { - "action": "ClickSelf", - "cache": false, - "roi": [ - 400, - 0, - 880, - 150 - ], - "next": [ - "ReceiveAward", - "Stop" ] }, "BattleStageName": { - "algorithm": "OcrDetect", - "cache": false, - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及肉鴿地圖名的日文识别任务复用", "ocrReplace": [ [ @@ -555,17 +377,9 @@ "'Knights' Duel'", "“骑士对决”" ] - ], - "roi": [ - 250, - 435, - 800, - 100 ] }, "CharsNameOcrReplace": { - "algorithm": "OcrDetect", - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及干员名的日文识别任务复用", "ocrReplace": [ [ @@ -1907,8 +1721,6 @@ ] }, "NumberOcrReplace": { - "algorithm": "OcrDetect", - "text": [], "ocrReplace": [ [ "o", @@ -1933,289 +1745,36 @@ ] }, "GoLastBattle": { - "algorithm": "OcrDetect", "text": [ "前回の参加作戦" - ], - "roi": [ - 916, - 479, - 249, - 127 - ], - "action": "ClickSelf", - "next": [ - "UsePrts-Annihilation", - "UsePrts", - "UsePrts-StageSN", - "StartButton1" ] }, - "StageThemeChapter3ToChapter2To1-7": { - "algorithm": "OcrDetect", - "action": "ClickSelf", + "ToChapter2": { "text": [ "幻滅" - ], - "roi": [ - 200, - 120, - 80, - 32 ] }, - "StageThemeChapter2ToChapter1To1-7": { - "algorithm": "OcrDetect", - "action": "ClickSelf", + "ToChapter1": { "text": [ "覚醒" - ], - "roi": [ - 200, - 120, - 80, - 32 - ] - }, - "StagePR-A-1": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-A-1", - "PR-A-1" - ], - "roi": [ - 27, - 260, - 742, - 400 - ] - }, - "StagePR-A-2": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-A-2", - "PR-A-2" - ], - "roi": [ - 472, - 0, - 793, - 502 - ] - }, - "StagePR-B-1": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-B-1", - "PR-B-1" - ], - "roi": [ - 27, - 260, - 742, - 400 - ] - }, - "StagePR-B-2": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-B-2", - "PR-B-2" - ], - "roi": [ - 472, - 0, - 793, - 502 - ] - }, - "StagePR-C-1": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-C-1", - "PR-C-1" - ], - "roi": [ - 27, - 260, - 742, - 400 - ] - }, - "StagePR-C-2": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-C-2", - "PR-C-2" - ], - "roi": [ - 472, - 0, - 793, - 502 - ] - }, - "StagePR-D-1": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-D-1", - "PR-D-1" - ], - "roi": [ - 27, - 260, - 742, - 400 - ] - }, - "StagePR-D-2": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "Pr-D-2", - "PR-D-2" - ], - "roi": [ - 472, - 0, - 793, - 502 - ] - }, - "StageCE5": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "CE-5" - ], - "roi": [ - 850, - 140, - 250, - 220 - ] - }, - "StageLS5": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "LS-5", - "L$-5" - ], - "roi": [ - 850, - 140, - 250, - 220 - ] - }, - "StageCA5": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "CA-5" - ], - "roi": [ - 850, - 140, - 250, - 220 - ] - }, - "StageAP5": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "text": [ - "AP-5" - ], - "roi": [ - 850, - 140, - 250, - 220 - ] - }, - "CE-6": { - "algorithm": "JustReturn", - "action": "DoNothing", - "sub": [ - "StageResource", - "SwipeToTheLeft", - "StageCE", - "StageCE5" - ] - }, - "LS-6": { - "algorithm": "JustReturn", - "action": "DoNothing", - "sub": [ - "StageResource", - "SwipeToTheLeft", - "StageLS", - "StageLS5" ] }, "StartRecruit": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "postDelay": 500, "text": [ "求人開始" - ], - "roi": [ - 0, - 300, - 1280, - 420 ] }, "RecruitFlag": { - "algorithm": "OcrDetect", "text": [ "公開求人" - ], - "roi": [ - 50, - 100, - 230, - 100 - ], - "action": "Stop" + ] }, "RecruitNow": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "postDelay": 500, - "cache": false, "text": [ "緊急招集" - ], - "roi": [ - 0, - 300, - 1280, - 420 - ], - "next": [ - "RecruitNowConfirm" ] }, "RoguelikeCustom-HijackSquad": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 0, - 383, - 1280, - 142 - ], "ocrReplace": [ [ "指揮分隊", @@ -2260,14 +1819,6 @@ ] }, "RoguelikeCustom-HijackRoles": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 54, - 356, - 1172, - 183 - ], "ocrReplace": [ [ "自由自在", @@ -2288,14 +1839,6 @@ ] }, "RoguelikeCustom-HijackCoChar": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 186, - 298, - 913, - 200 - ], "ocrReplace": [ [ "術師", @@ -2329,8 +1872,7 @@ "前衛", "近卫" ] - ], - "preDelay": 1000 + ] }, "RoguelikeRecruitLevel": { "template": "empty.png", @@ -2343,14 +1885,6 @@ ] }, "RoguelikeTraderShoppingOcr": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - -120, - -160, - 190, - 35 - ], "ocrReplace": [ [ "前衛昇進券", diff --git a/resource/global/YoStarKR/resource/tasks.json b/resource/global/YoStarKR/resource/tasks.json index 0e5a037e75..79cee883e7 100644 --- a/resource/global/YoStarKR/resource/tasks.json +++ b/resource/global/YoStarKR/resource/tasks.json @@ -1,65 +1,13 @@ { "StartButton1": { - "algorithm": "OcrDetect", "text": [ "작전개시" - ], - "cache": false, - "preDelay": 500, - "roi": [ - 1000, - 600, - 280, - 120 - ], - "exceededNext": [ - "StageSNReturnFlag", - "Stop" - ], - "action": "ClickSelf", - "next": [ - "StartButton2", - "UseMedicine", - "UseStone", - "NoStone", - "OfflineConfirm", - "AnnihilationConfirm" ] }, - "PRTS": { - "algorithm": "OcrDetect", + "PRTS3": { "text": [ "배치가능", "인원" - ], - "roi": [ - 0, - 500, - 1280, - 220 - ], - "action": "DoNothing", - "postDelay": 5000, - "next": [ - "PRTS", - "PRTS3", - "EndOfAction", - "PrtsErrorConfirm", - "OfflineConfirm", - "WaitAfterPRTS" - ] - }, - "EndOfAction": { - "Doc": "This task registered the StageDropsTaskPlugin", - "roi": [ - 791, - 410, - 296, - 145 - ], - "action": "DoNothing", - "next": [ - "ClickCorner" ] } } diff --git a/resource/global/YoStarKR/resource/template/EndOfAction.png b/resource/global/YoStarKR/resource/template/EndOfAction.png deleted file mode 100644 index 8210515825..0000000000 Binary files a/resource/global/YoStarKR/resource/template/EndOfAction.png and /dev/null differ diff --git a/resource/global/txwy/readme.md b/resource/global/txwy/readme.md index 6a64a43018..a981e67db6 100644 --- a/resource/global/txwy/readme.md +++ b/resource/global/txwy/readme.md @@ -11,4 +11,6 @@ - 使用源石恢复理智 - 刷理智指定次数 - 自动公招 +- 自动肉鸽(测试功能) +- 领取日常 - 公招识别 diff --git a/resource/global/txwy/resource/tasks.json b/resource/global/txwy/resource/tasks.json index b2c1445f13..085595577e 100644 --- a/resource/global/txwy/resource/tasks.json +++ b/resource/global/txwy/resource/tasks.json @@ -1,229 +1,47 @@ { "StartButton1": { - "algorithm": "OcrDetect", "text": [ "開始行動" - ], - "cache": false, - "preDelay": 500, - "roi": [ - 1000, - 600, - 280, - 120 - ], - "exceededNext": [ - "StageSNReturnFlag", - "Stop" - ], - "action": "ClickSelf", - "next": [ - "StartButton2", - "UseMedicine", - "UseStone", - "NoStone", - "OfflineConfirm", - "AnnihilationConfirm" ] }, - "PRTS": { - "algorithm": "OcrDetect", + "PRTS3": { "text": [ "可放置角色" - ], - "roi": [ - 0, - 500, - 1280, - 220 - ], - "action": "DoNothing", - "postDelay": 5000, - "next": [ - "PRTS", - "PRTS3", - "EndOfAction", - "PrtsErrorConfirm", - "OfflineConfirm", - "WaitAfterPRTS" - ] - }, - "EndOfAction": { - "Doc": "This task registered the StageDropsTaskPlugin", - "roi": [ - 791, - 410, - 296, - 145 - ], - "action": "DoNothing", - "next": [ - "ClickCorner" ] }, "RecruitFlag": { - "algorithm": "OcrDetect", "text": [ "公開招募" - ], - "roi": [ - 50, - 100, - 230, - 100 - ], - "action": "Stop" + ] }, - "Recruit@TodaysSupplies": { - "algorithm": "OcrDetect", + "TodaysSupplies": { "text": [ "今日配給" - ], - "action": "ClickRect", - "specificRect": [ - 1000, - 1, - 270, - 340 - ], - "roi": [ - 500, - 50, - 300, - 150 - ], - "next": [ - "Recruit@CloseAnno", - "Recruit@Main" ] }, - "RecruitBeginLoading": { - "algorithm": "OcrDetect", - "action": "DoNothing", + "Loading": { "text": [ "正在提交", "反饋至神經" - ], - "roi": [ - 700, - 600, - 300, - 120 - ], - "next": [ - "RecruitBeginLoading", - "Recruit@Main", - "RecruitBegin" - ] - }, - "RecruitFinishLoading": { - "algorithm": "OcrDetect", - "action": "DoNothing", - "text": [ - "正在提交", - "反饋至神經" - ], - "roi": [ - 700, - 600, - 300, - 120 - ], - "next": [ - "RecruitFinishLoading", - "RecruitFinish", - "RecruitSkip", - "RecruitSkipWithoutButton" ] }, "StartRecruit": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "postDelay": 500, "text": [ "開始招" - ], - "roi": [ - 0, - 300, - 1280, - 420 ] }, "RecruitNow": { - "algorithm": "OcrDetect", - "action": "ClickSelf", - "postDelay": 500, - "cache": false, "text": [ "立即招" - ], - "roi": [ - 0, - 300, - 1280, - 420 - ], - "next": [ - "RecruitNowConfirm" ] }, - "RecruitLoading": { - "algorithm": "OcrDetect", - "action": "DoNothing", - "text": [ - "正在提交", - "反饋至神經" - ], - "roi": [ - 700, - 600, - 300, - 120 - ], - "next": [ - "RecruitLoading", - "SleepThenStop" - ] - }, - "RecruitConfirmLoading": { - "algorithm": "OcrDetect", - "action": "DoNothing", - "text": [ - "正在提交", - "反饋至神經" - ], - "roi": [ - 700, - 600, - 300, - 120 - ], - "next": [ - "RecruitConfirmLoading", - "RecruitFlag" - ] - }, - "FromIntegratedStrategies": { - "algorithm": "OcrDetect", - "action": "ClickSelf", + "Roguelike@FromIntegratedStrategies": { "text": [ "進入主題" - ], - "roi": [ - 1006, - 445, - 246, - 157 - ], - "next": [ - "FromIntegratedStrategies", - "Begin" ] }, "RoguelikeRecruitLevel": { - "template": "empty.png", - "Doc": "日服的等级字体比国服大一圈,要改roi", + "Doc": "台服的等级字体比国服大一圈,要改roi", "roi": [ -172, -1, @@ -232,15 +50,6 @@ ] }, "RecruitTags": { - "algorithm": "OcrDetect", - "fullMatch": true, - "text": [], - "roi": [ - 375, - 360, - 480, - 120 - ], "ocrReplace": [ [ "初期", @@ -381,9 +190,6 @@ ] }, "BattleStageName": { - "algorithm": "OcrDetect", - "cache": false, - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及Rouge-like的繁中识别任务复用", "ocrReplace": [ [ @@ -654,17 +460,9 @@ "荒唐把戲", "荒唐把戏" ] - ], - "roi": [ - 250, - 435, - 800, - 100 ] }, "CharsNameOcrReplace": { - "algorithm": "OcrDetect", - "text": [], "Doc": "该任务的 ocrReplace 被所有涉及干员名的English Name识别任务复用", "ocrReplace": [ [ @@ -1353,15 +1151,7 @@ ] ] }, - "Roguelike1Custom-HijackSquad": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 0, - 383, - 1280, - 142 - ], + "RoguelikeCustom-HijackSquad": { "ocrReplace": [ [ "指.*分.*", @@ -1405,15 +1195,7 @@ ] ] }, - "Roguelike1Custom-HijackRoles": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 54, - 356, - 1172, - 183 - ], + "RoguelikeCustom-HijackRoles": { "ocrReplace": [ [ "先手必勝", @@ -1437,15 +1219,7 @@ ] ] }, - "Roguelike1Custom-HijackCoChar": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - 186, - 298, - 913, - 200 - ], + "RoguelikeCustom-HijackCoChar": { "ocrReplace": [ [ "術師", @@ -1479,18 +1253,9 @@ "近衛", "近卫" ] - ], - "preDelay": 1000 + ] }, "RoguelikeTraderShoppingOcr": { - "algorithm": "OcrDetect", - "text": [], - "roi": [ - -120, - -160, - 190, - 35 - ], "ocrReplace": [ [ "近衛進階券", diff --git a/src/MeoAssistant/TaskData.cpp b/src/MeoAssistant/TaskData.cpp index def6e51410..818d9bd51d 100644 --- a/src/MeoAssistant/TaskData.cpp +++ b/src/MeoAssistant/TaskData.cpp @@ -42,6 +42,7 @@ bool asst::TaskData::parse(const json::value& json) // must_true 若为真,那么 return false 了就是炸了。 // 否则可能只是某个 B@A 的任务没定义 A(这不是少见现象,例如 Roguelike@Abandon) generate_fun = [&](const std::string& name, bool must_true) -> bool { + // 不是需要 generate 的资源(不在 tasks.json 中) if (!to_be_generated[task_name_view(name)]) { // 已生成(它是之前加载过的某个资源的 base) if (m_raw_all_tasks_info.contains(name)) { @@ -58,11 +59,19 @@ bool asst::TaskData::parse(const json::value& json) return false; } const json::value& task_json = json_obj.at(name); + + // 已生成(例如国际服覆写国服资源) + if (m_raw_all_tasks_info.contains(name)) { + return generate_task(name, "", get_raw(name), task_json); + } + + // BaseTask if (auto opt = task_json.find("baseTask")) { std::string base = opt.value(); return generate_fun(base, must_true) && generate_task(name, "", get_raw(base), task_json); } + // TemplateTask if (size_t p = name.find('@'); p != std::string::npos) { if (std::string base = name.substr(p + 1); generate_fun(base, false)) { return generate_task(name, name.substr(0, p), get_raw(base), task_json);