152 log_debug(
"Don't want to attack %s, although we could",
178#define PROB_MULTIPLIER 100
288 log_debug(
"%s wants to attack tile (%d, %d)",
350 log_debug(
"Repairment of %s is almost finished, stays here",
398 log_debug(
"%s knows a better repair base than %d,%d",
551 log_debug(
"%s will fly to (%i, %i) (%s) to fight there",
561 log_debug(
"%s cannot find anything to kill and is staying put",
static struct action * action_by_number(action_id act_id)
#define adv_choice_set_use(_choice, _use)
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
const char * city_name_get(const struct city *pcity)
int city_production_unit_veteran_level(struct city *pcity, const struct unit_type *punittype)
bool can_city_build_unit_now(const struct civ_map *nmap, const struct city *pcity, const struct unit_type *punittype)
double unit_win_chance(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, const struct action *paction)
struct unit * get_defender(const struct civ_map *nmap, const struct unit *attacker, const struct tile *ptile, const struct action *paction)
bool can_unit_attack_tile(const struct unit *punit, const struct action *paction, const struct tile *dest_tile)
static struct tile * find_nearest_airbase(struct unit *punit, struct pf_path **path)
static adv_want find_something_to_bomb(struct ai_type *ait, struct unit *punit, struct pf_path **path, struct tile **pptile)
void dai_manage_airunit(struct ai_type *ait, struct player *pplayer, struct unit *punit)
static int regen_turns(struct unit *punit, struct tile *ptile, int lost_hp)
bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, bool allow_gold_upkeep)
static bool dai_should_we_air_attack_tile(struct ai_type *ait, struct unit *punit, struct tile *ptile)
static struct tile * dai_find_strategic_airbase(struct ai_type *ait, struct unit *punit, struct pf_path **path)
static adv_want dai_evaluate_tile_for_air_attack(struct unit *punit, struct tile *dst_tile)
static struct ai_city * def_ai_city_data(const struct city *pcity, struct ai_type *deftype)
static struct unit_ai * def_ai_unit_data(const struct unit *punit, struct ai_type *deftype)
adv_want kill_desire(adv_want benefit, int attack, int loss, int vuln, int victim_count)
int build_cost_balanced(const struct unit_type *punittype)
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
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
#define fc_assert_ret(condition)
#define log_debug(message,...)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
bool map_is_known(const struct tile *ptile, const struct player *pplayer)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
void pf_path_destroy(struct pf_path *path)
struct pf_map * pf_map_new(const struct pf_parameter *parameter)
struct pf_path * pf_map_path(struct pf_map *pfm, struct tile *ptile)
void pf_map_destroy(struct pf_map *pfm)
#define pf_map_move_costs_iterate_end
#define pf_map_move_costs_iterate(ARG_pfm, NAME_tile, NAME_cost, COND_from_start)
bool player_knows_techs_with_flag(const struct player *pplayer, enum tech_flag_id flag)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
#define UNIT_LOG(loglevel, punit, msg,...)
enum unit_activity activity
struct city * tile_city(const struct tile *ptile)
const struct unit_type * utype
bool unit_type_is_losing_hp(const struct player *pplayer, const struct unit_type *punittype)
int hp_gain_coord(const struct unit *punit)
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)
void unit_tile_set(struct unit *punit, struct tile *ptile)
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define CHECK_UNIT(punit)
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
const struct unit_type * unit_type_get(const struct unit *punit)
int utype_upkeep_cost(const struct unit_type *ut, struct player *pplayer, Output_type_id otype)
const char * unit_rule_name(const struct unit *punit)
int unit_build_shield_cost_base(const struct unit *punit)
int utype_pays_mp_for_action_estimate(const struct civ_map *nmap, const struct action *paction, const struct unit_type *putype, const struct player *act_player, const struct tile *act_tile, const struct tile *tgt_tile)
const char * utype_rule_name(const struct unit_type *punittype)
bool unit_can_take_over(const struct unit *punit)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define unit_type_iterate(_p)
#define unit_type_iterate_end