perf: 肉鸽难度在首次进入后,仅在通关后才再次尝试调整

This commit is contained in:
status102
2025-08-08 15:46:00 +08:00
parent 5980ea7c16
commit 060f8b2da3
2 changed files with 6 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -19,5 +19,6 @@ private:
bool select_difficulty(const int difficulty = 0);
int m_current_difficulty = -1;
mutable bool m_has_changed = false;
};
}