42 typedef std::vector< std::pair<const std::string *, const stats *>>
levels;
levels level_stats(const std::string &save_id)
Returns a list of names and stats for each scenario in the current campaign.
void recall_unit(const unit &u)
std::vector< std::pair< const std::string *, const stats * > > levels
Stats (and name) for each scenario.
stats & get_stats(const std::string &save_id)
returns the stats for the given side in the current scenario.
void advance_unit(const unit &u)
static int sum_cost_str_int_map(const std::map< std::string, int > &m)
statistics_t(statistics_record::campaign_stats_t &record)
static int sum_str_int_map(const std::map< std::string, int > &m)
void un_recall_unit(const unit &u)
statistics_record::campaign_stats_t & record_
void reset_turn_stats(const std::string &save_id)
stats calculate_stats(const std::string &save_id)
statistics_record::stats_t stats
void un_recruit_unit(const unit &u)
void recruit_unit(const unit &u)
This class represents a single unit of a specific type.
std::string attacker_type
int chance_to_hit_defender
void attack_result(hit_result res, int cth, int damage, int drain)
std::string defender_type
statistics_attack_context(statistics_t &stats, const unit &a, const unit &d, int a_cth, int d_cth)
int chance_to_hit_attacker
~statistics_attack_context()
std::string attacker_side
statistics_t * stats_
never nullptr
void attack_expected_damage(double attacker_inflict, double defender_inflict)
void defend_result(hit_result res, int cth, int damage, int drain)
std::string defender_side
std::vector< scenario_stats_t > master_record