Functions

unit_helper Namespace Reference

Functions

int number_of_possible_advances (const unit &unit)
 Determines the total number of available advancements (of any kind) for a given unit.
bool will_certainly_advance (const unit_map::iterator &u)
 Encapsulates the logic for deciding whether an iterator u points to a unit that can advance.

Function Documentation

int unit_helper::number_of_possible_advances ( const unit unit  ) 

Determines the total number of available advancements (of any kind) for a given unit.

This includes normal advances and modifiers.

Returns:
the total number of possible advancements.

Referenced by WML_HANDLER_FUNCTION().

Here is the caller graph for this function:

bool unit_helper::will_certainly_advance ( const unit_map::iterator u  ) 

Encapsulates the logic for deciding whether an iterator u points to a unit that can advance.

Returns:
true if the unit exists, has available advances, and can_advance().

Referenced by WML_HANDLER_FUNCTION().

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:25:45 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs