diff --git a/resource/tasks.json b/resource/tasks.json index 7c9b0d37b1..61566406c9 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -3515,6 +3515,14 @@ 40 ] }, + "BattleUseSkillBegin": { + "algorithm": "JustReturn", + "action": "doNothing", + "rearDelay": 1000, + "next": [ + "BattleUseSkill" + ] + }, "BattleUseSkill": { "algorithm": "OcrDetect", "text": [ @@ -3532,9 +3540,7 @@ 380, 100, 100 - ], - "preDelay": 1000, - "rearDelay": 0 + ] }, "StartToWakeUpToRoguelike1": { "template": "StartToWakeUp.png", diff --git a/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp b/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp index cc23b13a07..0f5165cc83 100644 --- a/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp +++ b/src/MeoAssistant/RoguelikeBattleTaskPlugin.cpp @@ -217,17 +217,18 @@ bool asst::RoguelikeBattleTaskPlugin::auto_battle() default: // 特种和无人机,有的只能放地面,有的又只能放高台,不好判断 // 笨办法,都试试,总有一次能成的 - { - static Loc static_loc = Loc::Melee; - loc = static_loc; - if (static_loc == Loc::Melee) { - static_loc = Loc::Ranged; - } - else { - static_loc = Loc::Melee; - } - } - break; + //{ + // static Loc static_loc = Loc::Melee; + // loc = static_loc; + // if (static_loc == Loc::Melee) { + // static_loc = Loc::Ranged; + // } + // else { + // static_loc = Loc::Melee; + // } + //} + loc = Loc::Melee; + break; } Point placed_loc = get_placed(loc); @@ -273,7 +274,7 @@ bool asst::RoguelikeBattleTaskPlugin::use_skill(const asst::Rect& rect) { Ctrler.click(rect); - ProcessTask task(*this, { "BattleUseSkill" }); + ProcessTask task(*this, { "BattleUseSkillBegin" }); task.set_retry_times(0); return task.run(); }