fix: 修复肉鸽道中抓取干员 山 或 林 后重复开启技能的问题 (#6221)

This commit is contained in:
MistEO
2023-09-05 20:07:41 +08:00
committed by GitHub
3 changed files with 7 additions and 14 deletions

View File

@@ -45,8 +45,6 @@ namespace asst
static inline const std::string RoguelikeUseSupport = "RoguelikeUseSupport";
static inline const std::string RoguelikeUseNonfriendSupport = "RoguelikeUseNonfriendSupport";
static inline const std::string RoguelikeTraderNoLongerBuy = "RoguelikeNoLongerBuy";
static inline const std::string RoguelikeSkillUsagePrefix = "RoguelikeSkillUsage-";
static inline const std::string RoguelikeSkillTimesPrefix = "RoguelikeSkillTimes-";
static inline const std::string RoguelikeTeamFullWithoutRookie = "RoguelikeTeamFullWithoutRookie";
static inline const std::string RoguelikeTheme = "RoguelikeTheme";
static inline const std::string RoguelikeRecruitmentStartsComplete = "RoguelikeRecruitmentStartsComplete";

View File

@@ -380,12 +380,10 @@ bool asst::RoguelikeBattleTaskPlugin::do_best_deploy()
return true;
}
deploy_oper(deploy_plan.oper_name, deploy_plan.placed, deploy_plan.direction);
const auto& oper_info = RoguelikeRecruit.get_oper_info(rogue_theme, deploy_plan.oper_name);
m_skill_usage[deploy_plan.oper_name] = oper_info.skill_usage;
m_skill_times[deploy_plan.oper_name] = oper_info.skill_times;
Log.trace(" best deploy is", deploy_plan.oper_name, "with rank", deploy_plan.rank);
auto skill_usage_opt = status()->get_number(Status::RoguelikeSkillUsagePrefix + deploy_plan.oper_name);
m_skill_usage[deploy_plan.oper_name] =
skill_usage_opt ? static_cast<SkillUsage>(*skill_usage_opt) : SkillUsage::Possibly;
auto skill_times_opt = status()->get_number(Status::RoguelikeSkillTimesPrefix + deploy_plan.oper_name);
m_skill_times[deploy_plan.oper_name] = skill_times_opt ? static_cast<int>(*skill_times_opt) : 1;
return true;
}
}
@@ -484,11 +482,10 @@ bool asst::RoguelikeBattleTaskPlugin::do_once()
m_first_deploy = false;
auto skill_usage_opt = status()->get_number(Status::RoguelikeSkillUsagePrefix + best_oper.name);
m_skill_usage[best_oper.name] =
skill_usage_opt ? static_cast<SkillUsage>(*skill_usage_opt) : SkillUsage::Possibly;
auto skill_times_opt = status()->get_number(Status::RoguelikeSkillTimesPrefix + best_oper.name);
m_skill_times[best_oper.name] = skill_times_opt ? static_cast<int>(*skill_times_opt) : 1;
const auto& oper_info = RoguelikeRecruit.get_oper_info(
status()->get_properties(Status::RoguelikeTheme).value(), best_oper.name);
m_skill_usage[best_oper.name] = oper_info.skill_usage;
m_skill_times[best_oper.name] = oper_info.skill_times;
if (urgent_home_opt) {
m_urgent_home_index.pop_front();

View File

@@ -68,8 +68,6 @@ bool asst::RoguelikeSkillSelectionTaskPlugin::_run()
if (oper_info.promote_priority < RookieStd) {
has_rookie = true;
}
status()->set_number(Status::RoguelikeSkillUsagePrefix + name, static_cast<int>(oper_info.skill_usage));
status()->set_number(Status::RoguelikeSkillTimesPrefix + name, static_cast<int>(oper_info.skill_times));
}
if (!status()->get_str(Status::RoguelikeCharOverview)) {