The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
statistics::stats Struct Reference

#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
 

Detailed Description

Definition at line 29 of file statistics.hpp.

Member Typedef Documentation

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.

Definition at line 38 of file statistics.hpp.

Constructor & Destructor Documentation

statistics::stats::stats ( )

Definition at line 214 of file statistics.cpp.

statistics::stats::stats ( const config cfg)
explicit

Definition at line 235 of file statistics.cpp.

References read().

Member Function Documentation

void statistics::stats::read ( const config cfg)
config statistics::stats::write ( ) const
void statistics::stats::write ( config_writer out) const

Member Data Documentation

str_int_map statistics::stats::advanced_to
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
long long statistics::stats::damage_taken
str_int_map statistics::stats::deaths
const int statistics::stats::decimal_shift = 1000
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
long long statistics::stats::expected_damage_taken
str_int_map statistics::stats::killed
int statistics::stats::recall_cost
str_int_map statistics::stats::recalls
int statistics::stats::recruit_cost
str_int_map statistics::stats::recruits
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
long long statistics::stats::turn_damage_taken
long long statistics::stats::turn_expected_damage_inflicted
long long statistics::stats::turn_expected_damage_taken

The documentation for this struct was generated from the following files: