mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: 修复保全的一些bug
This commit is contained in:
@@ -87,6 +87,9 @@
|
||||
],
|
||||
"draw_as_possible": true,
|
||||
"actions": [
|
||||
{
|
||||
"type": "二倍速"
|
||||
},
|
||||
{
|
||||
"name": "桃金娘",
|
||||
"location": [
|
||||
|
||||
@@ -72,6 +72,7 @@ bool asst::SSSCopilotConfig::parse(const json::value& json)
|
||||
stage_data.draw_as_possible = stage.at("draw_as_possible").as_boolean();
|
||||
|
||||
stage_data.actions = CopilotConfig::parse_actions(stage);
|
||||
stage_data.groups = m_data.groups;
|
||||
|
||||
for (const auto& strategy_info : stage.at("strategies").as_array()) {
|
||||
Strategy strategy;
|
||||
|
||||
@@ -73,8 +73,14 @@ bool asst::SSSBattleProcessTask::do_strategic_action(const cv::Mat& reusable)
|
||||
if (m_all_cores.contains(name)) {
|
||||
exist_core.emplace(name, oper);
|
||||
}
|
||||
else if (oper.available) {
|
||||
available_tool_men.emplace(oper.role, oper);
|
||||
else {
|
||||
if (oper.available) {
|
||||
available_tool_men.emplace(oper.role, oper);
|
||||
}
|
||||
if (m_skill_usage.find(name) == m_skill_usage.cend()) {
|
||||
// 工具人的技能一概好了就用
|
||||
m_skill_usage.emplace(name, SkillUsage::Possibly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +91,7 @@ bool asst::SSSBattleProcessTask::do_strategic_action(const cv::Mat& reusable)
|
||||
const auto& core = exist_core.at(strategy.core);
|
||||
if (!core.available) {
|
||||
// 直接返回,等费用,等下次循环处理部署逻辑
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
// 部署完,画面会发生变化,所以直接返回,后续逻辑交给下次循环处理
|
||||
return deploy_oper(strategy.core, strategy.location, strategy.direction);
|
||||
|
||||
Reference in New Issue
Block a user