60 const struct player *plr2);
62 const struct player *plr2);
64 const struct player *plr2);
79 memset(count, 0,
sizeof(count));
84 .value = {.building = pimprove}
112 &&
preq->source.value.building == pimprove) {
127 &&
preq->source.value.building == pimprove) {
216 adv->stats.units.coast_strict++;
219 adv->stats.units.suicide_attackers++;
228 adv->stats.units.paratroopers++;
231 adv->stats.units.airliftable++;
234 adv->stats.units.upgradeable++;
358 adv->oceans[-continent].threat =
TRUE;
364 adv->oceans[-continent].threat =
TRUE;
375 adv->threats.suicide_attack =
TRUE;
396 adv->threats.nuclear = 1;
404 adv->threats.nuclear++;
411 adv->explore.continent =
fc_calloc(
adv->num_continents + 1,
sizeof(
bool));
422 adv->explore.ocean[-continent] =
TRUE;
435 adv->explore.continent[continent] =
TRUE;
441 adv->explore.continent[continent] =
TRUE;
449 adv->stats.average_production = 0;
453 if (continent >= 0) {
454 adv->stats.cities[continent]++;
456 adv->stats.ocean_cities[-continent]++;
458 adv->stats.average_production += pcity->surplus[
O_SHIELD];
648#if defined(FREECIV_DEBUG) || defined(IS_DEVEL_VERSION)
676 log_debug(
"%s advisor data phase closed when adv_data_get() called",
786 const struct player *plr2)
798 const struct player *plr2)
813 const struct player *plr2)
1000 bool override =
FALSE;
1036 val += (val * bonus) / 100;
1114 if (
is_ai(pplayer)) {
1141 if (
dip->allied_with_enemy) {
void action_array_add_all_by_result(action_id *act_array, int *position, enum action_result result)
void action_array_end(action_id *act_array, int size)
bool action_immune_government(struct government *gov, action_id act)
static struct action * action_by_number(action_id act_id)
#define action_array_iterate(_act_array_, _act_id_)
#define action_id_get_role(act_id)
#define action_array_iterate_end
#define action_iterate_end
#define action_iterate(_act_)
#define ASSERT_UNUSED_ACTRES_CASES
#define POLLUTION_WEIGHTING
int adv_eval_calc_city(struct city *pcity, struct adv_data *adv)
static void adv_data_city_impr_calc(struct player *pplayer, struct adv_data *adv)
void adv_data_analyze_rulesets(struct player *pplayer)
void adv_data_close(struct player *pplayer)
adv_want adv_gov_player_bonus_want(struct player *pplayer)
void adv_data_init(struct player *pplayer)
static void adv_dipl_free(const struct player *plr1, const struct player *plr2)
struct adv_data * adv_data_get(struct player *pplayer, bool *caller_closes)
bool is_adv_data_phase_open(struct player *pplayer)
bool adv_wants_science(struct player *pplayer)
bool adv_data_phase_init(struct player *pplayer, bool is_new_phase)
void adv_data_phase_done(struct player *pplayer)
bool adv_is_player_dangerous(struct player *pplayer, struct player *aplayer)
static void adv_dipl_new(const struct player *plr1, const struct player *plr2)
static void count_my_units(struct player *pplayer)
adv_want adv_gov_action_immunity_want(struct government *gov)
static struct adv_dipl * adv_dipl_get(const struct player *plr1, const struct player *plr2)
static bool player_has_really_useful_tech_parasite(struct player *pplayer)
void adv_best_government(struct player *pplayer)
void adv_data_default(struct player *pplayer)
@ ADV_IMPR_CALCULATE_FULL
#define CALL_PLR_AI_FUNC(_func, _player,...)
struct player * player_leading_spacerace(void)
#define city_list_iterate(citylist, pcity)
#define city_list_iterate_end
void auto_arrange_workers(struct city *pcity)
static void nuke_units(QVariant data1, QVariant data2)
static void nuke(QVariant data1, QVariant data2)
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 effect_list * get_req_source_effects(const struct universal *psource)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
signed short Continent_id
Government_type_id government_count(void)
struct government * government_of_player(const struct player *pplayer)
bool can_change_to_government(struct player *pplayer, const struct government *gov)
Government_type_id government_index(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
static GtkWidget * source
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
Impr_type_id improvement_index(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
#define adjc_iterate(nmap, center_tile, itr_tile)
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
bool map_is_known(const struct tile *ptile, const struct player *pplayer)
#define fc_calloc(n, esz)
#define fc_realloc(ptr, sz)
bool can_unit_type_transport(const struct unit_type *transporter, const struct unit_class *transported)
int player_slot_count(void)
const char * player_name(const struct player *pplayer)
int player_slot_index(const struct player_slot *pslot)
int player_index(const struct player *pplayer)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
#define players_iterate_end
#define players_iterate(_pplayer)
#define player_slots_iterate(_pslot)
#define players_iterate_alive_end
#define player_slots_iterate_end
static bool player_is_cpuhog(const struct player *pplayer)
#define players_iterate_alive(_pplayer)
void check_player_max_rates(struct player *pplayer)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
int research_goal_unknown_techs(const struct research *presearch, Tech_type_id goal)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
#define CLIP(lower, current, upper)
#define TIMING_LOG(timer, activity)
struct adv_data::@89 threats
struct government * revolution
struct adv_dipl ** adv_dipl_slots
struct adv_data::@92 dipl
struct adv_data::@91::@94 units
adv_want * government_want
struct adv_area_info * oceans
struct player * production_leader
struct adv_data::@93 goal
struct adv_area_info * continents
struct adv_data::@91 stats
struct adv_data::@93::@95 govt
enum adv_improvement_status impr_calc[B_LAST]
bool phase_is_initialized
enum req_range impr_range[B_LAST]
struct adv_data::@90 explore
struct player * tech_leader
struct player * spacerace_leader
struct packet_game_info info
struct government * government_during_revolution
Continent_id num_continents
bool tech_parasite_allow_holes
int love[MAX_NUM_PLAYER_SLOTS]
struct city_list * cities
struct player_ai ai_common
struct government * government
const struct ai_type * ai
struct player_score score
struct player::@70::@72 server
struct unit_class::@85 adv
struct unit_type::@87 adv
struct unit_class * uclass
const struct unit_type * utype
bool is_future_tech(Tech_type_id tech)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_index_iterate_end
#define advance_index_iterate(_start, _index)
#define is_ocean_tile(ptile)
#define tile_continent(_tile)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
int get_transporter_capacity(const struct unit *punit)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
bool can_player_build_unit_direct(const struct player *p, const struct unit_type *punittype, bool consider_reg_impr_req)
struct unit_type * get_role_unit(int role, int role_index)
int num_role_units(int role)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
struct unit_class * unit_class_get(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
bool unit_can_take_over(const struct unit *punit)
bool utype_can_take_over(const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
#define unit_type_iterate(_p)
#define uclass_index(_c_)
#define unit_type_iterate_end