Freeciv-3.2
|
Go to the source code of this file.
Data Structures | |
struct | ai_invasion |
struct | ai_city |
Macros | |
#define | BUILDING_WAIT_MINIMUM (1) |
void dai_build_adv_adjust | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
struct city * | wonder_city | ||
) |
Calculate how much an AI player should want to build particular improvements, because of the effects of those improvements, and increase the want for technologies that will enable buildings with desirable effects.
Definition at line 1945 of file daicity.c.
Referenced by cai_build_adv_adjust(), and texwai_build_adv_adjust().
Initialize building advisor. Calculates data of all players, not only of those controlled by current ai type.
Definition at line 1929 of file daicity.c.
Referenced by cai_build_adv_init(), and texwai_build_adv_init().
bool dai_can_city_build_improvement_later | ( | const struct city * | pcity, |
const struct impr_type * | pimprove | ||
) |
Whether AI expects to be ever able to build given building in the city
Definition at line 2090 of file daicity.c.
Referenced by should_force_recalc().
bool dai_can_player_build_improvement_later | ( | const struct player * | p, |
const struct impr_type * | pimprove | ||
) |
Whether AI expects to be ever able to build given building
Definition at line 2120 of file daicity.c.
Referenced by dai_can_city_build_improvement_later().
Initialize city for use with default AI.
Definition at line 1111 of file daicity.c.
Referenced by cai_city_alloc().
Free city from use with default AI.
Definition at line 1124 of file daicity.c.
Referenced by cai_city_free().
void dai_city_load | ( | struct ai_type * | ait, |
const char * | aitstr, | ||
const struct section_file * | file, | ||
struct city * | pcity, | ||
const char * | citystr | ||
) |
Load ai city segment from savefile
Definition at line 1165 of file daicity.c.
Referenced by cai_city_load(), and texwai_city_load().
void dai_city_save | ( | struct ai_type * | ait, |
const char * | aitstr, | ||
struct section_file * | file, | ||
const struct city * | pcity, | ||
const char * | citystr | ||
) |
Write ai city segments to savefile
Definition at line 1138 of file daicity.c.
Referenced by cai_city_save(), and texwai_city_save().
adv_want dai_city_want | ( | struct player * | pplayer, |
struct city * | acity, | ||
struct adv_data * | adv, | ||
struct impr_type * | pimprove | ||
) |
Calculates city want from some input values. Set pimprove to NULL when nothing in the city has changed, and you just want to know the base want of a city.
Definition at line 1424 of file daicity.c.
Referenced by base_want(), dai_adjust_policies(), dai_build_adv_init(), dai_gov_value(), and dai_tech_base_want().
Is it ok for advisor code to consider given city as wonder city?
Definition at line 2056 of file daicity.c.
Referenced by cai_consider_wonder_city(), and texwai_consider_wonder_city().
Impr_type_id dai_find_source_building | ( | struct city * | pcity, |
enum effect_type | effect_type, | ||
const struct unit_type * | utype | ||
) |
Returns a buildable, non-obsolete building that can provide the effect.
Note: this function is an inefficient hack to be used by the old AI. It will never find wonders, since that's not what the AI wants.
Definition at line 2156 of file daicity.c.
Referenced by adjust_ai_unit_choice(), assess_danger(), and military_advisor_choose_build().
One of the top level AI functions. It does (by calling other functions): worker allocations, build choices, extra gold spending.
Definition at line 851 of file daicity.c.
Referenced by dai_do_last_activities().
void dont_want_tech_obsoleting_impr | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
const struct city * | pcity, | ||
const struct impr_type * | pimprove, | ||
adv_want | building_want | ||
) |
Decrease want for a technology because of the value of that technology in obsoleting an improvement effect.
Definition at line 177 of file daicity.c.
Referenced by adjust_improvement_wants_by_effects().
void want_techs_for_improvement_effect | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
const struct city * | pcity, | ||
const struct impr_type * | pimprove, | ||
struct tech_vector * | needed_techs, | ||
adv_want | building_want | ||
) |
Increase want for a technologies because of the value of that technology in providing an improvement effect.
Definition at line 156 of file daicity.c.
Referenced by adjust_improvement_wants_by_effects(), and adjust_wants_for_reqs().