battle_context::unit_stats Struct Reference

Structure describing the statistics of a unit involved in the battle. More...

#include <actions.hpp>

Collaboration diagram for battle_context::unit_stats:

Collaboration graph
[legend]

List of all members.

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_typeweapon
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


Detailed Description

Structure describing the statistics of a unit involved in the battle.

Definition at line 69 of file actions.hpp.


Constructor & Destructor Documentation

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 
)

battle_context::unit_stats::~unit_stats (  ) 

Definition at line 706 of file actions.cpp.


Member Function Documentation

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().


Member Data Documentation

Definition at line 73 of file actions.hpp.

Referenced by dump(), and unit_stats().

Definition at line 74 of file actions.hpp.

Referenced by combatant::combatant(), and dump().

Definition at line 75 of file actions.hpp.

Referenced by combatant::combatant(), combatant::complex_fight(), dump(), and unit_stats().

Definition at line 79 of file actions.hpp.

Referenced by attack::attack(), and unit_stats().

Definition at line 80 of file actions.hpp.

Referenced by attack::attack(), dump(), and unit_stats().

Definition at line 81 of file actions.hpp.

Referenced by dump(), and unit_stats().

Definition at line 83 of file actions.hpp.

Referenced by dump(), and unit_stats().

Definition at line 84 of file actions.hpp.

Referenced by attack::attack(), dump(), combatant::fight(), and unit_stats().

Definition at line 86 of file actions.hpp.

Referenced by attack::attack(), dump(), combatant::fight(), and unit_stats().

Definition at line 91 of file actions.hpp.

Referenced by attack::attack(), combatant::complex_fight(), dump(), and unit_stats().

Definition at line 93 of file actions.hpp.

Referenced by combatant::adjust_hitchance(), dump(), and unit_stats().

Definition at line 94 of file actions.hpp.

Referenced by combatant::adjust_hitchance(), dump(), and unit_stats().

Definition at line 96 of file actions.hpp.

Referenced by attack::attack(), and unit_stats().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs