mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 10:00:44 +08:00
fix: 无法选中 坚不可摧 与 随心所欲 分队
This commit is contained in:
@@ -60,13 +60,14 @@
|
||||
"RoguelikeCustom-HijackRoles": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [],
|
||||
"roi": [54, 356, 1172, 183]
|
||||
"roi": [54, 356, 1172, 183],
|
||||
"postDelay": 1000
|
||||
},
|
||||
"RoguelikeCustom-HijackSquad": {
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [],
|
||||
"roi": [0, 383, 1280, 142],
|
||||
"postDelay": 800,
|
||||
"postDelay": 1000,
|
||||
"ocrReplace": [["蓝图测绘分.*", "蓝图测绘分队"]]
|
||||
},
|
||||
"RoguelikeFoldartalSlowlySwipeToTheUp": {
|
||||
|
||||
@@ -134,7 +134,7 @@ bool asst::RoguelikeCustomStartTaskPlugin::hijack_squad()
|
||||
.run();
|
||||
}
|
||||
|
||||
constexpr size_t SwipeTimes = 7;
|
||||
constexpr size_t SwipeTimes = 2;
|
||||
for (size_t i = 0; i != SwipeTimes; ++i) {
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
@@ -190,19 +190,34 @@ bool asst::RoguelikeCustomStartTaskPlugin::hijack_reward()
|
||||
|
||||
bool asst::RoguelikeCustomStartTaskPlugin::hijack_roles()
|
||||
{
|
||||
auto image = ctrler()->get_image();
|
||||
OCRer analyzer(image);
|
||||
analyzer.set_task_info("RoguelikeCustom-HijackRoles");
|
||||
analyzer.set_required({ m_customs[RoguelikeCustomType::Roles] });
|
||||
constexpr size_t SwipeTimes = 2;
|
||||
const std::string& required_role = m_customs[RoguelikeCustomType::Roles];
|
||||
|
||||
if (!analyzer.analyze()) {
|
||||
return false;
|
||||
for (size_t i = 0; i != SwipeTimes; ++i) {
|
||||
if (need_exit()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto image = ctrler()->get_image();
|
||||
OCRer analyzer(image);
|
||||
analyzer.set_task_info("RoguelikeCustom-HijackRoles");
|
||||
analyzer.set_required({ required_role });
|
||||
|
||||
if (analyzer.analyze()) {
|
||||
const auto& rect = analyzer.get_result().front().rect;
|
||||
ctrler()->click(rect);
|
||||
return true;
|
||||
}
|
||||
|
||||
ProcessTask(*this, { "Roguelike@SquadSlowlySwipeToTheRight" }).run();
|
||||
sleep(Task.get("RoguelikeCustom-HijackRoles")->post_delay);
|
||||
}
|
||||
const auto& rect = analyzer.get_result().front().rect;
|
||||
ctrler()->click(rect);
|
||||
return true;
|
||||
|
||||
ProcessTask(*this, { "SwipeToTheLeft" }).run();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool asst::RoguelikeCustomStartTaskPlugin::hijack_core_char()
|
||||
{
|
||||
static const std::unordered_map<battle::Role, std::string> RoleOcrNameMap = {
|
||||
|
||||
Reference in New Issue
Block a user