diff --git a/docs/en-us/manual/introduction/combat.md b/docs/en-us/manual/introduction/combat.md index 80253fb411..141f1d88fb 100644 --- a/docs/en-us/manual/introduction/combat.md +++ b/docs/en-us/manual/introduction/combat.md @@ -71,6 +71,7 @@ Alternative stages are selected based on daily stage availability - MAA will cho This functions like a schedule, not as a fallback if the primary stage selection fails. Example: Alternative Stages are `CE-6/5`, `1-7` and `LS-6/5`: + - If `CE-6/5` is open today, MAA will run it and ignore the alternatives. If you haven't unlocked auto-deploy for CE-6/5, the task will fail. - If `CE-6/5` is closed today, MAA will run `1-7` instead. If you haven't unlocked auto-deploy for 1-7, the task will fail. - Since `1-7` is a permanent stage that appears before `LS-6/5` in the list, MAA will never run `LS-6/5` in this scenario. @@ -89,6 +90,7 @@ MAA will use the specified battle multiplier setting: - **Disabled mode** (-1): - Doesn't change the in-game multiplier setting - If sanity is insufficient for the current in-game multiplier setting, ends the task + ### Perform Battles MAA will run up to the specified number of battles. diff --git a/docs/en-us/protocol/integration.md b/docs/en-us/protocol/integration.md index 143e0800b5..c4fac3798a 100644 --- a/docs/en-us/protocol/integration.md +++ b/docs/en-us/protocol/integration.md @@ -117,6 +117,7 @@ Whether to enable this task. ::: field name="stage" type="string" optional Stage name, by default empty, recognizes current/last stage. Editing in run-time is not supported. Currently supported stages for navigation include: + - All mainline stages. You can add `-NORMAL` or `-HARD` at the end of the stage to switch between standard or challenge mode. - For LMD and Battle Record stages 5/6, must input `CE-6` / `LS-6`. MAA will automatically switch to stage 5 if stage 6 cannot be delegated. - Skill Summary, Voucher, and Carbon stage 5, must input `CA-5` / `AP-5` / `SK-5`. @@ -129,64 +130,64 @@ Currently supported stages for navigation include: - OF-1 / OF-F3 / GT-5 in side stories. - Last three stages of current SS events. Visit [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) for the list of supported stages. Requires additional loading of event stage navigation in [tasks.json](https://api.maa.plus/MaaAssistantArknights/api/resource/tasks.json) file. - Rerun SS events. Input `SSReopen-` to farm XX-1 ~ XX-9 stages at once, e.g. `SSReopen-IC`. -::: -::: field name="medicine" type="number" optional default="0" -Maximum number of Sanity Potions used. -::: -::: field name="expiring_medicine" type="number" optional default="0" -Maximum number of Sanity Potions expiring within 48 hours. -::: -::: field name="stone" type="number" optional default="0" -Maximum number of Originite Prime used. -::: -::: field name="times" type="number" optional default="2147483647" -Number of battles. -::: -::: field name="series" type="number" optional -Number of consecutive battles, -1~6. -
-`-1` to disable switching. -
-`0` to automatically switch to the current maximum available times, if current sanity is not enough for 6 times, select the minimum available times. -
-`1~6` to specify number of consecutive battles. -::: -::: field name="drops" type="object" optional -Specifying the number of drops, no specification by default. key is item_id, value is quantity. key can refer to `resource/item_index.json` file. -
-Example: `{ "30011": 10, "30062": 5 }` -
-All above are OR relations, i.e. task stops when any one is reached. -::: -::: field name="report_to_penguin" type="boolean" optional default="false" -Whether to upload data to Penguin Statistics. -::: -::: field name="penguin_id" type="string" optional -Penguin Statistics report id, empty by default. Only effective when `report_to_penguin` is true. -::: -::: -::: field name="report_to_yituliu" type="boolean" optional default="false" -Whether to report to YITULIU. -::: -::: field name="yituliu_id" type="string" optional -YITULIU report id, empty by default. Only effective when `report_to_yituliu` is true. -::: -::: field name="server" type="string" optional default="CN" -Server, will affect drop recognition and upload. -
-Options: `CN` | `US` | `JP` | `KR` -::: -::: field name="client_type" type="string" optional -Client version, empty by default. Used to restart and reconnect after game crash, does not enable this feature if empty. -
-Options: `Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` -::: -::: field name="DrGrandet" type="boolean" optional default="false" -Sanity-saving Originite usage mode, only effective when Originite usage may occur. -
-Wait at the Originite confirmation screen until the current 1 sanity point is restored, then immediately use Originite. -::: -:::: + ::: + ::: field name="medicine" type="number" optional default="0" + Maximum number of Sanity Potions used. + ::: + ::: field name="expiring_medicine" type="number" optional default="0" + Maximum number of Sanity Potions expiring within 48 hours. + ::: + ::: field name="stone" type="number" optional default="0" + Maximum number of Originite Prime used. + ::: + ::: field name="times" type="number" optional default="2147483647" + Number of battles. + ::: + ::: field name="series" type="number" optional + Number of consecutive battles, -1~6. +
+ `-1` to disable switching. +
+ `0` to automatically switch to the current maximum available times, if current sanity is not enough for 6 times, select the minimum available times. +
+ `1~6` to specify number of consecutive battles. + ::: + ::: field name="drops" type="object" optional + Specifying the number of drops, no specification by default. key is item_id, value is quantity. key can refer to `resource/item_index.json` file. +
+ Example: `{ "30011": 10, "30062": 5 }` +
+ All above are OR relations, i.e. task stops when any one is reached. + ::: + ::: field name="report_to_penguin" type="boolean" optional default="false" + Whether to upload data to Penguin Statistics. + ::: + ::: field name="penguin_id" type="string" optional + Penguin Statistics report id, empty by default. Only effective when `report_to_penguin` is true. + ::: + ::: + ::: field name="report_to_yituliu" type="boolean" optional default="false" + Whether to report to YITULIU. + ::: + ::: field name="yituliu_id" type="string" optional + YITULIU report id, empty by default. Only effective when `report_to_yituliu` is true. + ::: + ::: field name="server" type="string" optional default="CN" + Server, will affect drop recognition and upload. +
+ Options: `CN` | `US` | `JP` | `KR` + ::: + ::: field name="client_type" type="string" optional + Client version, empty by default. Used to restart and reconnect after game crash, does not enable this feature if empty. +
+ Options: `Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` + ::: + ::: field name="DrGrandet" type="boolean" optional default="false" + Sanity-saving Originite usage mode, only effective when Originite usage may occur. +
+ Wait at the Originite confirmation screen until the current 1 sanity point is restored, then immediately use Originite. + ::: + ::::
Example @@ -335,7 +336,7 @@ Facilities for shifting (ordered). Editing in run-time is not supported.
Facility name: `Mfg` | `Trade` | `Power` | `Control` | `Reception` | `Office` | `Dorm` | `Processing` | `Training` ::: -::: field name="drones" type="string" optional default="_NotUse" +::: field name="drones" type="string" optional default="\_NotUse" Usage of drones. This field is ignored when `mode = 10000`.
Options: `_NotUse` | `Money` | `SyntheticJade` | `CombatRecord` | `PureGold` | `OriginStone` | `Chip` @@ -375,7 +376,7 @@ Plan index number in the configuration. Editing in run-time is not supported.
::: -:::: +::::
Example @@ -437,7 +438,7 @@ Formation slot index used for the OF-1 battle.
Integer between 0–4, where 0 = current squad, 1–4 = first, second, third, fourth squad. ::: -:::: +::::
Example @@ -484,7 +485,7 @@ Collect Orundum from limited mining licenses. ::: field name="specialaccess" type="boolean" optional default="false" Collect monthly card rewards from 5th anniversary. ::: -:::: +::::
Example @@ -655,7 +656,7 @@ Only possible to be true in Sarkaz theme, Investment mode, with "点刺成锭分
Uses fixed seed. ::: -:::: +::::
Example @@ -725,56 +726,57 @@ List of jobs, mutually exclusive with filename (required, choose one); when both
Each object contains:
+ - `filename`: Path to the job JSON file; both relative and absolute paths are supported -
+
- `stage_name`: Stage name, refer to [PRTS.Map](https://map.ark-nights.com) for details -
+
- `is_raid`: Whether to switch to Challenge Mode (Raid), optional, default false -::: -::: field name="loop_times" type="number" optional default="1" -Number of loops. Effective only in single job mode (i.e., when filename is specified); set_params can only be executed once when this parameter is in effect. -::: -::: field name="use_sanity_potion" type="boolean" optional default="false" -Whether to use sanity potions when sanity is insufficient. -::: -::: field name="formation" type="boolean" optional default="false" -Whether to enable auto formation. -::: -::: field name="formation_index" type="number" optional default="0" -The index of the formation slot to use in auto formation. Only effective when formation is true. -
-An integer between 0–4: 0 means the current formation, 1–4 refer to the 1st–4th formations. -::: -::: field name="user_additional" type="array" optional default="[]" -Custom additional operators list. Only effective when formation is true. -
-Each object contains: -
+ ::: + ::: field name="loop_times" type="number" optional default="1" + Number of loops. Effective only in single job mode (i.e., when filename is specified); set_params can only be executed once when this parameter is in effect. + ::: + ::: field name="use_sanity_potion" type="boolean" optional default="false" + Whether to use sanity potions when sanity is insufficient. + ::: + ::: field name="formation" type="boolean" optional default="false" + Whether to enable auto formation. + ::: + ::: field name="formation_index" type="number" optional default="0" + The index of the formation slot to use in auto formation. Only effective when formation is true. +
+ An integer between 0–4: 0 means the current formation, 1–4 refer to the 1st–4th formations. + ::: + ::: field name="user_additional" type="array" optional default="[]" + Custom additional operators list. Only effective when formation is true. +
+ Each object contains: +
- `name`: Operator name, optional, default "", if left empty this operator will be ignored -
+
- `skill`: Skill to bring, optional, default 1; must be an integer between 1–3; otherwise, follows the in-game default -::: -::: field name="add_trust" type="boolean" optional default="false" -Whether to auto-fill empty slots by ascending trust value during auto formation. Only effective when formation is true. -::: -::: field name="ignore_requirements" type="boolean" optional default="false" -Whether to ignore operator attribute requirements during auto formation. Only effective when formation is true. -::: -::: field name="support_unit_usage" type="number" optional default="0" -Support operator usage mode. Integer between 0–3. Only effective when formation is true. -
-`0` - Do not use support operators -
-`1` - Use support operator only if exactly one operator is missing; otherwise, do not use support -
-`2` - Use support operator if one is missing; otherwise, use the specified support operator -
-`3` - Use support operator if one is missing; otherwise, use a random support operator -::: -::: field name="support_unit_name" type="string" optional default="" -Specified support operator name. Only effective when support_unit_usage is 2. -::: -:::: + ::: + ::: field name="add_trust" type="boolean" optional default="false" + Whether to auto-fill empty slots by ascending trust value during auto formation. Only effective when formation is true. + ::: + ::: field name="ignore_requirements" type="boolean" optional default="false" + Whether to ignore operator attribute requirements during auto formation. Only effective when formation is true. + ::: + ::: field name="support_unit_usage" type="number" optional default="0" + Support operator usage mode. Integer between 0–3. Only effective when formation is true. +
+ `0` - Do not use support operators +
+ `1` - Use support operator only if exactly one operator is missing; otherwise, do not use support +
+ `2` - Use support operator if one is missing; otherwise, use the specified support operator +
+ `3` - Use support operator if one is missing; otherwise, use a random support operator + ::: + ::: field name="support_unit_name" type="string" optional default="" + Specified support operator name. Only effective when support_unit_usage is 2. + ::: + :::: For more details about auto-combat JSON, please refer to [Combat Operation Protocol](./copilot-schema.md) @@ -817,7 +819,7 @@ Filename and path of the task JSON, supporting absolute/relative paths. Editing ::: field name="loop_times" type="number" optional Number of times to loop execution. ::: -:::: +:::: For more details about Stationary Security Service JSON, please refer to [SSS Schema](./sss-schema.md) @@ -847,7 +849,7 @@ File path of a single operation JSON, supports absolute/relative paths. Runtime ::: field name="list" type="array" required List of operation JSON files, supports absolute/relative paths. Runtime editing not supported. Mutually exclusive with filename (required, choose one). ::: -:::: +::::
Example @@ -869,7 +871,7 @@ List of operation JSON files, supports absolute/relative paths. Runtime editing ::: field name="enable" type="boolean" optional default="true" Whether to enable this task. ::: -:::: +::::
Example @@ -889,7 +891,7 @@ Whether to enable this task. ::: field name="enable" type="boolean" optional default="true" Whether to enable this task. ::: -:::: +::::
Example @@ -912,9 +914,9 @@ Whether to enable this task. ::: field name="theme" type="string" optional default="Fire" Theme.
-`Fire` - *Fire Within the Sand* +`Fire` - _Fire Within the Sand_
-`Tales` - *Tales Within the Sand* +`Tales` - _Tales Within the Sand_ ::: ::: field name="mode" type="number" optional default="0" Mode. @@ -936,7 +938,7 @@ Click type. ::: field name="num_craft_batches" type="number" optional default="16" Maximum number of craft batches per session. ::: -:::: +::::
Example @@ -964,7 +966,7 @@ Whether to enable this task. ::: field name="task_names" type="array" required Execute the task on the first match in the array (and subsequent next, etc.). If you want to perform multiple tasks, you can append Custom task multiple times. ::: -:::: +::::
Example @@ -1000,7 +1002,7 @@ Subtask type. ::: field name="details" type="object" optional Detailed parameters for the subtask. ::: -:::: +::::
Example @@ -1028,7 +1030,7 @@ Whether to enable this task. ::: field name="filename" type="string" required Video file path, supporting absolute/relative paths. Editing in run-time is not supported. ::: -:::: +::::
Example @@ -1068,7 +1070,7 @@ Instance handle ::: field name="task" type="AsstTaskId" required Task ID, the return value of `AsstAppendTask` ::: -::: field name="params" type="const char*" required +::: field name="params" type="const char\*" required Task parameter in JSON, same as `AsstAppendTask`. For those fields that do not mention "Editing in run-time is not supported" can be changed during run-time. Otherwise these changes will be ignored when the task is running. ::: @@ -1097,7 +1099,7 @@ Set process-level parameters ::: field name="key" type="AsstStaticOptionKey" required key ::: -::: field name="value" type="const char*" required +::: field name="value" type="const char\*" required value ::: :::: @@ -1132,7 +1134,7 @@ handle ::: field name="key" type="AsstInstanceOptionKey" required key ::: -::: field name="value" type="const char*" required +::: field name="value" type="const char\*" required value ::: :::: diff --git a/docs/ja-jp/manual/introduction/combat.md b/docs/ja-jp/manual/introduction/combat.md index 0ad4fac49b..7207c42379 100644 --- a/docs/ja-jp/manual/introduction/combat.md +++ b/docs/ja-jp/manual/introduction/combat.md @@ -71,6 +71,7 @@ icon: hugeicons:brain-02 これはスケジュールに近い機能であり、「ステージ選択に失敗したときの予備候補」にはなりません。 例:代替選択肢が `龍門幣-6(CE-6)`、 `1-7` 、`作戦記録-6(LS-6)` の場合: + - 当日に `龍門幣-6(CE-6)` が開放されていれば `龍門幣-6(CE-6)` に向かい、`1-7` と `作戦記録-6(LS-6)` には向かいません。この時点で `龍門幣-6(CE-6)` の自動指揮を解放していなければ、作戦タスクはエラーになります。 - 当日に `龍門幣-6(CE-6)` が開放されていなければ `1-7` に向かい、`龍門幣-6(CE-6)` には向かいません。この時点で `1-7` の自動指揮を解放していなければ、作戦タスクはエラーになります。 - `作戦記録-6(LS-6)` より前に常設の `1-7` が存在するため、この構成では MAA は `作戦記録-6(LS-6)` には決して向かいません。 diff --git a/docs/ko-kr/protocol/integration.md b/docs/ko-kr/protocol/integration.md index 341925a86a..87dc9458e0 100644 --- a/docs/ko-kr/protocol/integration.md +++ b/docs/ko-kr/protocol/integration.md @@ -174,7 +174,7 @@ Bilibili 서버: `张三`인 경우 `张三`, `张`, `三` 입력 가능
오리지늄 사용 확인 창에서 대기하다가, 현재 1이성이 회복되면 즉시 오리지늄을 사용 ::: -:::: +::::
Example @@ -645,7 +645,7 @@ Sarkaz 테마, Investment 모드, "연금술 분대" 또는 "지원 분대"일
고정 시드 사용 ::: -:::: +::::
Example diff --git a/docs/zh-cn/manual/introduction/combat.md b/docs/zh-cn/manual/introduction/combat.md index cb175b93cd..5909998637 100644 --- a/docs/zh-cn/manual/introduction/combat.md +++ b/docs/zh-cn/manual/introduction/combat.md @@ -71,6 +71,7 @@ icon: hugeicons:brain-02 这是一个类似于日程表的功能,并不能当做关卡选择任务失败时的备用关卡。 例子:关卡备选添加了 `龙门币-6/5`、`1-7` 和 `经验-6/5`: + - 如果当天开放 `龙门币-6/5`,就会前往 `龙门币-6/5`,不会前往 `1-7` 和 `经验-6/5`。如果玩家此时未解锁 `龙门币-6/5` 代理,则理智作战任务出错。 - 如果当天未开放 `龙门币-6/5`,则会前往 `1-7`,不会前往 `龙门币-6/5`。如果玩家此时未解锁 1-7 代理,则理智作战任务出错。 - 由于 `经验-6/5` 前存在常驻关卡 `1-7`,在这种情况下,MAA 永远也不会前往 `经验-6/5` 战斗。 diff --git a/docs/zh-cn/protocol/integration.md b/docs/zh-cn/protocol/integration.md index 7a856d6099..5b3fc360b8 100644 --- a/docs/zh-cn/protocol/integration.md +++ b/docs/zh-cn/protocol/integration.md @@ -117,6 +117,7 @@ B服:`张三`,可输入 `张三`、`张`、`三` ::: field name="stage" type="string" optional 关卡名,默认为空,识别当前/上次的关卡。不支持运行中设置。 目前支持导航的关卡有: + - 全部主线关卡。可在关卡末尾添加 `-NORMAL` 或 `-HARD` 来切换标准或磨难关卡。 - 龙门币、作战记录的 5 / 6 关,但必须输入 `CE-6` / `LS-6`。MAA 会在第六关无法代理的情况下自动切换至第五关。 - 技能书、采购凭证、碳本第 5 关,必须输入 `CA-5` / `AP-5` / `SK-5`。 @@ -129,64 +130,64 @@ B服:`张三`,可输入 `张三`、`张`、`三` - 别传中的 OF-1 / OF-F3 / GT-5。 - 当期 SS 活动 后三关。可访问 [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) 获取支持的关卡列表。需额外加载 [tasks.json](https://api.maa.plus/MaaAssistantArknights/api/resource/tasks.json) 文件中的活动关卡导航。 - 复刻的 SS 活动。输入 `SSReopen-<关卡前缀>` ,可一次性刷完 XX-1 ~ XX-9 关,如 `SSReopen-IC`。 -::: -::: field name="medicine" type="number" optional default="0" -最大使用理智药数量。 -::: -::: field name="expiring_medicine" type="number" optional default="0" -最大使用 48 小时内过期理智药数量。 -::: -::: field name="stone" type="number" optional default="0" -最大吃石头数量。 -::: -::: field name="times" type="number" optional default="2147483647" -战斗次数。 -::: -::: field name="series" type="number" optional -连战次数, -1~6。 -
-`-1` 为禁用切换。 -
-`0` 为自动切换为当前可用的最大次数, 如当前理智不够6次, 则选择最低可用次数。 -
-`1~6` 为指定连战次数。 -::: -::: field name="drops" type="object" optional -指定掉落数量,默认不指定。key 为 item_id, value 为数量。key 可参考 `resource/item_index.json` 文件。 -
-例如: `{ "30011": 10, "30062": 5 }` -
-以上全部是或的关系,即任一达到即停止任务。 -::: -::: field name="report_to_penguin" type="boolean" optional default="false" -是否汇报企鹅数据。 -::: -::: field name="penguin_id" type="string" optional -企鹅数据汇报 id, 默认为空。仅在 `report_to_penguin` 为 true 时有效。 -::: -::: -::: field name="report_to_yituliu" type="boolean" optional default="false" -是否汇报一图流。 -::: -::: field name="yituliu_id" type="string" optional -一图流汇报 id, 默认为空。仅在 `report_to_yituliu` 为 true 时有效。 -::: -::: field name="server" type="string" optional default="CN" -服务器,会影响掉落识别及上传。 -
-选项:`CN` | `US` | `JP` | `KR` -::: -::: field name="client_type" type="string" optional -客户端版本,默认为空。用于游戏崩溃时重启并连回去继续刷,若为空则不启用该功能。 -
-选项:`Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` -::: -::: field name="DrGrandet" type="boolean" optional default="false" -节省理智碎石模式,仅在可能产生碎石效果时生效。 -
-在碎石确认界面等待,直到当前的 1 点理智恢复完成后再立刻碎石。 -::: -:::: + ::: + ::: field name="medicine" type="number" optional default="0" + 最大使用理智药数量。 + ::: + ::: field name="expiring_medicine" type="number" optional default="0" + 最大使用 48 小时内过期理智药数量。 + ::: + ::: field name="stone" type="number" optional default="0" + 最大吃石头数量。 + ::: + ::: field name="times" type="number" optional default="2147483647" + 战斗次数。 + ::: + ::: field name="series" type="number" optional + 连战次数, -1~6。 +
+ `-1` 为禁用切换。 +
+ `0` 为自动切换为当前可用的最大次数, 如当前理智不够6次, 则选择最低可用次数。 +
+ `1~6` 为指定连战次数。 + ::: + ::: field name="drops" type="object" optional + 指定掉落数量,默认不指定。key 为 item_id, value 为数量。key 可参考 `resource/item_index.json` 文件。 +
+ 例如: `{ "30011": 10, "30062": 5 }` +
+ 以上全部是或的关系,即任一达到即停止任务。 + ::: + ::: field name="report_to_penguin" type="boolean" optional default="false" + 是否汇报企鹅数据。 + ::: + ::: field name="penguin_id" type="string" optional + 企鹅数据汇报 id, 默认为空。仅在 `report_to_penguin` 为 true 时有效。 + ::: + ::: + ::: field name="report_to_yituliu" type="boolean" optional default="false" + 是否汇报一图流。 + ::: + ::: field name="yituliu_id" type="string" optional + 一图流汇报 id, 默认为空。仅在 `report_to_yituliu` 为 true 时有效。 + ::: + ::: field name="server" type="string" optional default="CN" + 服务器,会影响掉落识别及上传。 +
+ 选项:`CN` | `US` | `JP` | `KR` + ::: + ::: field name="client_type" type="string" optional + 客户端版本,默认为空。用于游戏崩溃时重启并连回去继续刷,若为空则不启用该功能。 +
+ 选项:`Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` + ::: + ::: field name="DrGrandet" type="boolean" optional default="false" + 节省理智碎石模式,仅在可能产生碎石效果时生效。 +
+ 在碎石确认界面等待,直到当前的 1 点理智恢复完成后再立刻碎石。 + ::: + ::::
Example @@ -655,7 +656,7 @@ Tag 等级(大于等于 3)和对应的希望招募时限,单位为分钟
使用固定种子。 ::: -:::: +::::
Example @@ -708,7 +709,7 @@ Tag 等级(大于等于 3)和对应的希望招募时限,单位为分钟
-刷坍缩范式功能具体请参考 [肉鸽辅助协议](./integrated-strategy-schema.md#萨米肉鸽——坍缩范式) +刷坍缩范式功能具体请参考 [肉鸽辅助协议](./integrated-strategy-schema.md#萨米肉鸽——坍缩范式) - `Copilot` 自动抄作业 diff --git a/docs/zh-tw/manual/introduction/combat.md b/docs/zh-tw/manual/introduction/combat.md index 7ccad94def..cc65272b9b 100644 --- a/docs/zh-tw/manual/introduction/combat.md +++ b/docs/zh-tw/manual/introduction/combat.md @@ -8,7 +8,7 @@ icon: hugeicons:brain-02 ## 一般設定 - `吃理智藥` + `吃源石` 和 `指定次數`、`指定材料` 三個選項為為「或」邏輯關係, -即達成三個選項中的任一條件,均會視為任務完成,停止刷理智。 + 即達成三個選項中的任一條件,均會視為任務完成,停止刷理智。 - `吃理智藥` 指定補充幾瓶理智(可能一次吃多瓶藥)。 - `吃源石` 指定碎幾顆石頭(一次一顆),當倉庫中有理智藥時不會碎石。 - `指定次數` 指定刷多少次指定關卡(例如「刷 15 次後停止」)。 @@ -16,23 +16,23 @@ icon: hugeicons:brain-02 - `指定材料` 與 `關卡選擇` 是兩個互相獨立的邏輯。`指定材料` 只是以材料個數作為任務完成依據,並不會自動導航到相應關卡。 - `吃源石` 只會在 `吃理智藥` 之後判斷,因為 MAA 只有在沒有理智藥時才會使用源石補充理智。 -所以在勾選 `吃源石` 之後,MAA 會將 `吃理智藥` 的次數鎖定為 999,確保將理智藥吃光,以避免跳過 `吃源石` 判斷。 + 所以在勾選 `吃源石` 之後,MAA 會將 `吃理智藥` 的次數鎖定為 999,確保將理智藥吃光,以避免跳過 `吃源石` 判斷。 ::: details 範例 -| 吃理智藥 | 吃源石 | 指定次數 | 指定材料 | 结果 | -| :------: | :------: | :------: | :------: | ------------------------------------------------------------------------------------------------------------------------- | -| | | | | 刷完現有理智即結束。 | -| 2 | | | | 先刷完現有理智,然後吃一次理智藥,一共吃 `2` 次,刷完理智後結束。 | -| _999_ | 2 | | | 先刷完現有理智,並吃光理智藥後,再碎石,一共碎 `2` 次,刷完理智後結束。 | -| | | 2 | | 刷 `2` 次選擇的關卡即結束。 | -| | | | 2 | 掉落統計刷到 `2` 個指定的材料即結束。 | -| 2 | | 4 | | 在最多吃 `2` 次理智藥的情況下,刷 `4` 次選擇的關卡即結束。 | -| 2 | | | 4 | 在最多吃 `2` 次理智藥的情況下,掉落統計刷到 `4` 個指定的材料即結束。 | -| 2 | | 4 | 8 | 在最多吃 `2` 次理智藥的情況下,刷 `4` 次選擇的關卡即結束。但如果在沒刷完 `4` 次之前就獲得了 `8` 個指定材料,則會提前結束。 | -| _999_ | 4 | 8 | 16 | 在最多吃光理智藥並碎 `4` 次石頭的情況下,刷 `8` 次選擇的關卡即結束。但如果在沒刷完 `8` 次之前就獲得了 `16` 個指定材料,則會提前結束。 | -| | 2 | | | 先刷完現有理智,如果倉庫中有理智藥則結束,如果沒有理智藥則碎 `2` 次石,刷完理智後結束。_非 MAA GUI 行為_ | -| 2 | 4 | | | 先刷完現有理智,如果吃完 `2` 次理智藥後還有理智藥,則結束;如果吃完 ≤`2` 次理智藥後沒有理智藥了,則繼續碎 `4` 次石頭,刷完理智後結束。_非 MAA GUI 行為_ | +| 吃理智藥 | 吃源石 | 指定次數 | 指定材料 | 结果 | +| :------: | :----: | :------: | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | | | 刷完現有理智即結束。 | +| 2 | | | | 先刷完現有理智,然後吃一次理智藥,一共吃 `2` 次,刷完理智後結束。 | +| _999_ | 2 | | | 先刷完現有理智,並吃光理智藥後,再碎石,一共碎 `2` 次,刷完理智後結束。 | +| | | 2 | | 刷 `2` 次選擇的關卡即結束。 | +| | | | 2 | 掉落統計刷到 `2` 個指定的材料即結束。 | +| 2 | | 4 | | 在最多吃 `2` 次理智藥的情況下,刷 `4` 次選擇的關卡即結束。 | +| 2 | | | 4 | 在最多吃 `2` 次理智藥的情況下,掉落統計刷到 `4` 個指定的材料即結束。 | +| 2 | | 4 | 8 | 在最多吃 `2` 次理智藥的情況下,刷 `4` 次選擇的關卡即結束。但如果在沒刷完 `4` 次之前就獲得了 `8` 個指定材料,則會提前結束。 | +| _999_ | 4 | 8 | 16 | 在最多吃光理智藥並碎 `4` 次石頭的情況下,刷 `8` 次選擇的關卡即結束。但如果在沒刷完 `8` 次之前就獲得了 `16` 個指定材料,則會提前結束。 | +| | 2 | | | 先刷完現有理智,如果倉庫中有理智藥則結束,如果沒有理智藥則碎 `2` 次石,刷完理智後結束。_非 MAA GUI 行為_ | +| 2 | 4 | | | 先刷完現有理智,如果吃完 `2` 次理智藥後還有理智藥,則結束;如果吃完 ≤`2` 次理智藥後沒有理智藥了,則繼續碎 `4` 次石頭,刷完理智後結束。_非 MAA GUI 行為_ | ::: @@ -73,6 +73,7 @@ icon: hugeicons:brain-02 這是一個類似於排程表的功能,並不能當作關卡選擇任務失敗時的備用關卡。 範例:關卡備選選擇了 `龍門幣-6/5`、`1-7` 與 `經驗-6/5`: + - 若當天開放 `龍門幣-6/5`,則會前往該關卡,不會前往 `1-7` 或 `經驗-6/5`。若玩家此時未解鎖 `龍門幣-6/5` 代理,則刷理智任務出錯。 - 若當天未開放 `龍門幣-6/5`,則前往 `1-7`,不會前往 `經驗-6/5`。若玩家此時未解鎖 `1-7` 代理,則刷理智任務出錯。 - 由於 `經驗-6/5` 前存在常駐關卡 `1-7`,在這種情況下,MAA 永遠不會前往 `經驗-6/5` 戰鬥。 @@ -121,4 +122,4 @@ MAA 執行的戰鬥次數不會超過「指定次數」。 - 支援自動勾選 `代理指揮`。 - 支援斷線後或凌晨 4 點閃斷後自動重連並繼續任務。 - 支援等級提升後繼續任務。 -- 代理失敗時會放棄本次行動並重新戰鬥。 \ No newline at end of file +- 代理失敗時會放棄本次行動並重新戰鬥。 diff --git a/docs/zh-tw/protocol/integrated-strategy-schema.md b/docs/zh-tw/protocol/integrated-strategy-schema.md index de844e99b5..057aea9ea3 100644 --- a/docs/zh-tw/protocol/integrated-strategy-schema.md +++ b/docs/zh-tw/protocol/integrated-strategy-schema.md @@ -102,8 +102,8 @@ icon: ri:game-fill | 組合名稱 | 主要考量 | 主要包括職業 | 幹員名稱舉例 | | :------------------------ | :----------------------------- | :-------------------- | :--------------------------------------------------------------- | - | **_地面阻擋_** | 站場與清雜 | 重裝、近衛 | 奶盾、基石、羽毛筆、山、M3、令和稀音的召喚物、斑點、重裝預備幹員 | - | **_地面單切 / 處決者_** | 單獨對戰精英怪 | 處決者特種 | 史爾特爾、異德、麒麟 R 夜刀、M3、紅 | + | **_地面阻擋_** | 站場與清雜 | 重裝、近衛 | 奶盾、基石、羽毛筆、山、M3、令和稀音的召喚物、斑點、重裝預備幹員 | + | **_地面單切 / 處決者_** | 單獨對戰精英怪 | 處決者特種 | 史爾特爾、異德、麒麟 R 夜刀、M3、紅 | | **_高台 C_** | 常態與決戰輸出 | 狙擊、術師 | 維什戴爾、邏各斯、假日威龍陳、澄閃 | | **_高台輸出_** | 對空與常態輸出 | 狙擊、術師 | 空弦、能天使、克洛絲、史都華德 | | **_速狙_** | 物理輸出,標準射程 | 狙擊 | 艾拉、能天使、躍躍、克洛絲 | @@ -141,17 +141,17 @@ icon: ri:game-fill 除了上述較籠統的分組,有時我們需要對一些幹員或幹員種類進行一些客製化的精細操作,例如: - | 組合名稱 | 包含幹員 | 主要特點 | - | :----------- | :--------------- | :-------------------------------------------------------------------------- | - | 益達 | 維什戴爾 | 高台輸出,優先部署可以減輕壓力 | - | 棘刺 | 棘刺、號角 | 地面遠程輸出,傀影肉鴿中部分地圖有非常適合的站位 | - | 召喚類 | 凱爾希、令、稀音 | 具備地面阻擋能力,部分地圖需要優先部署,召喚物可以當阻擋也可以當炮灰 | - | 情報官 | 曉歌、伊內絲 | 既可以回費、又可以側向輸出、還可以單切 | - | 濁心斯卡蒂 | 濁心斯卡蒂 | 低壓時治療量尚可,但是範圍特殊,一些地圖有比較適合的站位 | - | 焰葦 | 焰影葦草 | 薩米肉鴿常用開局幹員,兼具治療和輸出,一些地圖有比較適合的站位 | - | 瑪恩納 | 瑪恩納、銀灰 | 地面大範圍決戰輸出,可以針對 Boss 進行部署 | - | 史爾特爾 | 史爾特爾 | 由於精二後固定攜帶 3 技能,此時站場能力幾乎為零,需要阻擋位時部署優先度極低 | - | 骰子 | 骰子 | 水月肉鴿中的骰子需要單獨操作 | + | 組合名稱 | 包含幹員 | 主要特點 | + | :--------- | :--------------- | :-------------------------------------------------------------------------- | + | 益達 | 維什戴爾 | 高台輸出,優先部署可以減輕壓力 | + | 棘刺 | 棘刺、號角 | 地面遠程輸出,傀影肉鴿中部分地圖有非常適合的站位 | + | 召喚類 | 凱爾希、令、稀音 | 具備地面阻擋能力,部分地圖需要優先部署,召喚物可以當阻擋也可以當炮灰 | + | 情報官 | 曉歌、伊內絲 | 既可以回費、又可以側向輸出、還可以單切 | + | 濁心斯卡蒂 | 濁心斯卡蒂 | 低壓時治療量尚可,但是範圍特殊,一些地圖有比較適合的站位 | + | 焰葦 | 焰影葦草 | 薩米肉鴿常用開局幹員,兼具治療和輸出,一些地圖有比較適合的站位 | + | 瑪恩納 | 瑪恩納、銀灰 | 地面大範圍決戰輸出,可以針對 Boss 進行部署 | + | 史爾特爾 | 史爾特爾 | 由於精二後固定攜帶 3 技能,此時站場能力幾乎為零,需要阻擋位時部署優先度極低 | + | 骰子 | 骰子 | 水月肉鴿中的骰子需要單獨操作 | ::: info 注意 目前固定將未辨識到的地面幹員歸入倒數第二個組合(其他地面),未辨識到的高台幹員則歸入最後一個組合(其他高台)。 @@ -234,7 +234,6 @@ icon: ri:game-fill 4. 群組內幹員各個欄位的意義和腳本相關邏輯: - ```json5 { "theme": "Phantom", @@ -332,7 +331,7 @@ icon: ri:game-fill 首先在 `設定` 中將 `座標展示` 切換為 `MAA`。 接著根據您的經驗,尋找需要優先防守的點位座標與朝向(通常是朝向敵方出現的方向),寫入到 json 的 `"replacement_home"` 欄位中。 - + ```json5 { "stage_name": "蓄水池", // 關卡名稱 @@ -428,13 +427,12 @@ icon: ri:game-fill ::: tip 一些常用的幹員群組用法: - 1. 許多作業中主要防守點的組合是 ["地面阻挡", "处决者", "其他地面"],這代表當主要扛傷位幹員倒下時,會嘗試用處決者拖延冷卻時間;當此點位生存壓力過大時,可考慮使用 ["重装", "地面阻挡", "处决者", "炮灰", "其他地面"];盾後點位則可優先部署盾後輸出單位 ["地面远程", "地面阻挡", "处决者", "其他地面"];若單純為了吸引仇恨或送死,可以使用 ["炮灰", "障碍物", "其他地面"]。 2. 高台位置常用組合為 ["高台输出", "其他高台"]。若想讓任何高台幹員都能放置,可以使用 ["高台输出", "狙击", "辅助", "盾法", "其他高台"]。 3. 一些地面位置非常適合瑪恩納與地刺類幹員的組合,例如 ["玛恩纳", "地刺"]。 - ::: + ::: 2. 在某個時間點部署幹員 ::: tip @@ -800,7 +798,7 @@ icon: ri:game-fill MAA 在界園肉鴿中會自動處理通寶的拾取與交換: -::: tip 啟用條件 +::: tip 啟用條件 通寶交換功能僅在以下模式中啟用: - 投資模式:需要開啟 `投資模式啟用購物、招募、進入第 2 層` 選項。 diff --git a/docs/zh-tw/protocol/integration.md b/docs/zh-tw/protocol/integration.md index 1db1dd37d4..a7c29440ef 100644 --- a/docs/zh-tw/protocol/integration.md +++ b/docs/zh-tw/protocol/integration.md @@ -29,13 +29,13 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha :::: field-group ::: field name="handle" type="AsstHandle" required -執行個體控制代碼 (Handle) +執行個體控制代碼 (Handle) ::: ::: field name="type" type="const char*" required 任務類型 ::: ::: field name="params" type="const char*" required -任務參數,json String +任務參數,json String ::: :::: @@ -116,77 +116,78 @@ B 服:`張三`,可輸入 `張三`、`張`、`三` ::: ::: field name="stage" type="string" optional 關卡名稱。預設為空,將辨識 `目前/上次` 關卡。不支援在執行中更改設定。 -目前支援導航的關卡包含: -- **全部主線關卡**:可在關卡末尾新增 `-NORMAL` 或 `-HARD` 以切換標準或磨難難度。 -- **資源收集**: - - 龍門幣、作戰記錄: 支援第 5 / 6 關,但必須輸入 `CE-6` / `LS-6`。若第六關無法代理,MAA 會自動切換至第五關。 - - 技能書、採購憑證、碳本:支援第 5 關,必須輸入 `CA-5` / `AP-5` / `SK-5`。 - - 晶片關卡:支援所有關卡,必須輸入完整編號,例如`PR-A-1`。 -- **剿滅作戰**:支援以下傳入值(必須使用對應的 Value): - - 當期剿滅:`Annihilation` - - 切爾諾伯格:`Chernobog@Annihilation` - - 龍門外環:`LungmenOutskirts@Annihilation` - - 龍門市區:`LungmenDowntown@Annihilation` -- **別傳**:支援 `OF-1` / `OF-F3` / `GT-5`。 -- **當期 SideStory 活動**:支援活動後三關。可查閱 [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) 獲取支援的關卡列表。需額外加載 [tasks.json](https://api.maa.plus/MaaAssistantArknights/api/resource/tasks.json) 中的活動關卡導航。 +目前支援導航的關卡包含: + +- **全部主線關卡**:可在關卡末尾新增 `-NORMAL` 或 `-HARD` 以切換標準或磨難難度。 +- **資源收集**: + - 龍門幣、作戰記錄: 支援第 5 / 6 關,但必須輸入 `CE-6` / `LS-6`。若第六關無法代理,MAA 會自動切換至第五關。 + - 技能書、採購憑證、碳本:支援第 5 關,必須輸入 `CA-5` / `AP-5` / `SK-5`。 + - 晶片關卡:支援所有關卡,必須輸入完整編號,例如`PR-A-1`。 +- **剿滅作戰**:支援以下傳入值(必須使用對應的 Value): + - 當期剿滅:`Annihilation` + - 切爾諾伯格:`Chernobog@Annihilation` + - 龍門外環:`LungmenOutskirts@Annihilation` + - 龍門市區:`LungmenDowntown@Annihilation` +- **別傳**:支援 `OF-1` / `OF-F3` / `GT-5`。 +- **當期 SideStory 活動**:支援活動後三關。可查閱 [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) 獲取支援的關卡列表。需額外加載 [tasks.json](https://api.maa.plus/MaaAssistantArknights/api/resource/tasks.json) 中的活動關卡導航。 - **復刻 SideStory 活動**:輸入 `SSReopen-<關卡前綴>` ,可一次性刷完 XX-1 ~ XX-9 關,如 `SSReopen-IC`。 -::: -::: field name="medicine" type="number" optional default="0" -理智藥最大使用量。 -::: -::: field name="expiring_medicine" type="number" optional default="0" -48 小時內過期理智藥最大使用量。 -::: -::: field name="stone" type="number" optional default="0" -碎石最大數量。 -::: -::: field name="times" type="number" optional default="2147483647" -戰鬥次數。 -::: -::: field name="series" type="number" optional -連戰次數,`-1` ~ `6`。 -
-`-1`:停用自動切換連戰。 -
-`0`:自動切換為當前可用的最大連戰次數(若理智不足以進行 6 連戰,則選擇最低可用次數)。 -
-`1` ~ `6`:指定固定的連戰次數。 -::: -::: field name="drops" type="object" optional -指定物品掉落數量,預設不指定。key 為 `item_id`,value 為數量。key 可參考 `resource/item_index.json` 檔案。 -
-例如:`{ "30011": 10, "30062": 5 }` -
-上述所有條件(次數、掉落等)均為「或」的關係,任一條件達成即停止任務。 -::: -::: field name="report_to_penguin" type="boolean" optional default="false" -是否回報企鵝物流 -::: -::: field name="penguin_id" type="string" optional -企鵝物流回報 ID,預設為空。僅在 `report_to_penguin` 為 `true` 時有效。 -::: -::: field name="report_to_yituliu" type="boolean" optional default="false" -是否回報一圖流。 -::: -::: field name="yituliu_id" type="string" optional -一圖流回報 ID,預設為空。僅在 `report_to_yituliu` 為 `true` 時有效。 -::: -::: field name="server" type="string" optional default="CN" -遊戲伺服器,會影響掉落物辨識及數據上傳。 -
-選項:`CN` | `US` | `JP` | `KR` -::: -::: field name="client_type" type="string" optional -用戶端版本,預設為空。用於遊戲崩潰後自動重啟並接續任務;若為空則不啟用自動重啟功能。 -
-選項:`Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` -::: -::: field name="DrGrandet" type="boolean" optional default="false" -博朗台模式(節省理智碎石模式),僅在產生碎石需求時才起作用。 -
-在碎石確認介面等待,直到目前理智自動恢復 1 點後,再立刻執行碎石回復,以避免浪費自然恢復。 -::: -:::: + ::: + ::: field name="medicine" type="number" optional default="0" + 理智藥最大使用量。 + ::: + ::: field name="expiring_medicine" type="number" optional default="0" + 48 小時內過期理智藥最大使用量。 + ::: + ::: field name="stone" type="number" optional default="0" + 碎石最大數量。 + ::: + ::: field name="times" type="number" optional default="2147483647" + 戰鬥次數。 + ::: + ::: field name="series" type="number" optional + 連戰次數,`-1` ~ `6`。 +
+ `-1`:停用自動切換連戰。 +
+ `0`:自動切換為當前可用的最大連戰次數(若理智不足以進行 6 連戰,則選擇最低可用次數)。 +
+ `1` ~ `6`:指定固定的連戰次數。 + ::: + ::: field name="drops" type="object" optional + 指定物品掉落數量,預設不指定。key 為 `item_id`,value 為數量。key 可參考 `resource/item_index.json` 檔案。 +
+ 例如:`{ "30011": 10, "30062": 5 }` +
+ 上述所有條件(次數、掉落等)均為「或」的關係,任一條件達成即停止任務。 + ::: + ::: field name="report_to_penguin" type="boolean" optional default="false" + 是否回報企鵝物流 + ::: + ::: field name="penguin_id" type="string" optional + 企鵝物流回報 ID,預設為空。僅在 `report_to_penguin` 為 `true` 時有效。 + ::: + ::: field name="report_to_yituliu" type="boolean" optional default="false" + 是否回報一圖流。 + ::: + ::: field name="yituliu_id" type="string" optional + 一圖流回報 ID,預設為空。僅在 `report_to_yituliu` 為 `true` 時有效。 + ::: + ::: field name="server" type="string" optional default="CN" + 遊戲伺服器,會影響掉落物辨識及數據上傳。 +
+ 選項:`CN` | `US` | `JP` | `KR` + ::: + ::: field name="client_type" type="string" optional + 用戶端版本,預設為空。用於遊戲崩潰後自動重啟並接續任務;若為空則不啟用自動重啟功能。 +
+ 選項:`Official` | `Bilibili` | `txwy` | `YoStarEN` | `YoStarJP` | `YoStarKR` + ::: + ::: field name="DrGrandet" type="boolean" optional default="false" + 博朗台模式(節省理智碎石模式),僅在產生碎石需求時才起作用。 +
+ 在碎石確認介面等待,直到目前理智自動恢復 1 點後,再立刻執行碎石回復,以避免浪費自然恢復。 + ::: + ::::
Example @@ -402,7 +403,7 @@ Tag 等級(大於等於 3)對應的期望招募時限(單位:分鐘) - `Mall` 領取信用點數及商店購物。 - 會先依據 `buy_first` 清單依序購買;接著由左至右掃描商店,避開 `blacklist` 進行第二輪購買;若信用點數溢出,則會無視黑名單再次由左至右購買,直到信用點數不再溢出為止。 + 會先依據 `buy_first` 清單依序購買;接著由左至右掃描商店,避開 `blacklist` 進行第二輪購買;若信用點數溢出,則會無視黑名單再次由左至右購買,直到信用點數不再溢出為止。 :::: field-group ::: field name="enable" type="boolean" optional default="true" @@ -655,7 +656,7 @@ Tag 等級(大於等於 3)對應的期望招募時限(單位:分鐘)
使用固定種子。 ::: -:::: +::::
Example @@ -708,7 +709,7 @@ Tag 等級(大於等於 3)對應的期望招募時限(單位:分鐘)
-刷坍縮範式功能,具體請參閱 [肉鴿輔助協定](./integrated-strategy-schema.md#薩米肉鴿——坍縮範式) +刷坍縮範式功能,具體請參閱 [肉鴿輔助協定](./integrated-strategy-schema.md#薩米肉鴿——坍縮範式) - `Copilot` 自動抄作業 @@ -777,7 +778,7 @@ Tag 等級(大於等於 3)對應的期望招募時限(單位:分鐘) ::: :::: -作業 json 請參閱 [戰鬥流程協定](./copilot-schema.md) +作業 json 請參閱 [戰鬥流程協定](./copilot-schema.md)
Example @@ -819,7 +820,7 @@ Tag 等級(大於等於 3)對應的期望招募時限(單位:分鐘) 循環執行次數。 ::: :::: -保全派駐作業 json 請參考 [保全派駐協定](./sss-schema.md) +保全派駐作業 json 請參考 [保全派駐協定](./sss-schema.md)
Example @@ -1063,7 +1064,7 @@ bool ASSTAPI AsstSetTaskParams(AsstHandle handle, AsstTaskId id, const char* par :::: field-group ::: field name="handle" type="AsstHandle" required -實例控制代碼(Handle)。 +實例控制代碼(Handle)。 ::: ::: field name="task" type="AsstTaskId" required 任務 ID,為 `AsstAppendTask` 介面的回傳值。 @@ -1095,10 +1096,10 @@ bool ASSTAPI AsstSetStaticOption(AsstStaticOptionKey key, const char* value); :::: field-group ::: field name="key" type="AsstStaticOptionKey" required -鍵(Key)。 +鍵(Key)。 ::: ::: field name="value" type="const char\*" required -值(Value)。 +值(Value)。 ::: :::: @@ -1121,16 +1122,16 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key, #### 回傳值 - `bool` - 回傳是否設定成功。 + 回傳是否設定成功。 #### 參數說明 :::: field-group ::: field name="handle" type="AsstHandle" required -實例控制代碼(Handle)。 +實例控制代碼(Handle)。 ::: ::: field name="key" type="AsstInstanceOptionKey" required -鍵(Key)。 +鍵(Key)。 ::: ::: field name="value" type="const char\*" required 值(Value)。 diff --git a/src/MaaCore/Assistant.cpp b/src/MaaCore/Assistant.cpp index b900edcfb8..e692f61ce7 100644 --- a/src/MaaCore/Assistant.cpp +++ b/src/MaaCore/Assistant.cpp @@ -397,11 +397,10 @@ asst::Assistant::AsyncCallId asst::Assistant::async_attach_window( return append_async_call( AsyncCallItem::Type::AttachWindow, - AsyncCallItem::AttachWindowParams { - .hwnd = hwnd, - .screencap_method = screencap_method, - .mouse_method = mouse_method, - .keyboard_method = keyboard_method }, + AsyncCallItem::AttachWindowParams { .hwnd = hwnd, + .screencap_method = screencap_method, + .mouse_method = mouse_method, + .keyboard_method = keyboard_method }, block); } #endif diff --git a/src/MaaCore/Assistant.h b/src/MaaCore/Assistant.h index b5aee143df..fd0ba89e81 100644 --- a/src/MaaCore/Assistant.h +++ b/src/MaaCore/Assistant.h @@ -195,7 +195,11 @@ private: bool ctrl_connect(const std::string& adb_path, const std::string& address, const std::string& config); #ifdef _WIN32 - bool ctrl_attach_window(void* hwnd, Win32ScreencapMethod screencap_method, Win32InputMethod mouse_method, Win32InputMethod keyboard_method); + bool ctrl_attach_window( + void* hwnd, + Win32ScreencapMethod screencap_method, + Win32InputMethod mouse_method, + Win32InputMethod keyboard_method); #endif bool ctrl_click(int x, int y); bool ctrl_screencap(); diff --git a/src/MaaCore/Common/AsstTypes.h b/src/MaaCore/Common/AsstTypes.h index 95b8e8a6ae..ba8db11674 100644 --- a/src/MaaCore/Common/AsstTypes.h +++ b/src/MaaCore/Common/AsstTypes.h @@ -60,6 +60,7 @@ enum class TouchMode // Win32 截图方式,与 MaaFramework 的 MaaWin32ScreencapMethod 保持一致 using Win32ScreencapMethod = uint64_t; + namespace Win32Screencap { constexpr Win32ScreencapMethod None = 0ULL; @@ -73,6 +74,7 @@ constexpr Win32ScreencapMethod ScreenDC = 1ULL << 5; // Win32 输入方式,与 MaaFramework 的 MaaWin32InputMethod 保持一致 using Win32InputMethod = uint64_t; + namespace Win32Input { constexpr Win32InputMethod None = 0ULL; diff --git a/src/MaaCore/Controller/Controller.h b/src/MaaCore/Controller/Controller.h index 313b2ae398..e1b7f1ea1f 100644 --- a/src/MaaCore/Controller/Controller.h +++ b/src/MaaCore/Controller/Controller.h @@ -46,7 +46,11 @@ public: bool connect(const std::string& adb_path, const std::string& address, const std::string& config); #ifdef _WIN32 - bool attach_window(void* hwnd, Win32ScreencapMethod screencap_method, Win32InputMethod mouse_method, Win32InputMethod keyboard_method); + bool attach_window( + void* hwnd, + Win32ScreencapMethod screencap_method, + Win32InputMethod mouse_method, + Win32InputMethod keyboard_method); #endif bool inited() noexcept; void set_touch_mode(const TouchMode& mode) noexcept; diff --git a/src/MaaCore/Controller/MinitouchController.cpp b/src/MaaCore/Controller/MinitouchController.cpp index 8167b8c8f0..bc29a6da0f 100644 --- a/src/MaaCore/Controller/MinitouchController.cpp +++ b/src/MaaCore/Controller/MinitouchController.cpp @@ -192,7 +192,9 @@ bool asst::MinitouchController::swipe( return x >= 0 && x <= m_minitouch_props.max_x && y >= 0 && y <= m_minitouch_props.max_y; }; - auto move_func = [this](int x, int y) { return m_minitoucher->move(x, y); }; + auto move_func = [this](int x, int y) { + return m_minitoucher->move(x, y); + }; auto pause_check = [&opt](int cur_x, int cur_y, int start_x, int start_y) { return std::sqrt(std::pow(cur_x - start_x, 2) + std::pow(cur_y - start_y, 2)) > @@ -231,7 +233,17 @@ bool asst::MinitouchController::swipe( return result; } else { - return interpolate_swipe(_x1, _y1, _x2, _y2, _duration, TimeInterval, slope_in, slope_out, move_func, bounds_check); + return interpolate_swipe( + _x1, + _y1, + _x2, + _y2, + _duration, + TimeInterval, + slope_in, + slope_out, + move_func, + bounds_check); } }; diff --git a/src/MaaCore/Controller/PlayToolsController.cpp b/src/MaaCore/Controller/PlayToolsController.cpp index 254f0530ae..5cb8a875e0 100644 --- a/src/MaaCore/Controller/PlayToolsController.cpp +++ b/src/MaaCore/Controller/PlayToolsController.cpp @@ -154,7 +154,9 @@ bool asst::PlayToolsController::swipe( toucher_down(p1); - auto bounds_check = [width, height](int x, int y) { return x >= 0 && x <= width && y >= 0 && y <= height; }; + auto bounds_check = [width, height](int x, int y) { + return x >= 0 && x <= width && y >= 0 && y <= height; + }; auto move_func = [this](int x, int y) { toucher_move({ x, y }); @@ -162,7 +164,17 @@ bool asst::PlayToolsController::swipe( }; auto progressive_move = [&](int _x1, int _y1, int _x2, int _y2, int _duration) { - interpolate_swipe(_x1, _y1, _x2, _y2, _duration, DefaultSwipeDelay, slope_in, slope_out, move_func, bounds_check); + interpolate_swipe( + _x1, + _y1, + _x2, + _y2, + _duration, + DefaultSwipeDelay, + slope_in, + slope_out, + move_func, + bounds_check); }; const auto& opt = Config.get_options(); diff --git a/src/MaaCore/Controller/Win32ControlUnitLoader.cpp b/src/MaaCore/Controller/Win32ControlUnitLoader.cpp index 42629411e7..0b36fe5037 100644 --- a/src/MaaCore/Controller/Win32ControlUnitLoader.cpp +++ b/src/MaaCore/Controller/Win32ControlUnitLoader.cpp @@ -39,9 +39,12 @@ bool Win32ControlUnitLoader::load(const std::filesystem::path& dll_path) return false; } - m_get_version = reinterpret_cast(GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitGetVersion")); - m_create = reinterpret_cast(GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitCreate")); - m_destroy = reinterpret_cast(GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitDestroy")); + m_get_version = reinterpret_cast( + GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitGetVersion")); + m_create = + reinterpret_cast(GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitCreate")); + m_destroy = + reinterpret_cast(GetProcAddress(static_cast(m_module), "MaaWin32ControlUnitDestroy")); if (!m_create || !m_destroy) { Log.error("Failed to get function pointers from DLL");