91 if (
pcity == wonder_city
92 || wonder_city ==
NULL
93 ||
city_data->distance_to_wonder_city <= 0
131 "Non existence of wonder helper unit not caught");
138 int dist =
city_data->distance_to_wonder_city /
143 want /=
MAX(dist, 1);
148 if (want > choice->
want) {
160 "would but could not build ACTION_HELP_WONDER unit, "
194 bool need_boat =
FALSE;
235 "Non-existence of trade unit not caught");
452 "want for trade route unit is " ADV_WANT_PRINTF " (expected initial income %d)",
456 if (want > choice->
want) {
478 "would but could not build trade route unit, bumped reqs");
517 if (worker_type !=
NULL
520 if (worker_want > 0) {
530 }
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)
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_type * dai_wants_role_unit(struct ai_type *ait, struct player *pplayer, struct city *pcity, int role, int want)
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
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 int const struct action *paction struct unit struct city * pcity
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct req_context *other_context, 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)
bool player_can_do_action_result(struct player *pplayer, enum action_result result)
#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::@282 stats
struct universal production
struct city::@18::@20 server
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)
#define MAP_NATIVE_HEIGHT