#include <statistics_record.hpp>
Classes | |
| struct | hitrate_t |
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... | |
| typedef std::map< int, hitrate_t > | hitrate_map |
| A type that maps chance-to-hit percentage to number of hits and strikes at that CTH. More... | |
Public Member Functions | |
| stats_t () | |
| stats_t (const config &cfg) | |
| config | write () const |
| void | write (config_writer &out) const |
| void | read (const config &cfg) |
| void | merge_with (const stats_t &other) |
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_inflicted |
| Statistics of this side's attacks on its own turns. More... | |
| battle_result_map | defends_inflicted |
| Statistics of this side's attacks on enemies' turns. More... | |
| battle_result_map | attacks_taken |
| Statistics of enemies' counter attacks on this side's turns. More... | |
| battle_result_map | defends_taken |
| Statistics of enemies' attacks against this side on their turns. More... | |
| long long | damage_inflicted |
| long long | damage_taken |
| long long | turn_damage_inflicted |
| long long | turn_damage_taken |
| hitrate_map | by_cth_inflicted |
| hitrate_map | by_cth_taken |
| hitrate_map | turn_by_cth_inflicted |
| hitrate_map | turn_by_cth_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 27 of file statistics_record.hpp.
| typedef std::map<int,battle_sequence_frequency_map> statistics_record::stats_t::battle_result_map |
A type that will map different % chances to hit to different results.
Definition at line 49 of file statistics_record.hpp.
Definition at line 46 of file statistics_record.hpp.
| typedef std::map<int, hitrate_t> statistics_record::stats_t::hitrate_map |
A type that maps chance-to-hit percentage to number of hits and strikes at that CTH.
Definition at line 72 of file statistics_record.hpp.
| typedef std::map<std::string,int> statistics_record::stats_t::str_int_map |
Definition at line 38 of file statistics_record.hpp.
| statistics_record::stats_t::stats_t | ( | ) |
Definition at line 187 of file statistics_record.cpp.
|
explicit |
Definition at line 215 of file statistics_record.cpp.
| void statistics_record::stats_t::merge_with | ( | const stats_t & | other | ) |
Definition at line 390 of file statistics_record.cpp.
References advanced_to, attacks_inflicted, attacks_taken, b, by_cth_inflicted, by_cth_taken, damage_inflicted, damage_taken, DBG_NG, deaths, defends_inflicted, defends_taken, expected_damage_inflicted, expected_damage_taken, killed, statistics_record::merge_battle_result_maps(), statistics_record::merge_cth_map(), statistics_record::merge_str_int_map(), recall_cost, recalls, recruit_cost, recruits, turn_by_cth_inflicted, turn_by_cth_taken, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, and turn_expected_damage_taken.
Referenced by statistics_t::calculate_stats().
| void statistics_record::stats_t::read | ( | const config & | cfg | ) |
Definition at line 331 of file statistics_record.cpp.
References advanced_to, attacks_inflicted, attacks_taken, by_cth_inflicted, by_cth_taken, c, cfg, damage_inflicted, damage_taken, deaths, defends_inflicted, defends_taken, expected_damage_inflicted, expected_damage_taken, killed, config::optional_child(), statistics_record::read_battle_result_map(), statistics_record::read_by_cth_map(), statistics_record::read_by_cth_map_from_battle_result_maps(), statistics_record::read_str_int_map(), recall_cost, recalls, recruit_cost, recruits, save_id, turn_by_cth_inflicted, turn_by_cth_taken, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, and turn_expected_damage_taken.
Referenced by stats_t().
| config statistics_record::stats_t::write | ( | ) | const |
Definition at line 244 of file statistics_record.cpp.
References config::add_child(), advanced_to, attacks_inflicted, attacks_taken, damage_inflicted, damage_taken, deaths, defends_inflicted, defends_taken, expected_damage_inflicted, expected_damage_taken, killed, recall_cost, recalls, recruit_cost, recruits, save_id, turn_by_cth_inflicted, turn_by_cth_taken, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, turn_expected_damage_taken, statistics_record::write_battle_result_map(), statistics_record::write_by_cth_map(), and statistics_record::write_str_int_map().
| void statistics_record::stats_t::write | ( | config_writer & | out | ) | const |
Definition at line 278 of file statistics_record.cpp.
References advanced_to, attacks_inflicted, attacks_taken, config_writer::close_child(), damage_inflicted, damage_taken, deaths, defends_inflicted, defends_taken, expected_damage_inflicted, expected_damage_taken, killed, config_writer::open_child(), recall_cost, recalls, recruit_cost, recruits, save_id, turn_by_cth_inflicted, turn_by_cth_taken, turn_damage_inflicted, turn_damage_taken, turn_expected_damage_inflicted, turn_expected_damage_taken, config_writer::write(), statistics_record::write_battle_result_map(), statistics_record::write_by_cth_map(), config_writer::write_key_val(), and statistics_record::write_str_int_map().
| str_int_map statistics_record::stats_t::advanced_to |
Definition at line 39 of file statistics_record.hpp.
Referenced by merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| battle_result_map statistics_record::stats_t::attacks_inflicted |
Statistics of this side's attacks on its own turns.
Definition at line 52 of file statistics_record.hpp.
Referenced by merge_with(), read(), write(), and statistics_attack_context::~statistics_attack_context().
| battle_result_map statistics_record::stats_t::attacks_taken |
Statistics of enemies' counter attacks on this side's turns.
Definition at line 56 of file statistics_record.hpp.
Referenced by merge_with(), read(), write(), and statistics_attack_context::~statistics_attack_context().
| hitrate_map statistics_record::stats_t::by_cth_inflicted |
Definition at line 73 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), merge_with(), read(), and gui2::dialogs::statistics_dialog::update_lists().
| hitrate_map statistics_record::stats_t::by_cth_taken |
Definition at line 73 of file statistics_record.hpp.
Referenced by statistics_attack_context::defend_result(), merge_with(), read(), and gui2::dialogs::statistics_dialog::update_lists().
| long long statistics_record::stats_t::damage_inflicted |
Definition at line 60 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::damage_taken |
Definition at line 60 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| str_int_map statistics_record::stats_t::deaths |
Definition at line 39 of file statistics_record.hpp.
Referenced by statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
|
static |
Definition at line 76 of file statistics_record.hpp.
Referenced by gui2::dialogs::statistics_dialog::add_damage_row(), and statistics_attack_context::attack_expected_damage().
| battle_result_map statistics_record::stats_t::defends_inflicted |
Statistics of this side's attacks on enemies' turns.
Definition at line 54 of file statistics_record.hpp.
Referenced by merge_with(), read(), write(), and statistics_attack_context::~statistics_attack_context().
| battle_result_map statistics_record::stats_t::defends_taken |
Statistics of enemies' attacks against this side on their turns.
Definition at line 58 of file statistics_record.hpp.
Referenced by merge_with(), read(), write(), and statistics_attack_context::~statistics_attack_context().
| long long statistics_record::stats_t::expected_damage_inflicted |
Definition at line 82 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_expected_damage(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::expected_damage_taken |
Definition at line 82 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_expected_damage(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| str_int_map statistics_record::stats_t::killed |
Definition at line 39 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| int statistics_record::stats_t::recall_cost |
Definition at line 40 of file statistics_record.hpp.
Referenced by merge_with(), read(), and write().
| str_int_map statistics_record::stats_t::recalls |
Definition at line 39 of file statistics_record.hpp.
Referenced by merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| int statistics_record::stats_t::recruit_cost |
Definition at line 40 of file statistics_record.hpp.
Referenced by merge_with(), read(), and write().
| str_int_map statistics_record::stats_t::recruits |
Definition at line 39 of file statistics_record.hpp.
Referenced by merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| std::string statistics_record::stats_t::save_id |
Definition at line 84 of file statistics_record.hpp.
| hitrate_map statistics_record::stats_t::turn_by_cth_inflicted |
Definition at line 74 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| hitrate_map statistics_record::stats_t::turn_by_cth_taken |
Definition at line 74 of file statistics_record.hpp.
Referenced by statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::turn_damage_inflicted |
Definition at line 61 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::turn_damage_taken |
Definition at line 61 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_result(), statistics_attack_context::defend_result(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::turn_expected_damage_inflicted |
Definition at line 83 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_expected_damage(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().
| long long statistics_record::stats_t::turn_expected_damage_taken |
Definition at line 83 of file statistics_record.hpp.
Referenced by statistics_attack_context::attack_expected_damage(), merge_with(), read(), gui2::dialogs::statistics_dialog::update_lists(), and write().