mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
perf: 优化 DEBUG_skill_ready 判断
This commit is contained in:
@@ -745,10 +745,13 @@ bool asst::BattleHelper::use_all_ready_skill(const cv::Mat& reusable)
|
||||
// 识别到了,但点进去发现没有。一般来说是识别错了
|
||||
if (!use_skill(loc, false)) {
|
||||
Log.warn("Skill", name, "is not ready");
|
||||
constexpr int MaxRetry = 3;
|
||||
if (++retry >= MaxRetry) {
|
||||
Log.warn("Do not use skill anymore", name);
|
||||
usage = SkillUsage::NotUse;
|
||||
static const bool save_infinitely = std::filesystem::exists("DEBUG_skill_ready.txt");
|
||||
if (!save_infinitely) {
|
||||
constexpr int MaxRetry = 3;
|
||||
if (++retry >= MaxRetry) {
|
||||
Log.warn("Do not use skill anymore", name);
|
||||
usage = SkillUsage::NotUse;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ BattlefieldClassifier::SkillReadyResult BattlefieldClassifier::skill_ready_analy
|
||||
.base_point = m_base_point,
|
||||
};
|
||||
|
||||
const bool save_infinitely = std::filesystem::exists("DEBUG_skill_ready.txt");
|
||||
static const bool save_infinitely = std::filesystem::exists("DEBUG_skill_ready.txt");
|
||||
|
||||
// 为重新训练模型截图
|
||||
struct point_state
|
||||
|
||||
Reference in New Issue
Block a user