base class for classes that clear srhoud (move/recruit/recall) More...
#include <shroud_clearing_action.hpp>
Public Types | |
typedef std::vector< map_location > | t_route |
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 t_route::const_iterator &begin, const t_route::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 | |
t_route | 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 becasue it took a village. More... | |
base class for classes that clear srhoud (move/recruit/recall)
Definition at line 13 of file shroud_clearing_action.hpp.
typedef std::vector<map_location> actions::shroud_clearing_action::t_route |
Definition at line 34 of file shroud_clearing_action.hpp.
|
inline |
Definition at line 16 of file shroud_clearing_action.hpp.
References read_locations(), and route.
|
inline |
Definition at line 25 of file shroud_clearing_action.hpp.
|
inline |
Definition at line 36 of file shroud_clearing_action.hpp.
|
inlinevirtual |
Definition at line 69 of file shroud_clearing_action.hpp.
void actions::shroud_clearing_action::return_village | ( | ) |
Change village owner on undo.
Definition at line 13 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::recruit_action::undo(), actions::undo::recall_action::undo(), and actions::undo::move_action::undo().
void actions::shroud_clearing_action::take_village | ( | ) |
Change village owner on redo.
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(), route, team::set_action_bonus_count(), team::side(), and take_village_timebonus.
Referenced by actions::undo::move_action::redo().
Definition at line 61 of file shroud_clearing_action.hpp.
References config::add_child(), original_village_owner, take_village_timebonus, actions::clearer_info::write(), and write_locations().
Referenced by actions::undo::recruit_action::write(), actions::undo::recall_action::write(), and actions::undo::move_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 52 of file shroud_clearing_action.hpp.
Referenced by return_village(), and write().
t_route 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 47 of file shroud_clearing_action.hpp.
Referenced by actions::undo::recruit_action::redo(), actions::undo::recall_action::redo(), actions::undo::move_action::redo(), return_village(), shroud_clearing_action(), take_village(), actions::undo::recruit_action::undo(), actions::undo::recall_action::undo(), and actions::undo::move_action::undo().
bool actions::shroud_clearing_action::take_village_timebonus |
Whether this actions got a timebonus becasue it took a village.
Definition at line 54 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 49 of file shroud_clearing_action.hpp.