82#define LOGLEVEL_TAX LOG_DEBUG
87#define AI_GOLD_RESERVE_MIN_TURNS 10
88#define AI_BULBS_RESERVE_MIN_TURNS 10
92#define PCT_DELTA_TAX 50
93#define PCT_DELTA_SCI 10
133 *trade += pcity->surplus[
O_TRADE];
175#define RATE_NOT_SET -1
176#define RATE_VALID(_rate) \
177 (_rate != RATE_NOT_SET)
178#define RATE_REMAINS(_rates) \
179 MAX(0, 100 - _rates[AI_RATE_SCI] - _rates[AI_RATE_TAX] \
180 - _rates[AI_RATE_LUX])
494 if (
cmr->found_a_valid
495 && pcity->surplus[
O_FOOD] > 0
511 "%d/%d/%d (%d of %d cities)",
564 "(Sci/Lux/Tax)>=%d/%d/%d",
574 "(Sci/Lux/Tax)>=%d/%d/%d",
584 "(Sci/Lux/Tax)>=%d/%d/%d",
605 "(Sci/Lux/Tax)>=%d/%d/%d",
669 if (
cmr->found_a_valid) {
738 "dai_manage_government() + %d for %s",
struct adv_data * adv_data_get(struct player *pplayer, bool *caller_closes)
bool adv_wants_science(struct player *pplayer)
bool adv_spaceship_autoplace(struct player *pplayer, struct player_spaceship *ship)
@ AI_CELEBRATION_UNCHECKED
void dai_calc_data(const struct player *pplayer, int *trade, int *expenses, int *income)
static void dai_manage_government(struct ai_type *ait, struct player *pplayer)
#define RATE_VALID(_rate)
void dai_do_last_activities(struct ai_type *ait, struct player *pplayer)
static void dai_manage_taxes(struct ai_type *ait, struct player *pplayer)
#define RATE_REMAINS(_rates)
static void dai_manage_spaceship(struct player *pplayer)
#define AI_GOLD_RESERVE_MIN_TURNS
void dai_do_first_activities(struct ai_type *ait, struct player *pplayer)
#define AI_BULBS_RESERVE_MIN_TURNS
void dai_clear_tech_wants(struct ai_type *ait, struct player *pplayer)
void dai_manage_tech(struct ai_type *ait, struct player *pplayer)
const char * city_name_get(const struct city *pcity)
bool city_can_grow_to(const struct city *pcity, int pop_size)
void city_refresh_from_main_map(const struct civ_map *nmap, struct city *pcity, bool *workers_map)
bool city_happy(const struct city *pcity)
static int cmp(int v1, int v2)
#define city_list_iterate(citylist, pcity)
static citizens city_size_get(const struct city *pcity)
#define city_list_iterate_end
void apply_cmresult_to_city(struct city *pcity, const struct cm_result *cmr)
void cm_clear_cache(struct city *pcity)
void cm_init_parameter(struct cm_parameter *dest)
struct cm_result * cm_result_new(struct city *pcity)
void cm_result_destroy(struct cm_result *result)
void cm_query_result(struct city *pcity, const struct cm_parameter *param, struct cm_result *result, bool negative_ok)
void dai_manage_cities(struct ai_type *ait, struct player *pplayer)
void dai_adjust_policies(struct ai_type *ait, struct player *pplayer)
bool dai_on_war_footing(struct ai_type *ait, struct player *pplayer)
#define TECH_LOG(ait, loglevel, pplayer, padvance, msg,...)
void dai_assess_danger_player(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer)
static struct ai_plr * def_ai_player_data(const struct player *pplayer, struct ai_type *deftype)
static struct ai_city * def_ai_city_data(const struct city *pcity, struct ai_type *deftype)
void dai_manage_units(struct ai_type *ait, struct player *pplayer)
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
void distribute(int number, unsigned groups, const unsigned *ratios, int *result)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
struct government * government_of_player(const struct player *pplayer)
const char * government_rule_name(const struct government *pgovern)
void handle_spaceship_launch(struct player *pplayer)
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define log_base(level, message,...)
struct nation_type * nation_of_player(const struct player *pplayer)
struct government * init_government_of_nation(const struct nation_type *pnation)
const char * player_name(const struct player *pplayer)
int player_index(const struct player *pplayer)
void send_player_info_c(struct player *src, struct conn_list *dest)
int player_tech_upkeep(const struct player *pplayer)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
#define CLIP(lower, current, upper)
#define NUM_SS_COMPONENTS
#define NUM_SS_STRUCTURALS
#define CITY_LOG(loglevel, pcity, msg,...)
#define TIMING_LOG(timer, activity)
struct government * revolution
struct adv_data::@93 goal
struct adv_data::@93::@95 govt
struct packet_game_info info
struct government * government_during_revolution
enum gold_upkeep_style gold_upkeep_style
enum tech_upkeep_style tech_upkeep_style
enum spaceship_state state
struct city_list * cities
struct conn_list * connections
struct player_economic economic
struct player_spaceship spaceship
struct player::@70::@72 server
struct advance * advance_by_number(const Tech_type_id atype)
void timer_destroy(struct timer *t)
void timer_start(struct timer *t)
void timer_stop(struct timer *t)
struct timer * timer_new(enum timer_timetype type, enum timer_use use, const char *name)
double timer_read_seconds(struct timer *t)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
bool victory_enabled(enum victory_condition_type victory)