The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | Friends | List of all members
advance_unit_params Struct Reference

advances the unit at loc if it has enough experience, maximum 20 times. More...

#include <attack.hpp>

Public Member Functions

 advance_unit_params (const map_location &loc)
 
advance_unit_paramsai_advancements (const ai::unit_advancements_aspect &value)
 
advance_unit_paramsforce_dialog (bool value)
 
advance_unit_paramsfire_events (bool value)
 
advance_unit_paramsanimate (bool value)
 

Private Attributes

const map_locationloc_
 
const
ai::unit_advancements_aspect
ai_advancements_
 
bool force_dialog_
 
bool fire_events_
 
bool animate_
 

Friends

void advance_unit_at (const advance_unit_params &)
 

Detailed Description

advances the unit at loc if it has enough experience, maximum 20 times.

if the unit is on the currently active side, and that side is controlled by a human, a dialog pops up. if we are in a non mp game, and the side is controlled by a human then a dialog is shown too. if the side is controlled by an ai, and if ai_advancement is passed, then ai_advancement will be used. otherwise a random decision will be taken.

this method is currently not used by unstore_unit, if we want to do that we'd need to allow more arguments (animate, fire_events).

Definition at line 214 of file attack.hpp.

Constructor & Destructor Documentation

advance_unit_params::advance_unit_params ( const map_location loc)
inline

Definition at line 216 of file attack.hpp.

Member Function Documentation

advance_unit_params& advance_unit_params::ai_advancements ( const ai::unit_advancements_aspect value)
inline

Definition at line 217 of file attack.hpp.

References ai_advancements_.

advance_unit_params& advance_unit_params::animate ( bool  value)
inline

Definition at line 220 of file attack.hpp.

References animate_.

Referenced by intf_advance_unit().

advance_unit_params& advance_unit_params::fire_events ( bool  value)
inline

Definition at line 219 of file attack.hpp.

References fire_events_.

Referenced by intf_advance_unit().

advance_unit_params& advance_unit_params::force_dialog ( bool  value)
inline

Definition at line 218 of file attack.hpp.

References force_dialog_.

Friends And Related Function Documentation

void advance_unit_at ( const advance_unit_params )
friend

Definition at line 1478 of file attack.cpp.

Member Data Documentation

const ai::unit_advancements_aspect* advance_unit_params::ai_advancements_
private

Definition at line 224 of file attack.hpp.

Referenced by advance_unit_at(), and ai_advancements().

bool advance_unit_params::animate_
private

Definition at line 227 of file attack.hpp.

Referenced by advance_unit_at(), and animate().

bool advance_unit_params::fire_events_
private

Definition at line 226 of file attack.hpp.

Referenced by advance_unit_at(), and fire_events().

bool advance_unit_params::force_dialog_
private

Definition at line 225 of file attack.hpp.

Referenced by advance_unit_at(), and force_dialog().

const map_location& advance_unit_params::loc_
private

Definition at line 223 of file attack.hpp.

Referenced by advance_unit_at().


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