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 | Private Member Functions | Private Attributes | List of all members
statistics::attack_context Struct Reference

#include <statistics.hpp>

Public Types

enum  hit_result { MISSES, HITS, KILLS }
 

Public Member Functions

 attack_context (const unit &a, const unit &d, int a_cth, int d_cth)
 
 ~attack_context ()
 
void attack_expected_damage (double attacker_inflict, double defender_inflict)
 
void attack_result (hit_result res, int damage, int drain)
 
void defend_result (hit_result res, int damage, int drain)
 

Private Member Functions

statsattacker_stats ()
 
statsdefender_stats ()
 

Private Attributes

std::string attacker_type
 
std::string defender_type
 
std::string attacker_side
 
std::string defender_side
 
int chance_to_hit_defender
 
int chance_to_hit_attacker
 
std::string attacker_res
 
std::string defender_res
 

Detailed Description

Definition at line 76 of file statistics.hpp.

Member Enumeration Documentation

Enumerator
MISSES 
HITS 
KILLS 

Definition at line 81 of file statistics.hpp.

Constructor & Destructor Documentation

statistics::attack_context::attack_context ( const unit a,
const unit d,
int  a_cth,
int  d_cth 
)

Definition at line 384 of file statistics.cpp.

statistics::attack_context::~attack_context ( )

Member Function Documentation

void statistics::attack_context::attack_expected_damage ( double  attacker_inflict,
double  defender_inflict 
)
void statistics::attack_context::attack_result ( hit_result  res,
int  damage,
int  drain 
)
stats & statistics::attack_context::attacker_stats ( )
private

Definition at line 406 of file statistics.cpp.

References attacker_side, and get_stats().

Referenced by attack_expected_damage(), attack_result(), defend_result(), and ~attack_context().

void statistics::attack_context::defend_result ( hit_result  res,
int  damage,
int  drain 
)
stats & statistics::attack_context::defender_stats ( )
private

Definition at line 411 of file statistics.cpp.

References defender_side, and get_stats().

Referenced by attack_expected_damage(), attack_result(), defend_result(), and ~attack_context().

Member Data Documentation

std::string statistics::attack_context::attacker_res
private

Definition at line 92 of file statistics.hpp.

Referenced by attack_result(), and ~attack_context().

std::string statistics::attack_context::attacker_side
private

Definition at line 90 of file statistics.hpp.

Referenced by attacker_stats().

std::string statistics::attack_context::attacker_type
private

Definition at line 89 of file statistics.hpp.

Referenced by defend_result().

int statistics::attack_context::chance_to_hit_attacker
private

Definition at line 91 of file statistics.hpp.

Referenced by ~attack_context().

int statistics::attack_context::chance_to_hit_defender
private

Definition at line 91 of file statistics.hpp.

Referenced by ~attack_context().

std::string statistics::attack_context::defender_res
private

Definition at line 92 of file statistics.hpp.

Referenced by defend_result(), and ~attack_context().

std::string statistics::attack_context::defender_side
private

Definition at line 90 of file statistics.hpp.

Referenced by defender_stats().

std::string statistics::attack_context::defender_type
private

Definition at line 89 of file statistics.hpp.

Referenced by attack_result().


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