fix: 修复保全的一些bug

This commit is contained in:
MistEO
2023-01-02 03:44:09 +08:00
parent f3714a000f
commit aa1f39bbfb
3 changed files with 13 additions and 3 deletions

View File

@@ -87,6 +87,9 @@
],
"draw_as_possible": true,
"actions": [
{
"type": "二倍速"
},
{
"name": "桃金娘",
"location": [

View File

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

View File

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