31 #define ERR_NG LOG_STREAM(err, log_engine) 32 #define LOG_NG LOG_STREAM(info, log_engine) 40 const map_location& from,
int orig_village_owner,
bool time_bonus)
43 , u_type(recruited->
type())
79 if ( un_it == units.
end() ) {
83 const unit &un = *un_it;
93 units.
erase(recruit_loc);
base class for classes that clear srhoud (move/recruit/recall)
const std::string & parent_id() const
The id of the original type from which this (variation) descended.
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
virtual bool undo(int side)
Undoes this action.
virtual const unit_map & units() const override
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
This class represents a single unit of a specific type.
std::size_t erase(const map_location &l)
Erases the unit at location l, if any.
virtual void write(config &cfg) const
Writes this into the provided config.
recruit_action(const unit_const_ptr recruited, const map_location &loc, const map_location &from, int orig_village_owner, bool time_bonus)
A single unit type that the player may recruit.
const unit_type & type() const
This unit's type, accounting for gender and variation.
std::shared_ptr< const unit > unit_const_ptr
void return_village()
Change village owner on undo.
int action_bonus_count() const
This class stores all the data for a single 'side' (in game nomenclature).
void execute_undo_umc_wml()
void spend_gold(const int amount)
void write(config &cfg) const
Encapsulates the map of the game.
unit_iterator find(std::size_t id)
Various functions related to the creation of units (recruits, recalls, and placed units)...
config & add_child(config_key_type key)
map_location recruit_from
virtual void write(config &cfg) const
Writes this into the provided config.
void set_action_bonus_count(const int count)
Standard logging facilities (interface).
Container associating units to locations.
route_t route
The hexes occupied by the affected unit during this action.
static lg::log_domain log_engine("engine")
void un_recruit_unit(const unit &u)
A config object defines a single node in a WML file, with access to child nodes.
actions that are undoable (this does not include update_shroud and auto_shroud)
static game_display * get_singleton()
void write(config &cfg) const