From 006f2f373d996674e24be053bceb51c7ba7a7de4 Mon Sep 17 00:00:00 2001 From: Dongw Date: Sat, 14 Oct 2023 23:51:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=87=E8=B1=A1=E8=99=9A=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UniversalMirageCostingTimeSwirlPasses.png | Bin 0 -> 2683 bytes .../pipeline/combat/universal_mirage.json | 96 ++- .../universal_mirage_combat_generic.json | 732 ++++++++++++++++++ source/cli/main.cpp | 36 +- source/cli/main.h | 2 + 5 files changed, 854 insertions(+), 12 deletions(-) create mode 100644 assets/resource/image/Combat/UniversalMirage/UniversalMirageCostingTimeSwirlPasses.png create mode 100644 assets/resource/pipeline/combat/universal_mirage_combat_generic.json diff --git a/assets/resource/image/Combat/UniversalMirage/UniversalMirageCostingTimeSwirlPasses.png b/assets/resource/image/Combat/UniversalMirage/UniversalMirageCostingTimeSwirlPasses.png new file mode 100644 index 0000000000000000000000000000000000000000..89abb319728d4e927eefdb554d303c181e2f109a GIT binary patch literal 2683 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 literal 0 HcmV?d00001 diff --git a/assets/resource/pipeline/combat/universal_mirage.json b/assets/resource/pipeline/combat/universal_mirage.json index 68bf581..e000d94 100644 --- a/assets/resource/pipeline/combat/universal_mirage.json +++ b/assets/resource/pipeline/combat/universal_mirage.json @@ -69,21 +69,36 @@ "is_sub": true, "action": "Swipe", "begin": [ - 305, 87, 200, 45 + 400, + 100, + 80, + 50 + ], "end": [ - 305, 613, 200, 45 - ] + 400, + 600, + 80, + 50 + ], + "duration": 500 }, "Sub_UniversalMirageStageSwipeBottom": { "is_sub": true, "action": "Swipe", "begin": [ - 305, 613, 200, 45 + 400, + 600, + 80, + 50 ], "end": [ - 305, 87, 200, 45 - ] + 400, + 100, + 80, + 50 + ], + "duration": 500 }, "SelectUniversalMirageStageF2": { "recognition": "OCR", @@ -125,8 +140,9 @@ 139 ], "next": [ + "UniversalMirageNoneInviteOfMirage", "UniversalMirageStageNoneValkyrja", - "Sub_UniversalMirageStageStart", + "UniversalMirageStageF2Start", "Sub_UniversalMirageStagePrepare", "Sub_UniversalMirageStageFightAlone" ] @@ -141,8 +157,9 @@ 139 ], "next": [ + "UniversalMirageNoneInviteOfMirage", "UniversalMirageStageNoneValkyrja", - "Sub_UniversalMirageStageStart", + "UniversalMirageStageF5Start", "Sub_UniversalMirageStagePrepare", "Sub_UniversalMirageStageFightAlone" ] @@ -171,8 +188,7 @@ ], "action": "Click" }, - "Sub_UniversalMirageStageStart": { - "is_sub": true, + "UniversalMirageStageF2Start": { "recognition": "TemplateMatch", "template": "Combat/UniversalMirage/UniversalMirageStageStart.png", "roi": [ @@ -181,7 +197,33 @@ 190, 131 ], - "action": "Click" + "next": [ + "UniversalMirageCombatGeneric" + ] + }, + "UniversalMirageStageF5Start": { + "recognition": "TemplateMatch", + "template": "Combat/UniversalMirage/UniversalMirageStageStart.png", + "roi": [ + 1025, + 589, + 190, + 131 + ], + "next": [ + "Stop" + ] + }, + "UniversalMirageNoneInviteOfMirage": { + "recognition": "OCR", + "text": "虚境挑战书不足", + "roi": [ + 362, + 287, + 557, + 140 + ], + "next": "Stop" }, "UniversalMirageStageNoneValkyrja": { "recognition": "TemplateMatch", @@ -193,5 +235,37 @@ 132 ], "next": "Stop" + }, + "UniversalMirageCombatFinish": { + "recognition": "OCR", + "text": "战斗耗时", + "roi": [ + 738, + 360, + 220, + 140 + ], + "action": "Click", + "post_delay": 1000, + "next": [ + "UniversalMirageCostingTimeSwirlPasses", + "UniversalMirageCombatFinish" + ] + }, + "UniversalMirageCostingTimeSwirlPasses": { + "recognition": "TemplateMatch", + "template": "Combat/UniversalMirage/UniversalMirageCostingTimeSwirlPasses.png", + "roi": [ + 714, + 552, + 147, + 141 + ], + "action": "Click", + "next": [ + "UniversalMirageCostingTimeSwirlPasses", + "Sub_CloseDialogBox", + "Stop" + ] } } \ No newline at end of file diff --git a/assets/resource/pipeline/combat/universal_mirage_combat_generic.json b/assets/resource/pipeline/combat/universal_mirage_combat_generic.json new file mode 100644 index 0000000..c5eed88 --- /dev/null +++ b/assets/resource/pipeline/combat/universal_mirage_combat_generic.json @@ -0,0 +1,732 @@ +{ + "$schema": "../../pipeline.schema.json", + "UniversalMirageCombatGeneric": { + "recognition": "TemplateMatch", + "template": "Combat/UniversalMirage/UniversalMirageStageStart.png", + "roi": [ + 1025, + 589, + 190, + 131 + ], + "next": [ + "UniversalMirageCombatGenericStart" + ] + }, + "UniversalMirageCombatGenericStart": { + "recognition": "TemplateMatch", + "template": "Combat/UniversalMirage/UniversalMirageStageStart.png", + "roi": [ + 1025, + 589, + 190, + 131 + ], + "action": "Click", + "next": [ + "UniversalMirageCombatGenericPreheat" + ] + }, + "UniversalMirageCombatGenericPreheat": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 500, + "post_delay": 1500, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_001" + ] + }, + "UniversalMirageCombatGeneric_001": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Backward", + "pre_delay": 0, + "post_delay": 50, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_002" + ] + }, + "UniversalMirageCombatGeneric_002": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Forward", + "pre_delay": 0, + "post_delay": 50, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_003" + ] + }, + "UniversalMirageCombatGeneric_003": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Left", + "pre_delay": 0, + "post_delay": 50, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_004" + ] + }, + "UniversalMirageCombatGeneric_004": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Right", + "pre_delay": 0, + "post_delay": 50, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_005" + ] + }, + "UniversalMirageCombatGeneric_005": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Evade", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_006" + ] + }, + "UniversalMirageCombatGeneric_006": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_007" + ] + }, + "UniversalMirageCombatGeneric_007": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_008" + ] + }, + "UniversalMirageCombatGeneric_008": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_009" + ] + }, + "UniversalMirageCombatGeneric_009": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_010" + ] + }, + "UniversalMirageCombatGeneric_010": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_011" + ] + }, + "UniversalMirageCombatGeneric_011": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATKCharge", + "pre_delay": 0, + "post_delay": 100, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_012" + ] + }, + "UniversalMirageCombatGeneric_012": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Evade", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_013" + ] + }, + "UniversalMirageCombatGeneric_013": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_014" + ] + }, + "UniversalMirageCombatGeneric_014": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "WeaponSkill", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_015" + ] + }, + "UniversalMirageCombatGeneric_015": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_016" + ] + }, + "UniversalMirageCombatGeneric_016": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_017" + ] + }, + "UniversalMirageCombatGeneric_017": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_018" + ] + }, + "UniversalMirageCombatGeneric_018": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_019" + ] + }, + "UniversalMirageCombatGeneric_019": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_020" + ] + }, + "UniversalMirageCombatGeneric_020": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATKCharge", + "pre_delay": 0, + "post_delay": 100, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_021" + ] + }, + "UniversalMirageCombatGeneric_021": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_022" + ] + }, + "UniversalMirageCombatGeneric_022": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Ultimate", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_023" + ] + }, + "UniversalMirageCombatGeneric_023": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_024" + ] + }, + "UniversalMirageCombatGeneric_024": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "ExtraSkill", + "pre_delay": 0, + "post_delay": 100, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_025" + ] + }, + "UniversalMirageCombatGeneric_025": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_026" + ] + }, + "UniversalMirageCombatGeneric_026": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Evade", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_027" + ] + }, + "UniversalMirageCombatGeneric_027": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_028" + ] + }, + "UniversalMirageCombatGeneric_028": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "ELFSkill", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_029" + ] + }, + "UniversalMirageCombatGeneric_029": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_030" + ] + }, + "UniversalMirageCombatGeneric_030": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "UltimateCharge", + "pre_delay": 0, + "post_delay": 100, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_031" + ] + }, + "UniversalMirageCombatGeneric_031": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_032" + ] + }, + "UniversalMirageCombatGeneric_032": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_033" + ] + }, + "UniversalMirageCombatGeneric_033": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_034" + ] + }, + "UniversalMirageCombatGeneric_034": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_035" + ] + }, + "UniversalMirageCombatGeneric_035": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_036" + ] + }, + "UniversalMirageCombatGeneric_036": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATKCharge", + "pre_delay": 0, + "post_delay": 100, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_037" + ] + }, + "UniversalMirageCombatGeneric_037": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "Evade", + "pre_delay": 0, + "post_delay": 150, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_038" + ] + }, + "UniversalMirageCombatGeneric_038": { + "recognition": "TemplateMatch", + "template": "Combat/StopCombat.png", + "roi": [ + 0, + 0, + 136, + 140 + ], + "action": "Custom", + "custom_action": "BasicATK", + "pre_delay": 0, + "post_delay": 200, + "next": [ + "UniversalMirageCombatFinish", + "UniversalMirageCombatGeneric_003" + ] + } +} \ No newline at end of file diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 18fc207..08932f7 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -229,6 +229,35 @@ MaaSize get_device_index(const MaaSize& device_size) } json::value dorm_param() +{ + json::value param; + auto& diff = param["diff_task"]; + auto& glacial_fences_doc = diff["Sub_EnterGlacialFencesPage"]["doc"]; + auto& glacial_fences_enabled = diff["Sub_EnterGlacialFencesPage"]["enabled"]; + auto& illuminated_land_doc = diff["Sub_EnterIlluminatedLandPage"]["doc"]; + auto& illuminated_land_enabled = diff["Sub_EnterIlluminatedLandPage"]["enabled"]; + auto& roaring_palace_doc = diff["Sub_EnterRoaringPalacePage"]["doc"]; + auto& roaring_palace_enabled = diff["Sub_EnterRoaringPalacePage"]["enabled"]; + auto& blade_grave_doc = diff["Sub_EnterBladeGravePage"]["doc"]; + auto& blade_grave_enabled = diff["Sub_EnterBladeGravePage"]["enabled"]; + auto& stage_f2_doc = diff["UniversalMirageStageF2"]["doc"]; + auto& stage_f2_enabled = diff["UniversalMirageStageF2"]["enabled"]; + + glacial_fences_doc = "幽寒之槛"; + glacial_fences_enabled = true; + illuminated_land_doc = "煌然之地"; + illuminated_land_enabled = false; + roaring_palace_doc = "轰鸣之殿"; + roaring_palace_enabled = false; + blade_grave_doc = "千刃之冢"; + blade_grave_enabled = false; + stage_f2_doc = "第二层"; + stage_f2_enabled = true; + + return param; +} + +json::value universal_mirage_param() { json::value param; auto& diff = param["diff_task"]; @@ -327,6 +356,7 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string " 3. Armada\n" " 4. Shop\n" " 5. Awards\n" + " 6. UniversalMirage" << std::endl << "Please enter the task numbers to be executed: " << std::endl; @@ -361,6 +391,10 @@ bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string case 5: task_obj.type = "Awards"; break; + case 6: + task_obj.type = "UniversalMirage"; + task_obj.param = universal_mirage_param(); + break; default: std::cout << "Unknown task: " << id << std::endl; @@ -419,7 +453,7 @@ void save_config(const std::string& adb, const std::string& adb_address, const i } config["tasks"] = std::move(tasks_array); - config["tasks_Doc"] = "要执行的任务 Homeland, MaterialEvent, Armada, Shop, Awards"; + config["tasks_Doc"] = "要执行的任务 Homeland, MaterialEvent, Armada, Shop, Awards, UniversalMirage"; json::value after_task; after_task["enabled"] = false; diff --git a/source/cli/main.h b/source/cli/main.h index 7bf0a22..2586236 100644 --- a/source/cli/main.h +++ b/source/cli/main.h @@ -36,6 +36,8 @@ MaaSize scanning_devices(); json::value dorm_param(); +json::value universal_mirage_param(); + json::value end_to_do_param(); bool proc_argv(int argc, char** argv, bool& debug, std::string& adb, std::string& adb_address, int& client_type,