base class for classes that clear srhoud (move/recruit/recall) More...
#include <shroud_clearing_action.hpp>
Public Types | |
typedef std::vector< map_location > | route_t |
Public Member Functions | |
shroud_clearing_action (const config &cfg) | |
shroud_clearing_action (const unit_const_ptr u, const map_location &loc, int village_owner, bool village_bonus) | |
shroud_clearing_action (const unit_const_ptr u, const route_t::const_iterator &begin, const route_t::const_iterator &end, int village_owner, bool village_bonus) | |
void | return_village () |
Change village owner on undo. More... | |
void | take_village () |
Change village owner on redo. More... | |
void | write (config &cfg) const |
virtual | ~shroud_clearing_action () |
Public Attributes | |
route_t | route |
The hexes occupied by the affected unit during this action. More... | |
clearer_info | view_info |
A record of the affected unit's ability to see. More... | |
int | original_village_owner |
The number of the side that preivously owned the village that the unit stepped on Note, that recruit/recall actions can also take a village if the unit was recruits/recalled onto a village. More... | |
bool | take_village_timebonus |
Whether this actions got a timebonus because it took a village. More... | |
base class for classes that clear srhoud (move/recruit/recall)
Definition at line 24 of file shroud_clearing_action.hpp.
typedef std::vector<map_location> actions::shroud_clearing_action::route_t |
Definition at line 45 of file shroud_clearing_action.hpp.
|
inline |
Definition at line 27 of file shroud_clearing_action.hpp.
References read_locations(), and route.
|
inline |
Definition at line 36 of file shroud_clearing_action.hpp.
|
inline |
Definition at line 47 of file shroud_clearing_action.hpp.
|
inlinevirtual |
Definition at line 84 of file shroud_clearing_action.hpp.
void actions::shroud_clearing_action::return_village | ( | ) |
Change village owner on undo.
Definition at line 25 of file shroud_clearing_action.cpp.
References team::action_bonus_count(), resources::controller, play_controller::current_team(), resources::gameboard, actions::get_village(), original_village_owner, route, team::set_action_bonus_count(), and take_village_timebonus.
Referenced by actions::undo::move_action::undo(), actions::undo::recall_action::undo(), and actions::undo::recruit_action::undo().
void actions::shroud_clearing_action::take_village | ( | ) |
Change village owner on redo.
Definition at line 37 of file shroud_clearing_action.cpp.
References team::action_bonus_count(), resources::controller, play_controller::current_team(), resources::gameboard, actions::get_village(), route, team::set_action_bonus_count(), team::side(), and take_village_timebonus.
|
inline |
Definition at line 76 of file shroud_clearing_action.hpp.
References config::add_child(), original_village_owner, route, take_village_timebonus, view_info, actions::clearer_info::write(), and write_locations().
Referenced by actions::undo::move_action::write(), actions::undo::recall_action::write(), and actions::undo::recruit_action::write().
int actions::shroud_clearing_action::original_village_owner |
The number of the side that preivously owned the village that the unit stepped on Note, that recruit/recall actions can also take a village if the unit was recruits/recalled onto a village.
Definition at line 67 of file shroud_clearing_action.hpp.
Referenced by return_village(), and write().
route_t actions::shroud_clearing_action::route |
The hexes occupied by the affected unit during this action.
For recruits and recalls this only contains one hex.
Definition at line 60 of file shroud_clearing_action.hpp.
Referenced by return_village(), shroud_clearing_action(), take_village(), actions::undo::move_action::undo(), actions::undo::recall_action::undo(), actions::undo::recruit_action::undo(), and write().
bool actions::shroud_clearing_action::take_village_timebonus |
Whether this actions got a timebonus because it took a village.
Definition at line 69 of file shroud_clearing_action.hpp.
Referenced by return_village(), take_village(), and write().
clearer_info actions::shroud_clearing_action::view_info |
A record of the affected unit's ability to see.
Definition at line 62 of file shroud_clearing_action.hpp.
Referenced by write().