105 const unit &unit_recall);
This class stores all the data for a single 'side' (in game nomenclature).
A single unit type that the player may recruit.
This class represents a single unit of a specific type.
std::string find_recruit_location(const int side, map_location &recruit_location, map_location &recruited_from, const std::string &unit_type)
Finds a location on which to place a unit.
RECRUIT_CHECK check_recall_location(const int side, map_location &recall_location, map_location &recall_from, const unit &unit_recall)
Checks if there is a location on which to recall unit_recall.
const std::set< std::string > get_recruits(int side, const map_location &recruit_loc)
Gets the recruitable units from a side's leaders' personal recruit lists who can recruit on or from a...
place_recruit_result place_recruit(const unit_ptr &u, const map_location &recruit_location, const map_location &recruited_from, int cost, bool is_recall, map_location::direction facing, bool show, bool fire_event, bool full_movement, bool wml_triggered)
Place a unit into the game.
RECRUIT_CHECK
The possible results of finding a location for recruiting (or recalling).
@ RECRUIT_OK
Recruitment OK, but not at the specified location.
@ RECRUIT_NO_VACANCY
No able leaders are on a keep.
@ RECRUIT_NO_ABLE_LEADER
No leaders exist.
@ RECRUIT_ALTERNATE_LOCATION
No vacant castle tiles around a leader on a keep.
@ RECRUIT_NO_KEEP_LEADER
No leaders able to recall/recruit the given unit/type.
bool recall_unit(const std::string &id, team ¤t_team, const map_location &loc, const map_location &from, map_location::direction facing)
Recalls the unit with the indicated ID for the provided team.
RECRUIT_CHECK check_recruit_location(const int side, map_location &recruit_location, map_location &recruited_from, const std::string &unit_type)
Checks if there is a location on which to place a recruited unit.
void recruit_unit(const unit_type &u_type, int side_num, const map_location &loc, const map_location &from)
Recruits a unit of the given type for the given side.
std::vector< unit_const_ptr > get_recalls(int side, const map_location &recall_loc)
Gets the recallable units for a side, restricted by that side's leaders' personal abilities to recall...
std::string find_recall_location(const int side, map_location &recall_location, map_location &recall_from, const unit &unit_recall)
Finds a location on which to recall unit_recall.
std::tuple< bool, int, bool > place_recruit_result
void show(const std::string &window_id, const t_string &message, const point &mouse, const SDL_Rect &source_rect)
Shows a tip.
bool fire_event(const ui_event event, const std::vector< std::pair< widget *, ui_event >> &event_chain, widget *dispatcher, widget *w, F &&... params)
Helper function for fire_event.
std::shared_ptr< unit > unit_ptr
Encapsulates the map of the game.
direction
Valid directions which can be moved in our hexagonal world.
Various functions related to the creation of units (recruits, recalls, and placed units).