#include <actions.hpp>
Public Member Functions | |
unit_stats (const unit &u, const gamemap::location &u_loc, int u_attack_num, bool attacking, const unit &opp, const gamemap::location &opp_loc, const attack_type *opp_weapon, const unit_map &units, const std::vector< team > &teams, const gamestatus &status, const gamemap &map) | |
~unit_stats () | |
void | dump () const |
Dumps the statistics of a unit on stdout. Remove it eventually. | |
Public Attributes | |
const attack_type * | weapon |
int | attack_num |
bool | is_attacker |
bool | is_poisoned |
bool | is_slowed |
bool | slows |
bool | drains |
bool | stones |
bool | plagues |
bool | poisons |
bool | backstab_pos |
bool | swarm |
bool | firststrike |
unsigned int | rounds |
unsigned int | hp |
unsigned int | max_hp |
unsigned int | chance_to_hit |
int | damage |
int | slow_damage |
unsigned int | num_blows |
unsigned int | swarm_min |
unsigned int | swarm_max |
std::string | plague_type |
Definition at line 69 of file actions.hpp.
battle_context::unit_stats::unit_stats | ( | const unit & | u, | |
const gamemap::location & | u_loc, | |||
int | u_attack_num, | |||
bool | attacking, | |||
const unit & | opp, | |||
const gamemap::location & | opp_loc, | |||
const attack_type * | opp_weapon, | |||
const unit_map & | units, | |||
const std::vector< team > & | teams, | |||
const gamestatus & | status, | |||
const gamemap & | map | |||
) |
Definition at line 570 of file actions.cpp.
References attack_type::accuracy(), unit::alignment(), attack_num, unit::attacks(), backstab_check(), backstab_pos, unit_ability_list::cfgs, chance_to_hit, combat_modifier(), damage, attack_type::damage(), unit::damage_from(), unit::defense_modifier(), drains, unit_ability_list::empty(), firststrike, unit_abilities::effect::get_composite_value(), attack_type::get_special_bool(), attack_type::get_specials(), unit::get_state(), gamemap::get_terrain(), unit_ability_list::highest(), unit::hitpoints(), hp, is_attacker, unit::is_fearless(), is_slowed, gamemap::is_village(), unit::max_hitpoints(), max_hp, attack_type::num_attacks(), num_blows, attack_type::parry(), plague_type, plagues, poisons, round_damage(), rounds, attack_type::set_specials_context(), slow_damage, slows, stones, utils::string_bool(), swarm, swarm_max, swarm_min, unit::type_id(), unit::undead_variation(), under_leadership(), gamemap::location::valid(), and weapon.
battle_context::unit_stats::~unit_stats | ( | ) |
Definition at line 706 of file actions.cpp.
void battle_context::unit_stats::dump | ( | ) | const |
Dumps the statistics of a unit on stdout. Remove it eventually.
Definition at line 710 of file actions.cpp.
References backstab_pos, chance_to_hit, damage, drains, firststrike, hp, is_attacker, is_poisoned, is_slowed, max_hp, num_blows, poisons, rounds, slow_damage, slows, stones, swarm, swarm_max, and swarm_min.
Referenced by combatant::fight().
Definition at line 71 of file actions.hpp.
Referenced by attack::attack(), events::mouse_handler::attack_enemy_(), attack::fire_event(), and unit_stats().
Definition at line 72 of file actions.hpp.
Referenced by events::mouse_handler::attack_enemy_(), battle_context::choose_attacker_weapon(), battle_context::choose_defender_weapon(), and unit_stats().
Definition at line 75 of file actions.hpp.
Referenced by combatant::combatant(), combatant::complex_fight(), dump(), and unit_stats().
Definition at line 76 of file actions.hpp.
Referenced by attack::attack(), combatant::complex_fight(), dump(), combatant::fight(), and unit_stats().
Definition at line 77 of file actions.hpp.
Referenced by attack::attack(), combatant::complex_fight(), dump(), combatant::fight(), combatant::hp_dist_size(), and unit_stats().
Definition at line 78 of file actions.hpp.
Referenced by attack::attack(), combatant::complex_fight(), dump(), combatant::fight(), and unit_stats().
Definition at line 80 of file actions.hpp.
Referenced by attack::attack(), dump(), and unit_stats().
Definition at line 84 of file actions.hpp.
Referenced by attack::attack(), dump(), combatant::fight(), and unit_stats().
unsigned int battle_context::unit_stats::rounds |
Definition at line 86 of file actions.hpp.
Referenced by attack::attack(), dump(), combatant::fight(), and unit_stats().
unsigned int battle_context::unit_stats::hp |
Definition at line 87 of file actions.hpp.
Referenced by combatant::adjust_hitchance(), combatant::complex_fight(), dump(), combatant::hp_dist_size(), combatant::min_hp(), combatant::no_death_fight(), combatant::one_strike_fight(), and unit_stats().
unsigned int battle_context::unit_stats::max_hp |
Definition at line 88 of file actions.hpp.
Referenced by combatant::adjust_hitchance(), combatant::average_hp(), combatant::complex_fight(), dump(), combatant::hp_dist_size(), and unit_stats().
unsigned int battle_context::unit_stats::chance_to_hit |
Definition at line 89 of file actions.hpp.
Referenced by combatant::adjust_hitchance(), attack::attack(), events::mouse_handler::attack_enemy_(), battle_context::choose_defender_weapon(), dump(), attack::refresh_bc(), and unit_stats().
Definition at line 90 of file actions.hpp.
Referenced by attack::attack(), events::mouse_handler::attack_enemy_(), battle_context::choose_defender_weapon(), combatant::complex_fight(), dump(), combatant::fight(), combatant::no_death_fight(), combatant::one_strike_fight(), attack::refresh_bc(), and unit_stats().
Definition at line 91 of file actions.hpp.
Referenced by attack::attack(), combatant::complex_fight(), dump(), and unit_stats().
unsigned int battle_context::unit_stats::num_blows |
Definition at line 92 of file actions.hpp.
Referenced by attack::attack(), events::mouse_handler::attack_enemy_(), battle_context::choose_defender_weapon(), dump(), and unit_stats().
unsigned int battle_context::unit_stats::swarm_min |
Definition at line 93 of file actions.hpp.
Referenced by combatant::adjust_hitchance(), dump(), and unit_stats().
unsigned int battle_context::unit_stats::swarm_max |
Definition at line 94 of file actions.hpp.
Referenced by combatant::adjust_hitchance(), dump(), and unit_stats().
std::string battle_context::unit_stats::plague_type |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |