#include <statistics.hpp>
Public Types | |
enum | ATTACK_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_excepted_damage (double attacker_inflict, double defender_inflict) |
void | attack_result (ATTACK_RESULT res, long long damage, long long drain) |
void | defend_result (ATTACK_RESULT res, long long damage, long long drain) |
Private Member Functions | |
stats & | attacker_stats () |
stats & | defender_stats () |
Private Attributes | |
std::string | attacker_type |
std::string | defender_type |
int | attacker_side |
int | defender_side |
int | chance_to_hit_defender |
int | chance_to_hit_attacker |
std::string | attacker_res |
std::string | defender_res |
Definition at line 85 of file statistics.hpp.
Definition at line 429 of file statistics.cpp.
statistics::attack_context::~attack_context | ( | ) |
Definition at line 436 of file statistics.cpp.
References attacker_res, attacker_stats(), statistics::stats::attacks, chance_to_hit_attacker, chance_to_hit_defender, defender_res, defender_stats(), and statistics::stats::defends.
void statistics::attack_context::attack_excepted_damage | ( | double | attacker_inflict, | |
double | defender_inflict | |||
) |
Definition at line 458 of file statistics.cpp.
References attacker_stats(), defender_stats(), statistics::stats::desimal_shift, statistics::stats::new_expected_damage_inflicted, statistics::stats::new_expected_damage_taken, statistics::stats::new_turn_expected_damage_inflicted, and statistics::stats::new_turn_expected_damage_taken.
Referenced by attack::attack().
void statistics::attack_context::attack_result | ( | attack_context::ATTACK_RESULT | res, | |
long long | damage, | |||
long long | drain | |||
) |
Definition at line 473 of file statistics.cpp.
References attacker_res, attacker_stats(), chance_to_hit_defender, statistics::stats::damage_inflicted, statistics::stats::damage_taken, statistics::stats::deaths, defender_stats(), defender_type, statistics::stats::expected_damage_inflicted, statistics::stats::expected_damage_taken, statistics::stats::killed, KILLS, MISSES, push_back(), statistics::stats::turn_damage_inflicted, statistics::stats::turn_damage_taken, statistics::stats::turn_expected_damage_inflicted, and statistics::stats::turn_expected_damage_taken.
Referenced by attack::attack().
void statistics::attack_context::defend_result | ( | attack_context::ATTACK_RESULT | res, | |
long long | damage, | |||
long long | drain | |||
) |
Definition at line 512 of file statistics.cpp.
References attacker_stats(), attacker_type, chance_to_hit_attacker, statistics::stats::damage_inflicted, statistics::stats::damage_taken, statistics::stats::deaths, defender_res, defender_stats(), statistics::stats::expected_damage_inflicted, statistics::stats::expected_damage_taken, statistics::stats::killed, KILLS, MISSES, push_back(), statistics::stats::turn_damage_inflicted, statistics::stats::turn_damage_taken, statistics::stats::turn_expected_damage_inflicted, and statistics::stats::turn_expected_damage_taken.
Referenced by attack::attack().
stats & statistics::attack_context::attacker_stats | ( | ) | [private] |
Definition at line 448 of file statistics.cpp.
References attacker_side, and get_stats().
Referenced by attack_excepted_damage(), attack_result(), defend_result(), and ~attack_context().
stats & statistics::attack_context::defender_stats | ( | ) | [private] |
Definition at line 453 of file statistics.cpp.
References defender_side, and get_stats().
Referenced by attack_excepted_damage(), attack_result(), defend_result(), and ~attack_context().
std::string statistics::attack_context::attacker_type [private] |
std::string statistics::attack_context::defender_type [private] |
int statistics::attack_context::attacker_side [private] |
int statistics::attack_context::defender_side [private] |
int statistics::attack_context::chance_to_hit_defender [private] |
Definition at line 100 of file statistics.hpp.
Referenced by attack_result(), and ~attack_context().
int statistics::attack_context::chance_to_hit_attacker [private] |
Definition at line 100 of file statistics.hpp.
Referenced by defend_result(), and ~attack_context().
std::string statistics::attack_context::attacker_res [private] |
Definition at line 101 of file statistics.hpp.
Referenced by attack_result(), and ~attack_context().
std::string statistics::attack_context::defender_res [private] |
Definition at line 101 of file statistics.hpp.
Referenced by defend_result(), and ~attack_context().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |