116 void read(
const config& cfg,
bool append =
false);
Class for writing a config out to a file in pieces.
A config object defines a single node in a WML file, with access to child nodes.
std::map< std::string, stats_t > team_stats_t
std::ostream & operator<<(std::ostream &outstream, const statistics_record::stats_t::hitrate_t &by_cth)
std::vector< scenario_stats_t > master_record
campaign_stats_t()=default
void new_scenario(const std::string &scenario_name)
Adds an entry for anew scenario to wrte to.
campaign_stats_t(const config &cfg)
void read(const config &cfg, bool append=false)
void clear_current_scenario()
Delete the current scenario from the stats.
void write(config_writer &out) const
std::string scenario_name
scenario_stats_t(const std::string &name)
void merge_with(const stats_t &other)
long long turn_damage_taken
long long turn_expected_damage_taken
battle_result_map attacks_inflicted
Statistics of this side's attacks on its own turns.
battle_result_map defends_inflicted
Statistics of this side's attacks on enemies' turns.
hitrate_map by_cth_inflicted
std::map< int, battle_sequence_frequency_map > battle_result_map
A type that will map different % chances to hit to different results.
hitrate_map turn_by_cth_inflicted
void read(const config &cfg)
str_int_map battle_sequence_frequency_map
std::map< int, hitrate_t > hitrate_map
A type that maps chance-to-hit percentage to number of hits and strikes at that CTH.
long long turn_damage_inflicted
std::map< std::string, int > str_int_map
static const int decimal_shift
battle_result_map attacks_taken
Statistics of enemies' counter attacks on this side's turns.
long long turn_expected_damage_inflicted
hitrate_map turn_by_cth_taken
long long expected_damage_inflicted
long long expected_damage_taken
battle_result_map defends_taken
Statistics of enemies' attacks against this side on their turns.
long long damage_inflicted