83 memset(values, 0,
sizeof(values));
127 values[k] +=
plr_data->tech_want[
i] / steps;
182#ifdef REALLY_DEBUG_THIS
187 "turn end want: %d", values[
id]);
205 "num_cities_nonzero = %d",
295 &&
preq->source.value.advance ==
padv) {
296 present =
preq->present;
323 tech_want = v * 14 / 8;
363 "new research, was %s, penalty was %d",
416 int def =
deftype->defense_strength
508 "+ %d for %s by role",
523 struct city *pcity,
int role,
int want)
534 for (
i =
n - 1;
i >= 0;
i--) {
602 "+ %d for %s by role",
struct adv_data * adv_data_get(struct player *pplayer, bool *caller_closes)
static adv_want dai_tech_base_want(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct advance *padv)
struct unit_type * dai_wants_defender_against(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct city *pcity, const struct unit_type *att, int want)
void dai_clear_tech_wants(struct ai_type *ait, struct player *pplayer)
void dai_manage_tech(struct ai_type *ait, struct player *pplayer)
static void dai_select_tech(struct ai_type *ait, struct player *pplayer, struct ai_tech_choice *choice, struct ai_tech_choice *goal)
static void dai_tech_effect_values(struct ai_type *ait, struct player *pplayer)
struct unit_type * dai_wants_role_unit(struct ai_type *ait, struct player *pplayer, struct city *pcity, int role, int want)
bool is_capital(const struct city *pcity)
bool can_city_build_unit_now(const struct civ_map *nmap, const struct city *pcity, const struct unit_type *punittype)
bool can_city_build_unit_later(const struct civ_map *nmap, const struct city *pcity, const struct unit_type *punittype)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
#define city_list_iterate_end
int combat_bonus_against(const struct combat_bonus_list *list, const struct unit_type *enemy, enum combat_bonus_type type)
adv_want dai_city_want(struct player *pplayer, struct city *acity, struct adv_data *adv, struct impr_type *pimprove)
bool dai_can_requirement_be_met_in_city(const struct requirement *preq, const struct player *pplayer, const struct city *pcity)
adv_want dai_effect_value(struct player *pplayer, const struct adv_data *adv, const struct city *pcity, const bool capital, int turns, const struct effect *peffect, const int c, const int nplayers)
#define TECH_LOG(ait, loglevel, pplayer, padvance, msg,...)
static struct ai_plr * def_ai_player_data(const struct player *pplayer, struct ai_type *deftype)
const struct impr_type * utype_needs_improvement(const struct unit_type *putype, const struct city *pcity)
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 cost
struct effect_list * get_req_source_effects(const struct universal *psource)
int get_unittype_bonus(const struct player *pplayer, const struct tile *ptile, const struct unit_type *punittype, const struct action *paction, enum effect_type effect_type)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
static GtkWidget * source
bool can_player_build_improvement_direct(const struct player *p, const struct impr_type *pimprove)
#define log_debug(message,...)
const char * player_name(const struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
int normal_player_count(void)
bool is_req_active(const struct req_context *context, const struct player *other_player, const struct requirement *req, const enum req_problem_type prob_type)
#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)
bool research_invention_reachable(const struct research *presearch, const Tech_type_id tech)
bool research_goal_tech_req(const struct research *presearch, Tech_type_id goal, Tech_type_id tech)
enum tech_state research_invention_set(struct research *presearch, Tech_type_id tech, enum tech_state value)
const char * research_advance_rule_name(const struct research *presearch, Tech_type_id tech)
int research_goal_bulbs_required(const struct research *presearch, Tech_type_id goal)
int research_total_bulbs_required(const struct research *presearch, Tech_type_id tech, bool loss_value)
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 research_players_iterate(_presearch, _pplayer)
#define research_players_iterate_end
struct packet_game_info info
struct requirement_vector reqs
bool global_advances[A_LAST]
struct city_list * cities
const struct impr_type * building
const struct player * player
struct advance * advance_by_number(const Tech_type_id atype)
bool is_future_tech(Tech_type_id tech)
struct advance * valid_advance_by_number(const Tech_type_id id)
const char * advance_rule_name(const struct advance *padvance)
Tech_type_id advance_index(const struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_index_iterate_max(_start, _index, _max)
#define advance_index_iterate_end
#define advance_index_iterate_max_end
static Tech_type_id advance_count(void)
#define advance_iterate(_p)
#define advance_iterate_end
#define advance_index_iterate(_start, _index)
struct unit_type * get_role_unit(int role, int role_index)
int num_role_units(int role)
const char * utype_rule_name(const struct unit_type *punittype)
Unit_type_id utype_index(const struct unit_type *punittype)
#define unit_tech_reqs_iterate_end
#define unit_tech_reqs_iterate(_utype_, _p)
#define unit_type_iterate(_p)
#define unit_type_iterate_end