rft: 肉鸽局内参数重构遗留 (#11829)

trader_no_longer_buy & team_full_without_rookie
This commit is contained in:
status102
2025-02-10 15:35:26 +08:00
committed by GitHub
parent 888a39837d
commit aa4bd03e38
5 changed files with 12 additions and 24 deletions

View File

@@ -108,9 +108,7 @@ void asst::RoguelikeConfig::clear()
m_status.opers.reserve(m_status.formation_upper_limit);
// ------------------ 通用参数 ------------------
m_trader_no_longer_buy = false;
m_core_char = std::string();
m_squad = std::string();
m_team_full_without_rookie = false;
}

View File

@@ -57,6 +57,12 @@ public:
std::unordered_map<std::string, RoguelikeOper> opers; // 干员精英&等级
std::vector<std::string> collections; // 已获得的藏品
// ------------------ 招募 ------------------
bool team_full_without_rookie = false; // 编队内没有预备干员(晋升优先级<200
// ------------------ 商店 ------------------
bool trader_no_longer_buy = false; // 不再购买藏品
// ------------------ 萨米 ------------------
int chaos = 0; // 抗干扰指数
std::vector<std::string> foldartal_list; // 所有已获得密文板
@@ -163,15 +169,7 @@ private:
// 以下为局内数据,每次重置
// ================================================================================
public:
// ------------------ 招募 ------------------
void set_team_full_without_rookie(bool value) { m_team_full_without_rookie = value; }
bool get_team_full_without_rookie() const { return m_team_full_without_rookie; }
// ------------------ 商店 ------------------
void set_trader_no_longer_buy(bool value) { m_trader_no_longer_buy = value; }
bool get_trader_no_longer_buy() const { return m_trader_no_longer_buy; }
auto& status() { return m_status; }
// ------------------ 开局 ------------------
void set_core_char(std::string core_char) { m_core_char = std::move(core_char); }
@@ -186,17 +184,9 @@ public:
bool get_use_nonfriend_support() const { return m_use_nonfriend_support; }
auto& status() { return m_status; }
private:
RoguelikeStatus m_status; // 局内状态
// ------------------ 招募 ------------------
bool m_team_full_without_rookie = false; // 编队内没有预备干员(晋升优先级<200
// ------------------ 商店 ------------------
bool m_trader_no_longer_buy = false; // 不再购买藏品
// ------------------ 开局 ------------------
std::string m_core_char; // 开局干员名
bool m_use_support = false; // 开局干员是否为助战干员

View File

@@ -98,7 +98,7 @@ bool asst::RoguelikeRecruitTaskPlugin::_run()
}
}
bool team_full_without_rookie = m_config->get_team_full_without_rookie();
bool team_full_without_rookie = m_config->status().team_full_without_rookie;
// Log.info("team_full_without_rookie", team_full_without_rookie);
// 编队信息 (已有角色)

View File

@@ -54,7 +54,7 @@ bool asst::RoguelikeShoppingTaskPlugin::buy_once()
return false;
}
bool no_longer_buy = m_config->get_trader_no_longer_buy();
bool no_longer_buy = m_config->status().trader_no_longer_buy;
std::unordered_map<battle::Role, size_t> map_roles_count;
std::unordered_map<battle::Role, size_t> map_wait_promotion;
@@ -192,7 +192,7 @@ bool asst::RoguelikeShoppingTaskPlugin::buy_once()
// 把goods.name存到已获得藏品里
m_config->status().collections.emplace_back(goods.name);
if (goods.no_longer_buy) {
m_config->set_trader_no_longer_buy(true);
m_config->status().trader_no_longer_buy = true;
}
break;
}

View File

@@ -77,11 +77,11 @@ bool asst::RoguelikeSkillSelectionTaskPlugin::_run()
if (analyzer.get_team_full() && !has_rookie) {
Log.info("Team full and no rookie");
m_config->set_team_full_without_rookie(true);
m_config->status().team_full_without_rookie = true;
}
else {
Log.info("Team not full or has rookie");
m_config->set_team_full_without_rookie(false);
m_config->status().team_full_without_rookie = false;
}
return true;
}