114 ,
"%s waits at %d,%d for no visible profit",
283 "ending move early to stay out of trouble");
386 int moves_left,
int hp)
467 if ((a * a * 10) >= d) {
482 const struct player *pplayer)
554 const double value =
risk_cost->base_value
598 const double fearfulness)
int action_number(const struct action *action)
bool is_action_enabled_unit_on_tile(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile, const struct extra_type *target_extra)
bool is_action_enabled_unit_on_unit(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct unit *target_unit)
static struct action * action_by_number(action_id act_id)
#define action_has_result(_act_, _res_)
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
int adv_unit_def_rating_basic_squared(const struct unit *punit)
static int stack_value(const struct tile *ptile, const struct player *pplayer)
int adv_unit_def_rating_basic(const struct unit *punit)
static unsigned prefer_short_stacks(const struct tile *ptile, enum known_type known, const struct pf_parameter *param)
static unsigned stack_risk(const struct tile *ptile, struct adv_risk_cost *risk_cost, const struct pf_parameter *param)
bool adv_danger_at(struct unit *punit, struct tile *ptile)
static bool adv_unit_move(struct unit *punit, struct tile *ptile)
static double chance_killed_at(const struct tile *ptile, struct adv_risk_cost *risk_cost, const struct pf_parameter *param)
int adv_unittype_att_rating(const struct unit_type *punittype, int veteran, int moves_left, int hp)
int adv_unit_att_rating(const struct unit *punit)
static bool adv_could_be_my_zoc(struct unit *punit, struct tile *ptile)
int adv_could_unit_move_to_tile(struct unit *punit, struct tile *dest_tile)
void adv_avoid_risks(struct pf_parameter *parameter, struct adv_risk_cost *risk_cost, struct unit *punit, const double fearfulness)
bool adv_unit_execute_path(struct unit *punit, struct pf_path *path)
#define CALL_PLR_AI_FUNC(_func, _player,...)
static bool is_non_allied_city_tile(const struct tile *ptile, const struct player *pplayer)
static bool is_enemy_city_tile(const struct tile *ptile, const struct player *pplayer)
#define city_owner(_pcity_)
bool is_stack_vulnerable(const struct tile *ptile)
enum unit_attack_result unit_attack_units_at_tile_result(const struct unit *punit, const struct action *paction, const struct tile *ptile)
int base_get_attack_power(const struct unit_type *punittype, int veteran, int moves_left)
enum unit_attack_result unit_attack_unit_at_tile_result(const struct unit *punit, const struct action *paction, const struct unit *pdefender, const struct tile *dest_tile)
int base_get_defense_power(const 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 * 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
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 unit * game_unit_by_number(int id)
#define fc_assert_msg(condition, message,...)
#define fc_assert(condition)
bool is_tiles_adjacent(const struct tile *tile0, const struct tile *tile1)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
#define adjc_iterate(nmap, center_tile, itr_tile)
static int map_move_cost_unit(const struct civ_map *nmap, struct unit *punit, const struct tile *ptile)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
enum unit_move_result unit_move_to_tile_test(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity, const struct tile *src_tile, const struct tile *dst_tile, bool igzoc, bool enter_transport, struct unit *embark_to, bool enter_enemy_city)
int unit_move_rate(const struct unit *punit)
bool can_unit_survive_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
#define UNIT_LOG(loglevel, punit, msg,...)
const struct civ_map * map
const struct player * owner
unsigned(* get_EC)(const struct tile *ptile, enum known_type known, const struct pf_parameter *param)
const struct unit_type * utype
struct pf_position * positions
enum unit_activity activity
struct extra_type * activity_target
#define is_ocean_tile(ptile)
#define terrain_has_flag(terr, flag)
int tile_extras_class_defense_bonus(const struct tile *ptile, const struct unit_class *pclass)
int tile_extras_defense_bonus(const struct tile *ptile, const struct unit_type *punittype)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
int unit_pays_mp_for_action(const struct action *paction, const struct unit *punit)
struct unit * transporter_for_unit_at(const struct unit *pcargo, const struct tile *ptile)
enum gen_action activity_default_action(enum unit_activity act)
bool is_plr_zoc_srv(const struct player *pplayer, const struct tile *ptile0, const struct civ_map *zmap)
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer, bool everyone_non_allied)
bool unit_activity_handling_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target, enum gen_action trigger_action)
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
void unit_do_action(struct player *pplayer, const int actor_id, const int target_id, const int sub_tgt_id, const char *name, const action_id action_type)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
bool utype_is_moved_to_tgt_by_action(const struct action *paction, const struct unit_type *utype)
const char * unit_rule_name(const struct unit *punit)
int unit_build_shield_cost_base(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
#define utype_fuel(ptype)
static bool utype_has_flag(const struct unit_type *punittype, int flag)