68 if (unit_list_size(padj->units) > 0 ||
tile_city(padj)) {
77 if (ptype !=
nullptr) {
102 anination =
pick_a_nation(
nullptr,
false,
true, ANIMAL_BARBARIAN);
109 if (plr ==
nullptr) {
140 if (pplayer != plr) {
#define CALL_PLR_AI_FUNC(_func, _player,...)
const char * default_ai_type_name()
Return name of default ai type.
static void place_animal(struct player *plr)
Try to add one animal to the map.
void create_animals()
Create animal kingdom player and his units.
static const struct unit_type * animal_for_terrain(struct terrain *pterr)
Return suitable animal type for the terrain.
void set_ai_level_directer(struct player *pplayer, enum ai_level level)
Set an AI level and related quantities, with no feedback.
#define fc_assert_ret(condition)
struct tile * rand_map_pos(const struct civ_map *nmap)
Random square anywhere on the map.
#define adjc_iterate(nmap, center_tile, itr_tile)
bool can_exist_at_tile(const struct civ_map *nmap, const struct unit_type *utype, const struct tile *ptile)
Return TRUE iff a unit of the given unit type can "exist" at this location.
struct government * init_government_of_nation(const struct nation_type *pnation)
Returns initial government type for this nation.
#define NO_NATION_SELECTED
bool player_set_nation(struct player *pplayer, struct nation_type *pnation)
Set the player's nation to the given nation (may be nullptr).
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Returns diplomatic state type between two players.
#define players_iterate_end
#define players_iterate(_pplayer)
void send_player_all_c(struct player *src, struct conn_list *dest)
Send all information about a player (player_info and all player_diplstates) to the given connections.
struct player * server_create_player(int player_id, const char *ai_tname, struct rgbcolor *prgbcolor, bool allow_ai_type_fallbacking)
Creates a new, uninitialized, used player slot.
void assign_player_colors()
Permanently assign colors to any players that don't already have them.
struct nation_type * pick_a_nation(const struct nation_list *choices, bool ignore_conflicts, bool needs_startpos, enum barbarian_type barb_type)
This function returns a random-ish nation that is suitable for 'barb_type' and is usable (not already...
void server_player_init(struct player *pplayer, bool initmap, bool needs_team)
Initialize ANY newly-created player on the server.
struct research * research_get(const struct player *pplayer)
Returns the research structure associated with the player.
void player_nation_defaults(struct player *pplayer, struct nation_type *pnation, bool set_name)
Set nation for player with nation default values.
struct packet_game_info info
struct civ_map::@39::@41 server
enum barbarian_type barbarian_type
struct player_ai ai_common
char username[MAX_LEN_NAME]
struct government * government
struct player_economic economic
const struct unit_type * animal
#define sz_strlcpy(dest, src)
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
#define tile_terrain(_tile)
#define tile_has_extra(ptile, pextra)