98 int *wants =
cdata->unit_wants;
155 int cindex,
struct unit_list *units,
226 worked->
ptile = ptile;
364 if (
proad->move_cost == 0) {
383 value = base_value + extra;
388 worked->
ptile = ptile;
455 .orig_worst_worked = 0, .old_worst_worked =
FC_INFINITY };
456 struct unit_list *units =
NULL;
516 target = selected->
tgt;
520 task->
act = selected->
act;
550 log_debug(
"%s storing req for act %d at (%d,%d)",
bool action_prob_possible(const struct act_prob probability)
struct act_prob action_speculate_unit_on_tile(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target_tile, const struct extra_type *target_extra)
enum action_target_kind action_get_target_kind(const struct action *paction)
static struct action * action_by_number(action_id act_id)
#define action_get_activity(_pact_)
#define action_id_get_activity(act_id)
void adv_deinit_choice(struct adv_choice *choice)
void adv_init_choice(struct adv_choice *choice)
struct adv_data * adv_data_get(struct player *pplayer, bool *caller_closes)
adv_want adv_workers_road_bonus(const struct civ_map *nmap, struct tile *ptile, struct road_type *proad)
#define aw_extra_action_iterate(_act_)
#define aw_transform_action_iterate(_act_)
#define aw_rmextra_action_iterate_end
#define aw_extra_action_iterate_end
#define aw_transform_action_iterate_end
#define aw_rmextra_action_iterate(_act_)
void city_set_ai_data(struct city *pcity, const struct ai_type *ai, void *data)
int city_map_radius_sq_get(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 city_can_work_tile(const struct city *pcity, const struct tile *ptile)
#define city_tile(_pcity_)
#define city_tile_iterate_index(_nmap, _radius_sq, _city_tile, _tile, _index)
#define city_owner(_pcity_)
#define city_tile_iterate_end
#define BUILDING_WAIT_MINIMUM
struct ai_plr * dai_plr_data_get(struct ai_type *ait, struct player *pplayer, bool *caller_closes)
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
signed short Continent_id
struct city * game_city_by_number(int id)
adv_want adv_city_worker_act_get(const struct city *pcity, int city_tile_index, enum unit_activity act_id)
int adv_city_worker_extra_get(const struct city *pcity, int city_tile_index, const struct extra_type *pextra)
int adv_city_worker_rmextra_get(const struct city *pcity, int city_tile_index, const struct extra_type *pextra)
adv_want city_tile_value(const struct city *pcity, const struct tile *ptile, int foodneed, int prodneed)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
struct terrain_misc terrain_control
#define fc_calloc(n, esz)
bool road_provides_move_bonus(const struct road_type *proad)
struct adv_data::@94 stats
enum unit_activity activity
texai_worker_task_limitation
static void texai_tile_worker_task_select(struct player *pplayer, struct city *pcity, struct tile *ptile, int cindex, struct unit_list *units, struct worker_task *worked, struct worker_task *unworked, struct texai_tile_state *state, enum texai_worker_task_limitation limit)
static bool texai_city_worker_task_select(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct worker_task *task, enum texai_worker_task_limitation limit)
void texai_city_alloc(struct ai_type *ait, struct city *pcity)
void texai_city_free(struct ai_type *ait, struct city *pcity)
void texai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer, struct city *pcity)
void texai_city_worker_wants(struct ai_type *ait, struct player *pplayer, struct city *pcity)
void texai_req_worker_task_rcv(struct texai_req *req)
static struct texai_city * texai_city_data(struct ai_type *ait, const struct city *pcity)
void texai_send_req(enum texaireqtype type, struct player *pplayer, void *data)
struct unit_list * texai_player_units(struct player *pplayer)
#define tile_worked(_tile)
#define tile_terrain(_tile)
#define tile_continent(_tile)
#define tile_has_extra(ptile, pextra)
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
const struct unit_type * unit_type_get(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
Unit_type_id utype_index(const struct unit_type *punittype)
#define unit_type_iterate(_p)
#define unit_type_iterate_end
void worker_task_init(struct worker_task *ptask)