The Battle for Wesnoth  1.15.0-dev
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 <advancement.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

map_location loc_
 
const ai::unit_advancements_aspectai_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.

Definition at line 38 of file advancement.hpp.

Constructor & Destructor Documentation

◆ advance_unit_params()

advance_unit_params::advance_unit_params ( const map_location loc)
inline

Definition at line 40 of file advancement.hpp.

Member Function Documentation

◆ ai_advancements()

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

Definition at line 41 of file advancement.hpp.

References ai_advancements_.

◆ animate()

advance_unit_params& advance_unit_params::animate ( bool  value)
inline

Definition at line 44 of file advancement.hpp.

References advance_unit_at, and animate_.

Referenced by intf_advance_unit().

◆ fire_events()

advance_unit_params& advance_unit_params::fire_events ( bool  value)
inline

Definition at line 43 of file advancement.hpp.

References fire_events_.

Referenced by intf_advance_unit().

◆ force_dialog()

advance_unit_params& advance_unit_params::force_dialog ( bool  value)
inline

Definition at line 42 of file advancement.hpp.

References force_dialog_.

Friends And Related Function Documentation

◆ advance_unit_at

void advance_unit_at ( const advance_unit_params )
friend

Definition at line 232 of file advancement.cpp.

Referenced by animate().

Member Data Documentation

◆ ai_advancements_

const ai::unit_advancements_aspect* advance_unit_params::ai_advancements_
private

Definition at line 48 of file advancement.hpp.

Referenced by advance_unit_at(), and ai_advancements().

◆ animate_

bool advance_unit_params::animate_
private

Definition at line 51 of file advancement.hpp.

Referenced by advance_unit_at(), and animate().

◆ fire_events_

bool advance_unit_params::fire_events_
private

Definition at line 50 of file advancement.hpp.

Referenced by advance_unit_at(), and fire_events().

◆ force_dialog_

bool advance_unit_params::force_dialog_
private

Definition at line 49 of file advancement.hpp.

Referenced by advance_unit_at(), and force_dialog().

◆ loc_

map_location advance_unit_params::loc_
private

Definition at line 47 of file advancement.hpp.

Referenced by advance_unit_at().


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