diff --git a/.github/issue-checker.yml b/.github/issue-checker.yml index 2de511c086..e3864b7dd4 100644 --- a/.github/issue-checker.yml +++ b/.github/issue-checker.yml @@ -8,49 +8,55 @@ labels: # Add 的优先级比 Remove 高 - name: "module: copilot" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)copilot(?:`|)|自动(作战|战斗|编队)|作业|自動(戰|戦)(鬥|闘)|作業|copilot)' - - "(?:[Aa]dd (?:`|)(?:module: |)copilot(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)copilot(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)copilot(?:`|)|自动(?:作战|战斗|编队)|作业|自動[戰戦][鬥闘]|作業|copilot)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)copilot(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)copilot(?:`|))))[\\s\\S]*$)" - name: "module: roguelike" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)roguelike(?:`|)|肉(鸽|鴿)|集成战略|rogue|ローグ)' - - "(?:[Aa]dd (?:`|)(?:module: |)roguelike(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)roguelike(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)roguelike(?:`|)|肉[鸽鴿]|集成战略|rogue|ローグ)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)roguelike(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)roguelike(?:`|))))[\\s\\S]*$)" - name: "module: fight" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)fight(?:`|)|刷图|剿灭|刷.{0,6}材料|关卡选择|战斗|作战|(戰|戦)(鬥|闘)|fight|battle)' - - "(?:[Aa]dd (?:`|)(?:module: |)fight(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)fight(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)fight(?:`|)|刷图|刷理智|剿灭|刷.{0,6}材料|关卡选择|战斗|作战|[戰戦][鬥闘]|fight|battle)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)fight(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)fight(?:`|))))[\\s\\S]*$)" disabled-if: - "module: copilot" - "module: roguelike" - name: "module: infrast" regexes: - - "(?:[Aa]dd (?:`|)(?:module: |)infrast(?:`|)|\ + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)infrast(?:`|)|\ 基建|贸易站|制造站|发电站|加工站|会客室|训练室|办公室|控制中枢|宿舍|基地|infrast|dorm)" - - "(?:[Aa]dd (?:`|)(?:module: |)infrast(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)infrast(?:`|))))[\\s\\S]*$)" + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)infrast(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)infrast(?:`|))))[\\s\\S]*$)" - name: "module: others" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)others(?:`|)|信用|拜访|登录|开始唤醒|visit|login|startup)' - - "(?:[Aa]dd (?:`|)(?:module: |)others(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)others(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)others(?:`|)|信用|拜访|登录|开始唤醒|visit|login|startup)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)others(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)others(?:`|))))[\\s\\S]*$)" - name: "module: recruit" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)recruit(?:`|)|公招|招募|公開(募集|求人)|recruit)' - - "(?:[Aa]dd (?:`|)(?:module: |)recruit(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)recruit(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)recruit(?:`|)|公招|招募|公開(?:募集|求人)|recruit)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)recruit(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)recruit(?:`|))))[\\s\\S]*$)" disabled-if: - "module: roguelike" +- name: "module: core" + regexes: + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)core(?:`|))' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)core(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)core(?:`|))))[\\s\\S]*$)" - name: "module: GUI" # 其它模块都匹配不上的时候再尝试匹配GUI # 因为可能有人说“公招界面”“肉鸽崩溃”“基建闪退”等等 regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)GUI(?:`|)|图形化界面|闪退|gui|GUI|インターフェース)' - - "(?:[Aa]dd (?:`|)(?:module: |)GUI(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)GUI(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:module: |)GUI(?:`|)|图形化界面|闪退|gui|GUI|インターフェース)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:module: |)GUI(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:module: |)GUI(?:`|))))[\\s\\S]*$)" disabled-if: - "module: copilot" + - "module: core" - "module: fight" - "module: infrast" - "module: recruit" @@ -58,17 +64,17 @@ labels: - "module: others" - name: "release" regexes: - - '(?:[Aa]dd (?:`|)release(?:`|)|Release v(?:\d)+\.(?:\d)+\.(?:\d)+)' - - "(?:[Aa]dd (?:`|)release(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)release(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)release(?:`|)|Release v(?:\d)+\.(?:\d)+\.(?:\d)+)' + - "(?:[Aa]dd (?:`|)(?:label |)release(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)release(?:`|))))[\\s\\S]*$)" mode: pull_request_target: [add, remove] - name: "ambiguous" # 不符合上面任何一个的分类并且(如果是PR)不符合 commitizen regexes: - - "(?:[Aa]dd (?:`|)ambiguous(?:`|)|^(?![\\s\\S]*(?:\ + - "(?:[Aa]dd (?:`|)(?:label |)ambiguous(?:`|)|^(?![\\s\\S]*(?:\ feat|chore|perf|style|refactor|fix|doc|\ - [Rr]emove (?:[Aa]ll labels|(?:`|)ambiguous(?:`|))))[\\s\\S]*$)" + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)ambiguous(?:`|))))[\\s\\S]*$)" mode: pull_request_target: [add, remove] issues: [add, remove] @@ -81,36 +87,36 @@ labels: - "module: others" - "module: recruit" - "module: roguelike" + - "module: core" - "release" - name: "translation required" - # 不要使用日文发 issue regexes: - - "(?:[Aa]dd (?:`|)translation required(?:`|)|([\\u3040-\\u30ff]|[㍿㍐]))" - - "(?:[Aa]dd (?:`|)translation required(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)translation required(?:`|))))[\\s\\S]*$)" + - "(?:[Aa]dd (?:`|)(?:label |)translation required(?:`|)|(?:(?:[\\u3040-\\u30ff]|[㍿㍐])[^`]*){10,})" + - "(?:[Aa]dd (?:`|)(?:label |)translation required(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)translation required(?:`|))))[\\s\\S]*$)" mode: pull_request_target: [add, remove] issues: [add, remove] - name: "Client: JP" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)Client: JP(?:`|)|日(文|语|本|)服|YoStarJP)' - - "(?:[Aa]dd (?:`|)(?:module: |)Client: JP(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)Client: JP(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)JP(?:`|)|日(?:文|语|本|)服|[Yy]o[Ss]tarJP|(?:JP|jp)服)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)JP(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:Client: |)JP(?:`|))))[\\s\\S]*$)" - name: "Client: EN" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)Client: EN(?:`|)|英(文|语|)服|国际服|美服|YoStarEN)' - - "(?:[Aa]dd (?:`|)(?:module: |)Client: EN(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)Client: EN(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)EN(?:`|)|英(?:文|语|)服|国际服|美服|[Yy]o[Ss]tarEN|(?:EN|en)服)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)EN(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:Client: |)EN(?:`|))))[\\s\\S]*$)" - name: "Client: KR" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)Client: KR(?:`|)|韩(文|语|国|)服|YoStarKR)' - - "(?:[Aa]dd (?:`|)(?:module: |)Client: KR(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)Client: KR(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)KR(?:`|)|韩(?:文|语|国|)服|[Yy]o[Ss]tarKR|(?:KR|kr)服)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)KR(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:Client: |)KR(?:`|))))[\\s\\S]*$)" - name: "Client: ZH_TW" regexes: - - '(?:[Aa]dd (?:`|)(?:module: |)Client: ZH_TW(?:`|)|繁中服|台(湾|灣|)服|繁体中文服|(龙|龍)成|天下网游|txwy)' - - "(?:[Aa]dd (?:`|)(?:module: |)Client: ZH_TW(?:`|)|^(?![\\s\\S]*(?:\ - [Rr]emove (?:[Aa]ll labels|(?:`|)(?:module: |)Client: ZH_TW(?:`|))))[\\s\\S]*$)" + - '(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)ZH_TW(?:`|)|繁中服|台(?:湾|灣|)服|繁体中文服|(?:龙|龍)成|天下网游|txwy)' + - "(?:[Aa]dd (?:`|)(?:label |)(?:Client: |)ZH_TW(?:`|)|^(?![\\s\\S]*(?:\ + [Rr]emove (?:(?:[Aa]ll |)[Ll]abels|(?:`|)(?:Client: |)ZH_TW(?:`|))))[\\s\\S]*$)" - name: "MAA Team" mode: pull_request_target: [add] @@ -122,12 +128,14 @@ labels: - "(?:(?:`v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)`|\ v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)\\s+)|\ \\[(?:`v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)`|\ - v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|))\\]\\(\\S*\\))\ - \\s*fixed|(?:[Ff]ixed by\\s*\ - (?:`v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)`|\\s+\ + v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|))\\]\\(\\S*\\)|\ + https?\\://[^/\\s]+/[^/\\s]+/[^/\\s]+/commit/[0-9a-z]{40,40})\ + \\s*fixed|[Ff]ixed (?:in|at|by)\\s*\ + (?:(?:`v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)`|\\s+\ v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|))|\ \\[(?:`v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|)`|\ - v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|))\\]\\(\\S*\\))" + v\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta)\\.\\d+|\\.\\d+|))\\]\\(\\S*\\)|\ + https?\\://[^/\\s]+/[^/\\s]+/[^/\\s]+/commit/[0-9a-z]{40,40})" mode: issue_comment: [add] - name: "duplicate" diff --git a/README.md b/README.md index c2decd7bd5..8bd8ed2cef 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ MAA 的意思是 MAA Assistant Arknights ### 贡献/参与者 -感谢所有参与到开发/测试中的朋友们,是大家的帮助让 MAA 越来越好! (*´▽`)ノノ +感谢所有参与到开发/测试中的朋友们,是大家的帮助让 MAA 越来越好! (\*´▽`)ノノ [![Contributors](https://contributors-img.web.app/image?repo=MaaAssistantArknights/MaaAssistantArknights)](https://github.com/MaaAssistantArknights/MaaAssistantArknights/graphs/contributors) @@ -158,6 +158,13 @@ MAA 的意思是 MAA Assistant Arknights - [任务流程协议](docs/任务流程协议.md) - [自动抄作业协议](docs/战斗流程协议.md) +### Issue bot + +- 使用 `Add {LABEL_NAME}` 增加标签,使用 `Remove {LABEL_NAME}` 删除标签。 +- 在提交说明中用 `close #{ISSUE_NUMBER}` 或 `fix #{ISSUE_NUMBER}` 给对应议题增加 `fixed` 标签。 + +更多说明请参考 [Issue bot 使用方法](docs/IssueBot使用方法.md)。 + ### 想参与开发,但不太会用 Github? [Github Pull Request 流程简述](docs/PR流程简述.md) diff --git a/docs/IssueBot使用方法.md b/docs/IssueBot使用方法.md new file mode 100644 index 0000000000..b42201a7db --- /dev/null +++ b/docs/IssueBot使用方法.md @@ -0,0 +1,58 @@ +# Issue bot 使用方法 + +Issue bot 使用的 action 为 [issue-checker](https://github.com/zzyyyl/issue-checker),配置文件为 [issue-checker.yml](.github/issue-checker.yml)。 + +## 功能 + +### 自动触发 + +- 给上传文件失败的议题评论,告诉用户文件上传失败。 +- 给 议题 和 拉取请求 增加标签,包括 `module` 系列,`Client` 系列,`ambiguous`,`translation required` 等。 + Issue bot 会根据关键词自动增加分类标签,也可以通过手动添加的方式增加或删除标签。 + 具体关键词可以参考[配置文件](.github/issue-checker.yml)。 +- 给可见性设置为 public 的 MAA 成员增加 `MAA Team` 标签。 + +### 手动触发 + +多使用关键词详细描述问题来自动触发分类标签,少使用下列指令。但**当你知道自己的行为会导致 Issue bot 误解时除外**。 + +尽量不要直接增加或删除分类标签,因为手动增加或删除的分类标签可能在修改后会被恢复原样。 + +#### 议题(Issue)及其评论 + +在 **修改/新增** 一个议题时: + +- `Add {LABEL_NAME}` 可以增加一个标签。 +- `Remove {LABEL_NAME}` 可以删除一个标签。 +- `Remove labels` 可以删除所有标签。 + +在 **修改/新增** 一个议题评论时: + +- `Add ambiguous` 可以保证不删除 `ambiguous` 标签,但没有 `ambiguous` 标签时不会添加。 +- `Remove {LABEL_NAME}` 可以保证不增加标签。1 +- `Remove labels` 可以保证不增加任何标签。1 +- 以下几种方法可以为议题增加 `fixed` 标签:2 + - `https://github.com/MaaAssistantArknights/MaaAssistantArknights/commit/{COMMIT_HASH} fixed` + - `fixed by https://github.com/MaaAssistantArknights/MaaAssistantArknights/commit/{COMMIT_HASH}` + - `{VERSION} fixed` + - `fixed by {VERSION}` +- `Duplicate of #{ISSUE_NUMBER}` 可以为当前议题增加 `duplicate` 标签。 +- **当你知道自己的议题评论会导致 Issue bot 误解时,尽量添加一些 remove 操作。** + +_Note1: `Remove ambiguous` 和 `Remove labels` 会删除 `ambiguous` 标签。_ +_Note2: 这里的 COMMIT_HASH 需要完整的 40 位。_ + +#### 拉取请求(Pull Request)及其评论 + +与[议题(Issue)及其评论](#议题issue及其评论)基本相同。另外: + +- `Release {VERSION}` 会增加 `release` 标签。 +- **不会**自动添加 `fixed`, `duplicate` 标签。 + +#### 推送(Push) + +- 在 commit message 中包含以下几种任意一个,可以为对应议题加上 `fixed` 标签: + - `fix #{ISSUE_NUMBER}` + - `close #{ISSUE_NUMBER}` + - `fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/{ISSUE_NUMBER}` + - `close https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/{ISSUE_NUMBER}` diff --git a/docs/en/EMULATOR_SUPPORTS.md b/docs/en/EMULATOR_SUPPORTS.md index 9d56b9596b..c77693ea92 100644 --- a/docs/en/EMULATOR_SUPPORTS.md +++ b/docs/en/EMULATOR_SUPPORTS.md @@ -26,6 +26,14 @@ Compatible. 4. LinkStart! +- If you need to run multiple emulators (ignore this step if you do not need to do so), you can change the keywords for MAA to detect configuration files. + Add field `Bluestacks.Config.Keyword` following the steps above + Example: + + ```jsonc + "Bluestacks.Config.Keyword":"bst.instance.Nougat64.status.adb_port", + ``` + ### ✅ Nox Fully compatible. @@ -52,7 +60,8 @@ Incompatible. ADB screenshot is black. ### 🚫 Leidian -Compatible but not recommended. There is a small chance that the game will be displayed upside down or blackscreen, causing the application to click the button to use Originium by mistake (reported by users). +Compatible but not recommended. There is a small chance that the game will be displayed upside down or blackscreen, and with other problems. +For example, when it clicks the "Back" button at the top left corner, the screen rotated 180°, causing the application to click the button of using Originium by mistake (reported by users). ### ⚠️ MEmu @@ -80,6 +89,41 @@ Compatible. ### ⚙️ Custom Connection 1. Download [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) and unzip. -2. Go to `Settings` - `Connection Settings`, and fill in ADB path and address (IP+port is required, e.g. `127.0.0.1:5555`) +2. Go to `Settings` - `Connection Settings`, and fill in ADB path and address (IP + port are required, e.g. `127.0.0.1:5555`) -**Note:** If your device is non-`16:9` resolution like mobile phone or Android pad, You can set resolution with `adb shell wm size` on your phone and change it back later. +### ⚙️ Non-`16:9` devices like smartphones or tablets + +You may need to change the resolution manually since MAA supports only `16:9` resolution. + +1. Turn on USB debugging mode and connect your device to the computer with a cable, or debug with ADB remotely. +2. Run `Command Prompt (CMD)`, check the device address and connect. + + - Use the following command to check device ID if you are using USB cable to connect: + + ```bash + adb devices # Checks the connection status of the current device, with the first column to be the device ID + ``` + + - If you are using remote ADB connection: go to `Settings -> WLAN -> View` to find the corresponding IP address, and the port will usually be 5555 or 5037. + + ```bash + adb connect # E.g. 192.168.0.10:5555 + ``` + +3. Enter the command prompt to proceed + + ```bash + adb -s shell # Enters the command prompt of the device + wm size # Checks the resolution of the current device + wm size 720x1280 # Changes the resolution to 720p + ``` + +4. Fill in the ADB path and the address of your smartphone (device ID or IP + port) in MAA +5. Set the `Special-shaped screen adaptation` to 0 (off) in the game settings. + Otherwise, your phone UI and click response may be dislocated if you change the resolution with ADB later. +6. Use MAA (≧∇≦)ノ +7. Before exiting MAA, reset the resolution of your phone. + + ```bash + wm size reset # Resets resolution + ``` diff --git a/resource/tasks.json b/resource/tasks.json index f46da21960..b62d404150 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -6917,9 +6917,9 @@ }, "Roguelike1RecruitOcrFlag": { "roi": [ - 350, - 100, - 700, + 525, + 110, + 640, 500 ], "templThreshold": 0.95 diff --git a/resource/template/Roguelike1RecruitElite0.png b/resource/template/Roguelike1RecruitElite0.png index 5db8c05269..8016722d2f 100644 Binary files a/resource/template/Roguelike1RecruitElite0.png and b/resource/template/Roguelike1RecruitElite0.png differ diff --git a/resource/template/Roguelike1RecruitElite1.png b/resource/template/Roguelike1RecruitElite1.png index f4264789ef..351b516ebf 100644 Binary files a/resource/template/Roguelike1RecruitElite1.png and b/resource/template/Roguelike1RecruitElite1.png differ diff --git a/resource/template/Roguelike1RecruitElite2.png b/resource/template/Roguelike1RecruitElite2.png index 20de6be476..a3a5a009c5 100644 Binary files a/resource/template/Roguelike1RecruitElite2.png and b/resource/template/Roguelike1RecruitElite2.png differ diff --git a/src/MeoAssistant/RoguelikeRecruitTaskPlugin.cpp b/src/MeoAssistant/RoguelikeRecruitTaskPlugin.cpp index 83dc9249ee..91418116bf 100644 --- a/src/MeoAssistant/RoguelikeRecruitTaskPlugin.cpp +++ b/src/MeoAssistant/RoguelikeRecruitTaskPlugin.cpp @@ -56,7 +56,13 @@ bool asst::RoguelikeRecruitTaskPlugin::_run() auto image = m_ctrler->get_image(); RoguelikeRecruitImageAnalyzer analyzer(image); if (!analyzer.analyze()) { - // 本页没有检测到符合条件的干员,向右滑动 + // 如果还没滑动就识别失败,通常是招募界面为空,视为招募成功并退出 + if (i == 0) { + Log.trace(__FUNCTION__, "| Recruit list analyse failed before swiping"); + return true; + } + // 已经滑动过,识别失败可能是意外情况,尝试继续滑动 + Log.trace(__FUNCTION__, "| Recruit list analyze failed after swiping: ", i); slowly_swipe(ProcessTaskAction::SlowlySwipeToTheRight); sleep(Task.get("Roguelike1Custom-HijackSquad")->rear_delay); continue; @@ -78,13 +84,7 @@ bool asst::RoguelikeRecruitTaskPlugin::_run() const auto& char_opt = chars_map.find(oper_info.name); if (char_opt.has_value()) { - // 干员已在编队中 - int elite = char_opt.value().get("elite", 0); - if (elite == 2) { - // 干员已精二,忽略 - continue; - } - + // 干员已在编队中,又出现在招募列表,只有待晋升和预备干员两种情况 if (recruit_info.is_alternate) { // 预备干员可以重复招募 priority = recruit_info.recruit_priority; @@ -95,15 +95,19 @@ bool asst::RoguelikeRecruitTaskPlugin::_run() } } else { - // 干员待招募 + // 干员待招募,检查练度 if (oper_info.elite == 2) { // TODO: 招募时已精二 (随机提升或对应分队) => promoted_priority priority = recruit_info.recruit_priority; } - else { - // 招募时未精二 + else if (oper_info.elite == 1 && oper_info.level >= 50) { + // 精一50级以上 priority = recruit_info.recruit_priority; } + else { + // 精一50级以下,默认不招募 + Log.trace(__FUNCTION__, "| Ignored low level oper:", oper_info.name, oper_info.elite, oper_info.level); + } } // 已经划到后备干员,且已有候选干员,假定后面的干员优先级不会更高,不再划动 @@ -111,6 +115,11 @@ bool asst::RoguelikeRecruitTaskPlugin::_run() stop_swipe = true; } + // 优先级为0,可能练度不够被忽略 + if (priority == 0) { + continue; + } + // 添加到候选名单 auto existing_it = ranges::find_if(recruit_list, [&](const RoguelikeRecruitInfo& pri) -> bool { return pri.name == recruit_info.name;