92 if (pcity == wonder_city
93 || wonder_city ==
NULL
94 ||
city_data->distance_to_wonder_city <= 0
132 "Non existence of wonder helper unit not caught");
139 int dist =
city_data->distance_to_wonder_city /
144 want /=
MAX(dist, 1);
149 if (want > choice->
want) {
161 "would but could not build ACTION_HELP_WONDER unit, "
195 bool need_boat =
FALSE;
236 "Non-existence of trade unit not caught");
453 "want for trade route unit is " ADV_WANT_PRINTF " (expected initial income %d)",
457 if (want > choice->
want) {
479 "would but could not build trade route unit, bumped reqs");
518 if (worker_type !=
NULL
521 if (worker_want > 0) {
531 }
else if (worker_type ==
NULL && worker_want > 0) {
565 if (founder_want > choice->
want) {
583 " and asks for a new boat (%d of %d free)",
587 choice->
want = 0 - founder_want;
659 if (wonder_city ==
NULL) {
671 "Non existence of wonder helper unit not caught");
static struct action * action_by_number(action_id act_id)
#define action_id_get_role(act_id)
void building_advisor_choose(struct city *pcity, struct adv_choice *choice)
struct adv_choice * adv_better_choice_free(struct adv_choice *first, struct adv_choice *second)
struct adv_choice * adv_new_choice(void)
#define adv_choice_set_use(_choice, _use)
struct adv_data * adv_data_get(struct player *pplayer, bool *caller_closes)
struct unit_type * dai_wants_role_unit(struct ai_type *ait, struct player *pplayer, struct city *pcity, int role, int want)
int ai_trait_get_value(enum trait tr, struct player *pplayer)
bool city_production_gets_caravan_shields(const struct universal *tgt)
const char * city_name_get(const struct city *pcity)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
#define city_owner(_pcity_)
#define city_list_iterate_end
struct ai_plr * dai_plr_data_get(struct ai_type *ait, struct player *pplayer, bool *caller_closes)
void dai_wonder_city_distance(struct ai_type *ait, struct player *pplayer, struct adv_data *adv)
struct adv_choice * domestic_advisor_choose_build(struct ai_type *ait, struct player *pplayer, struct city *pcity)
static void dai_choose_trade_route(struct ai_type *ait, struct city *pcity, struct adv_choice *choice, struct adv_data *ai)
static void dai_choose_help_wonder(struct ai_type *ait, struct city *pcity, struct adv_choice *choice, struct adv_data *ai)
static struct ai_city * def_ai_city_data(const struct city *pcity, struct ai_type *deftype)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct player *other_player, enum effect_type effect_type)
signed short Continent_id
struct city * game_city_by_number(int id)
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
Impr_type_id improvement_index(const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
int unit_move_rate(const struct unit *punit)
struct pf_map * pf_map_new(const struct pf_parameter *parameter)
void pf_map_destroy(struct pf_map *pfm)
#define pf_map_move_costs_iterate_end
#define pf_map_move_costs_iterate(ARG_pfm, NAME_tile, NAME_cost, COND_from_start)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
#define players_iterate_end
#define players_iterate(_pplayer)
#define CITY_LOG(loglevel, pcity, msg,...)
adv_want building_want[B_LAST]
int distance_to_wonder_city
struct ai_plr::@253 stats
struct universal production
struct city::@17::@19 server
struct unit_list * units_supported
struct packet_game_info info
struct packet_scenario_info scenario
enum caravan_bonus_style caravan_bonus_style
struct city_list * cities
struct player_ai ai_common
struct player_economic economic
struct city * tile_city(const struct tile *ptile)
#define tile_continent(_tile)
int max_trade_prod(const struct city *pcity)
bool can_cities_trade(const struct city *pc1, const struct city *pc2)
int trade_route_type_trade_pct(enum trade_route_type type)
int city_num_trade_routes(const struct city *pcity)
unsigned max_trade_routes(const struct city *pcity)
#define TRAIT_DEFAULT_VALUE
const struct unit_type * utype
const struct impr_type * building
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
void unit_virtual_destroy(struct unit *punit)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
struct unit_type * best_role_unit(const struct city *pcity, int role)
int utype_upkeep_cost(const struct unit_type *ut, struct player *pplayer, Output_type_id otype)
struct unit_type * get_role_unit(int role, int role_index)
int utype_build_shield_cost_base(const struct unit_type *punittype)
int num_role_units(int role)
struct unit_type * best_role_unit_for_player(const struct player *pplayer, int role)
const char * utype_rule_name(const struct unit_type *punittype)
int utype_build_shield_cost(const struct city *pcity, const struct player *pplayer, const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)