mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
perf: 肉鸽难度在首次进入后,仅在通关后才再次尝试调整
This commit is contained in:
@@ -37,8 +37,11 @@ bool asst::RoguelikeDifficultySelectionTaskPlugin::verify(AsstMsg msg, const jso
|
||||
if (task_view.starts_with(roguelike_name)) {
|
||||
task_view.remove_prefix(roguelike_name.length());
|
||||
}
|
||||
if (task_view.ends_with("Roguelike@GamePass")) {
|
||||
m_has_changed = false;
|
||||
}
|
||||
if (task_view == "Roguelike@StartExplore") {
|
||||
return true;
|
||||
return !m_has_changed;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@@ -59,6 +62,7 @@ bool asst::RoguelikeDifficultySelectionTaskPlugin::_run()
|
||||
// 仅在插件记录的当前难度与目标难度不一致时重新选择难度
|
||||
select_difficulty(difficulty);
|
||||
|
||||
m_has_changed = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,5 +19,6 @@ private:
|
||||
bool select_difficulty(const int difficulty = 0);
|
||||
|
||||
int m_current_difficulty = -1;
|
||||
mutable bool m_has_changed = false;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user