unit_movement_type Class Reference

#include <unit_types.hpp>

Collaboration diagram for unit_movement_type:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 unit_movement_type (const config &cfg, const unit_movement_type *parent=NULL)
 unit_movement_type ()
const t_stringname () const
int movement_cost (const gamemap &map, t_translation::t_terrain terrain, int recurse_count=0) const
int defense_modifier (const gamemap &map, t_translation::t_terrain terrain, int recurse_count=0) const
int damage_against (const attack_type &attack) const
int resistance_against (const attack_type &attack) const
string_map damage_table () const
void set_parent (const unit_movement_type *parent)
bool is_flying () const
const std::map
< t_translation::t_terrain,
int > & 
movement_costs () const
const std::map
< t_translation::t_terrain,
int > & 
defense_mods () const
const configget_cfg () const
const unit_movement_typeget_parent () const

Private Attributes

std::map
< t_translation::t_terrain,
int > 
moveCosts_
std::map
< t_translation::t_terrain,
int > 
defenseMods_
const unit_movement_typeparent_
config cfg_


Detailed Description

Definition at line 114 of file unit_types.hpp.


Constructor & Destructor Documentation

unit_movement_type::unit_movement_type ( const config cfg,
const unit_movement_type parent = NULL 
)

unit_movement_type::unit_movement_type (  ) 

Definition at line 310 of file unit_types.cpp.


Member Function Documentation

const t_string & unit_movement_type::name (  )  const

int unit_movement_type::movement_cost ( const gamemap map,
t_translation::t_terrain  terrain,
int  recurse_count = 0 
) const

int unit_movement_type::defense_modifier ( const gamemap map,
t_translation::t_terrain  terrain,
int  recurse_count = 0 
) const

int unit_movement_type::damage_against ( const attack_type attack  )  const [inline]

Definition at line 125 of file unit_types.hpp.

References resistance_against().

int unit_movement_type::resistance_against ( const attack_type attack  )  const

string_map unit_movement_type::damage_table (  )  const

void unit_movement_type::set_parent ( const unit_movement_type parent  )  [inline]

Definition at line 130 of file unit_types.hpp.

References parent_.

Referenced by unit_type::build_full().

bool unit_movement_type::is_flying (  )  const

Definition at line 515 of file unit_types.cpp.

References cfg_, is_flying(), parent_, and utils::string_bool().

Referenced by unit::advance_to(), and is_flying().

const std::map<t_translation::t_terrain, int>& unit_movement_type::movement_costs (  )  const [inline]

Definition at line 133 of file unit_types.hpp.

References moveCosts_.

Referenced by movement_cost(), and unit_movement_type().

const std::map<t_translation::t_terrain, int>& unit_movement_type::defense_mods (  )  const [inline]

Definition at line 134 of file unit_types.hpp.

References defenseMods_.

const config& unit_movement_type::get_cfg (  )  const [inline]

Definition at line 136 of file unit_types.hpp.

References cfg_.

Referenced by unit::advance_to().

const unit_movement_type* unit_movement_type::get_parent (  )  const [inline]

Definition at line 137 of file unit_types.hpp.

References parent_.

Referenced by unit::advance_to().


Member Data Documentation

Definition at line 139 of file unit_types.hpp.

Referenced by movement_cost(), and movement_costs().

Definition at line 140 of file unit_types.hpp.

Referenced by defense_modifier(), and defense_mods().


The documentation for this class 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