feat: 悖论模拟战斗列表支持跳过未拥有的干员

This commit is contained in:
uye
2025-08-30 09:52:12 +08:00
parent ae9b7b538f
commit 4ff7bf2bb8
2 changed files with 20 additions and 13 deletions

View File

@@ -36,10 +36,9 @@ bool asst::ParadoxRecognitionTask::_run()
}
}
return_initial_oper(); // 回干员列表(默认在最左侧)折叠filter切换sort
return_initial_oper(); // 回干员列表(默认在最左侧)
bool result = swipe_and_analyze();
if (result) {
if (bool result = swipe_and_analyze()) {
enter_paradox(m_skill_num);
}
@@ -69,17 +68,25 @@ void asst::ParadoxRecognitionTask::swipe_page()
ProcessTask(*this, { "OperBoxSlowlySwipeToTheRight" }).run();
}
void asst::ParadoxRecognitionTask::return_initial_oper()
void asst::ParadoxRecognitionTask::return_initial_oper() const
{
if (ProcessTask(*this, { "ParadoxReturnOperListFlag" }).set_ignore_error(true).set_retry_times(0).run()) {
return;
if (!ProcessTask(*this, { "ParadoxReturnOperListFlag" }).set_retry_times(0).run()) {
ProcessTask(*this, { "ParadoxReturnUntilOperList" }).run();
}
ProcessTask(*this, { "ParadoxReturnUntilOperList" }).run(); // 回到干员列表
ProcessTask(*this, { "OperBoxRoleTabSelect" })
.set_ignore_error(true)
.set_retry_times(0)
.run(); // 折叠filter切换sort
ProcessTask(*this, { "BattleQuickFormationExpandRole" }).set_retry_times(3).run();
ProcessTask(*this, { "BattleQuickFormationRole-All", "BattleQuickFormationRole-All-OCR" }).run();
ProcessTask(
*this,
{ "BattleQuickFormationRole-Pioneer",
"BattleQuickFormationRole-Warrior",
"BattleQuickFormationRole-Tank",
"BattleQuickFormationRole-Caster",
"BattleQuickFormationRole-Medic",
"BattleQuickFormationRole-Sniper",
"BattleQuickFormationRole-Special",
"BattleQuickFormationRole-Support" })
.run();
ProcessTask(*this, { "BattleQuickFormationRole-All", "BattleQuickFormationRole-All-OCR" }).run();
}
bool asst::ParadoxRecognitionTask::swipe_and_analyze()

View File

@@ -16,7 +16,7 @@ public:
private:
virtual bool _run() override;
void swipe_page(); // 翻页
void return_initial_oper(); // 回到最左侧的干员
void return_initial_oper() const; // 回到最左侧的干员
bool swipe_and_analyze(); // 找干员
bool match_oper(const std::string& oper_name); // oper_name 和 m_navigate_name 匹配
std::string standardize_name(const std::string& navigate_name);