#include <statistics.hpp>
Public Types | |
typedef std::map< std::string, int > | str_int_map |
typedef str_int_map | battle_sequence_frequency_map |
typedef std::map< int, battle_sequence_frequency_map > | battle_result_map |
A type that will map different % chances to hit to different results. More... | |
Public Member Functions | |
stats () | |
stats (const config &cfg) | |
config | write () const |
void | write (config_writer &out) const |
void | read (const config &cfg) |
Public Attributes | |
str_int_map | recruits |
str_int_map | recalls |
str_int_map | advanced_to |
str_int_map | deaths |
str_int_map | killed |
int | recruit_cost |
int | recall_cost |
battle_result_map | attacks |
battle_result_map | defends |
long long | damage_inflicted |
long long | damage_taken |
long long | turn_damage_inflicted |
long long | turn_damage_taken |
long long | expected_damage_inflicted |
long long | expected_damage_taken |
long long | turn_expected_damage_inflicted |
long long | turn_expected_damage_taken |
std::string | save_id |
Static Public Attributes | |
static const int | decimal_shift = 1000 |
Definition at line 29 of file statistics.hpp.
typedef std::map<int,battle_sequence_frequency_map> statistics::stats::battle_result_map |
A type that will map different % chances to hit to different results.
Definition at line 49 of file statistics.hpp.
Definition at line 46 of file statistics.hpp.
typedef std::map<std::string,int> statistics::stats::str_int_map |
Definition at line 38 of file statistics.hpp.
statistics::stats::stats | ( | ) |
Definition at line 214 of file statistics.cpp.
|
explicit |
Definition at line 235 of file statistics.cpp.
References read().
Definition at line 327 of file statistics.cpp.
References advanced_to, attacks, config::child(), damage_inflicted, damage_taken, deaths, defends, expected_damage_inflicted, expected_damage_taken, killed, read_battle_result_map(), read_str_int_map(), recall_cost, recalls, recruit_cost, recruits, save_id, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, and turn_expected_damage_taken.
Referenced by stats().
config statistics::stats::write | ( | ) | const |
Definition at line 258 of file statistics.cpp.
References config::add_child(), advanced_to, attacks, damage_inflicted, damage_taken, deaths, defends, expected_damage_inflicted, expected_damage_taken, killed, recall_cost, recalls, recruit_cost, recruits, save_id, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, turn_expected_damage_taken, write_battle_result_map(), and write_str_int_map().
void statistics::stats::write | ( | config_writer & | out | ) | const |
Definition at line 287 of file statistics.cpp.
References advanced_to, attacks, config_writer::close_child(), damage_inflicted, damage_taken, deaths, defends, expected_damage_inflicted, expected_damage_taken, killed, config_writer::open_child(), recall_cost, recalls, recruit_cost, recruits, save_id, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, turn_expected_damage_taken, write_battle_result_map(), config_writer::write_key_val(), and write_str_int_map().
str_int_map statistics::stats::advanced_to |
Definition at line 39 of file statistics.hpp.
Referenced by statistics::advance_unit(), statistics_dialog::display_stats(), read(), and write().
battle_result_map statistics::stats::attacks |
Definition at line 51 of file statistics.hpp.
Referenced by read(), write(), and statistics::attack_context::~attack_context().
long long statistics::stats::damage_inflicted |
Definition at line 53 of file statistics.hpp.
Referenced by statistics::attack_context::attack_result(), statistics::attack_context::defend_result(), statistics_dialog::display_stats(), read(), and write().
long long statistics::stats::damage_taken |
Definition at line 53 of file statistics.hpp.
Referenced by statistics::attack_context::attack_result(), statistics::attack_context::defend_result(), statistics_dialog::display_stats(), read(), and write().
str_int_map statistics::stats::deaths |
Definition at line 39 of file statistics.hpp.
Referenced by statistics::attack_context::defend_result(), statistics_dialog::display_stats(), read(), and write().
|
static |
Definition at line 56 of file statistics.hpp.
Referenced by statistics::attack_context::attack_expected_damage().
battle_result_map statistics::stats::defends |
Definition at line 51 of file statistics.hpp.
Referenced by read(), write(), and statistics::attack_context::~attack_context().
long long statistics::stats::expected_damage_inflicted |
Definition at line 62 of file statistics.hpp.
Referenced by statistics::attack_context::attack_expected_damage(), statistics_dialog::display_stats(), read(), and write().
long long statistics::stats::expected_damage_taken |
Definition at line 62 of file statistics.hpp.
Referenced by statistics::attack_context::attack_expected_damage(), statistics_dialog::display_stats(), read(), and write().
str_int_map statistics::stats::killed |
Definition at line 39 of file statistics.hpp.
Referenced by statistics::attack_context::attack_result(), statistics_dialog::display_stats(), read(), and write().
int statistics::stats::recall_cost |
Definition at line 40 of file statistics.hpp.
Referenced by statistics_dialog::display_stats(), read(), statistics::recall_unit(), statistics::un_recall_unit(), and write().
str_int_map statistics::stats::recalls |
Definition at line 39 of file statistics.hpp.
Referenced by statistics_dialog::display_stats(), read(), statistics::recall_unit(), statistics::un_recall_unit(), statistics::un_recall_unit_cost(), and write().
int statistics::stats::recruit_cost |
Definition at line 40 of file statistics.hpp.
Referenced by statistics_dialog::display_stats(), read(), statistics::recruit_unit(), statistics::un_recruit_unit(), and write().
str_int_map statistics::stats::recruits |
Definition at line 39 of file statistics.hpp.
Referenced by statistics_dialog::display_stats(), read(), statistics::recruit_unit(), statistics::un_recruit_unit(), and write().
std::string statistics::stats::save_id |
Definition at line 64 of file statistics.hpp.
Referenced by read(), statistics::reset_turn_stats(), and write().
long long statistics::stats::turn_damage_inflicted |
Definition at line 54 of file statistics.hpp.
Referenced by statistics::attack_context::attack_result(), statistics::attack_context::defend_result(), statistics_dialog::display_stats(), read(), statistics::reset_turn_stats(), and write().
long long statistics::stats::turn_damage_taken |
Definition at line 54 of file statistics.hpp.
Referenced by statistics::attack_context::attack_result(), statistics::attack_context::defend_result(), statistics_dialog::display_stats(), read(), statistics::reset_turn_stats(), and write().
long long statistics::stats::turn_expected_damage_inflicted |
Definition at line 63 of file statistics.hpp.
Referenced by statistics::attack_context::attack_expected_damage(), statistics_dialog::display_stats(), read(), statistics::reset_turn_stats(), and write().
long long statistics::stats::turn_expected_damage_taken |
Definition at line 63 of file statistics.hpp.
Referenced by statistics::attack_context::attack_expected_damage(), statistics_dialog::display_stats(), read(), statistics::reset_turn_stats(), and write().