100#define SPECLIST_TAG unit_move_data
102#define unit_move_data_list_iterate(_plist, _pdata) \
103 TYPED_LIST_ITERATE(struct unit_move_data, _plist, _pdata)
104#define unit_move_data_list_iterate_end LIST_ITERATE_END
105#define unit_move_data_list_iterate_rev(_plist, _pdata) \
106 TYPED_LIST_ITERATE_REV(struct unit_move_data, _plist, _pdata)
107#define unit_move_data_list_iterate_rev_end LIST_ITERATE_REV_END
118#define SPECLIST_TAG autoattack_prob
119#define SPECLIST_TYPE struct autoattack_prob
122#define autoattack_prob_list_iterate_safe(autoattack_prob_list, _aap_, \
124 TYPED_LIST_ITERATE(struct autoattack_prob, autoattack_prob_list, _aap_) \
125 struct unit *_unit_ = game_unit_by_number(_aap_->unit_id); \
127 if (_unit_ == NULL) { \
131#define autoattack_prob_list_iterate_safe_end LIST_ITERATE_END
159 const struct tile *ptile);
307 *att_hp = attacker->
hp;
308 *def_hp = defender->
hp;
312 log_verbose(
"attack:%d, defense:%d, attack firepower:%d, "
335 *att_hp > 0 && *def_hp > 0
360 int *att_hp,
int *def_hp,
372 *att_hp = attacker->
hp;
373 *def_hp = defender->
hp;
377 log_verbose(
"attack:%d, defense:%d, attack firepower:%d, "
408 if (attacker->
hp <= 0 || defender->
hp <= 0
414 if (attacker->
hp > 0) {
417 if (defender->
hp > 0) {
456 _(
"%s was upgraded for free to %s."),
502 "because it was not supported by a city."),
506 _(
"Your %s has run out of hit points."),
556 log_error(
"rescue plane: unit %d died enroute!",
id);
561 log_debug(
"rescue plane: unit %d could not move to "
581 _(
"Your %s has returned to refuel."),
766 _(
"Your %s became more experienced and achieved the rank "
786 _(
"%s converted to %s."),
792 _(
"%s cannot be converted."),
805 _(
"Orders for %s aborted because activity "
806 "is no longer available."),
938 if (pextra !=
NULL) {
949 if (pextra !=
NULL) {
1001 if (
punit2->activity == activity
1089 && *target ==
NULL) {
1188 int move_cost,
bool verbose)
1193 log_verbose(
"Teleported %s %s from (%d,%d) to %s",
1199 _(
"Teleported your %s to %s."),
1207 if (move_cost == -1) {
1256 tiles[count++] = ptile;
1266 _(
"Moved your %s."),
1293 _(
"Disbanded your %s."),
1352 "Failed to throw %s %d from %s %d (%d, %d)",
1489 const struct player *pplayer,
1531 const struct player *pplayer,
1807#if defined(FREECIV_DEBUG) && !defined(FREECIV_NDEBUG)
1864 _(
"Unable to defend %s, %s has lost the game."),
1868 _(
"Losing %s meant losing the game! "
1869 "Be more careful next time!"),
1925 _(
"%s lost when %s was lost."),
2036 killer->score.units_killed++;
2179 _(
"%s escaped the destruction of %s, and fled to %s."),
2205#ifndef FREECIV_NDEBUG
2229#ifndef FREECIV_NDEBUG
2247#ifndef FREECIV_NDEBUG
2338 if (
pkiller->moves_left <=
vunit->moves_left - move_cost
2382 PL_(
"Your attacking %s succeeded against %s "
2383 "(and %d other unit)!",
2384 "Your attacking %s succeeded against %s "
2385 "(and %d other units)!",
unitcount - 1),
2392 PL_(
"Your attacking %s succeeded against the %s %s "
2393 "(and %d other unit)!",
2394 "Your attacking %s succeeded against the %s %s "
2395 "(and %d other units)!",
unitcount - 1),
2422 _(
"%s lost to an attack by %s."),
2429 _(
"%s lost to an attack by the %s %s."),
2443 _(
"%s lost when %s attacked %s."),
2452 _(
"%s lost when the %s %s attacked %s."),
2464 _(
"%s lost when %s attacked the %s %s."),
2474 _(
"%s lost when the %s %s attacked the %s %s."),
2493 _(
"%s (and %s) lost to an attack from %s."),
2502 _(
"%s (and %s) lost to an attack from the %s %s."),
2515 PL_(
"%s and %d other unit lost to an attack "
2517 "%s and %d other units lost to an attack "
2528 PL_(
"%s and %d other unit lost to an attack "
2530 "%s and %d other units lost to an attack "
2531 "from the %s %s.",
others),
2546 PL_(
"%d unit lost when %s attacked %s.",
2547 "%d units lost when %s attacked %s.",
2558 PL_(
"%d unit lost when the %s %s attacked %s.",
2559 "%d units lost when the %s %s attacked %s.",
2573 PL_(
"%d unit lost when %s attacked the %s %s.",
2574 "%d units lost when %s attacked the %s %s.",
2586 PL_(
"%d unit lost when the %s %s attacked the %s %s.",
2587 "%d units lost when the %s %s attacked the %s %s.",
2609 PL_(
"%d unit escaped from attack by %s",
2610 "%d units escaped from attack by %s",
2617 PL_(
"%d unit escaped from attack by %s %s",
2618 "%d units escaped from attack by %s %s",
2662 PL_(
"%d Barbarian leader captured.",
2663 "%d Barbarian leaders captured.",
2667 PL_(
"%d gold ransom paid.",
2668 "%d gold ransom paid.",
2707 _(
"%s %s collected ransom of %s."),
2713 PL_(
"%s %s collected ransom of %s and %d other unit.",
2714 "%s %s collected ransom of %s and %d other units.",
2879 const struct player *powner;
2899 if (pplayer ==
NULL) {
2900 if (
pconn->observer) {
2903 }
else if (pplayer == powner) {
2927 if (
NULL == pplayer && !
pconn->observer) {
2964 _(
"Your %s was nuked by %s."),
2971 _(
"The %s %s was nuked."),
2986 _(
"%s was nuked by %s."),
2992 if (
owner != pplayer) {
3005 _(
"%s was destroyed by the nuke."),
3007 if (
owner != pplayer) {
3009 _(
"Your nuke destroyed %s."),
3058 _(
"The %s detonated a nuke!"),
3073 _(
"%s transported successfully."),
3161 _(
"This unit cannot paradrop into %s."),
3173 _(
"%s cannot conquer a city with \"%s\"."),
3188 _(
"Cannot attack unless you declare war first."));
3202 _(
"Your %s paradropped into the %s and was lost."),
3223 _(
"Your %s was killed by enemy units at the "
3224 "paradrop destination."),
3311 PL_(
"You found %d gold.",
3312 "You found %d gold.",
cred),
cred);
3318 _(
"An abandoned village is here."));
3321 _(
"Your %s has been killed by barbarians!"),
3603#ifdef REALLY_DEBUG_THIS
3604 log_test(
"AA %s -> %s (%d,%d) %.2f > %.2f && > %.2f",
3615#ifdef REALLY_DEBUG_THIS
3616 log_test(
"!AA %s -> %s (%d,%d) %.2f > %.2f && > %.2f",
3688 && radius_sq >= distance_sq
3712 _(
"Orders for %s aborted after enemy movement was "
3731 struct tile *src_tile,
3904 "Unit number %d (%p) was going to die, but "
3905 "server attempts to move it.",
3908 "Unit number %d (%p) has done an incomplete move.",
3912 pdata->ref_count = 1;
3917 pdata->powner = powner;
3942#ifndef FREECIV_NDEBUG
3983 "Unit number %d (%p) has done an incomplete move.",
3987 if (
pdata->ref_count == 0) {
4207 if (
pconn->observer) {
4241 if (
pconn->observer) {
4463 bool cancel =
FALSE;
4554 log_debug(
" stopping because we're done this turn");
4562 _(
"Orders for %s aborted as there are units nearby."),
4569 log_debug(
" stopping because we ran a round");
4584 switch (order.
order) {
4589 log_debug(
" stopping because of no more move points");
4595 log_debug(
" stopping. Not enough move points this turn");
4622 switch (order.
order) {
4650 _(
"Orders for %s aborted since they "
4651 "give an invalid activity."),
4660 _(
"Orders for %s aborted since they "
4661 "give an invalid location."),
4671 _(
"Orders for %s aborted as there "
4672 "are units in the way."),
4688 log_debug(
" orders resulted in combat.");
4716 _(
"Orders for %s aborted because of failed move."),
4842 log_error(
"Invalid action target kind");
4857 _(
"%s could not do %s to %s."),
4895 _(
"Orders for %s aborted because "
4896 "doing %s to %s failed."),
4919 _(
"Your %s has invalid orders."),
4926 log_debug(
" stopping because orders are complete");
4960 log_error(
"Unsupported vision layer variant: %d.", vlayer);
4969 const struct tile *ptile)
5053 ftc_server,
_(
"Your unit may not act for another %s "
5054 "this turn. See /help unitwaittime."),
buf);
5121 for (
n = 8;
n > 0 && !moved;
n--) {
5165 dirs[choice] = dirs[
n - 1];
5181 struct tile *ptile,
struct player *pplayer) {
bool action_mp_full_makes_legal(const struct unit *actor, const action_id act_id)
const char * action_id_name_translation(action_id act_id)
bool action_prob_possible(const struct act_prob probability)
const char * action_name_translation(const struct action *paction)
struct act_prob action_prob_vs_tile(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
const char * action_rule_name(const struct action *action)
enum action_sub_target_kind action_get_sub_target_kind(const struct action *paction)
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)
struct act_prob action_prob_vs_extras(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
struct act_prob action_prob_self(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id)
struct act_prob action_prob_vs_city(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct city *target_city)
bool action_id_exists(const action_id act_id)
int action_prob_cmp_pessimist(const struct act_prob ap1, const struct act_prob ap2)
struct act_prob action_prob_vs_stack(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile)
bool is_action_enabled_unit_on_self(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit)
struct act_prob action_prob_vs_unit(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct unit *target_unit)
double action_prob_to_0_to_1_pessimist(const struct act_prob ap)
static struct action * action_by_number(action_id act_id)
#define action_has_result(_act_, _res_)
#define action_id_get_act_time(act_id, actor_unit, tgt_tile, tgt_extra)
#define ACTPROB_IMPOSSIBLE
#define action_id_get_target_kind(act_id)
#define action_id_has_result_safe(act_id, result)
bool actres_removes_extra(enum action_result result, const struct extra_type *pextra)
bool actres_creates_extra(enum action_result result, const struct extra_type *pextra)
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
#define CALL_FUNC_EACH_AI(_func,...)
#define CALL_PLR_AI_FUNC(_func, _player,...)
enum unit_move_result manage_auto_explorer(struct unit *punit)
void adv_unit_new_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
void dbv_to_bv(unsigned char *dest, const struct dbv *src)
#define BV_ISSET(bv, bit)
bool is_friendly_city_near(const struct civ_map *nmap, const struct player *owner, const struct tile *ptile, int distance)
const char * city_name_get(const struct city *pcity)
bool city_exists_within_max_city_map(const struct civ_map *nmap, const struct tile *ptile, bool may_be_on_center)
static bool is_non_allied_city_tile(const struct tile *ptile, const struct player *pplayer)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
static bool is_enemy_city_tile(const struct tile *ptile, const struct player *pplayer)
static citizens city_size_get(const struct city *pcity)
static bool is_allied_city_tile(const struct tile *ptile, const struct player *pplayer)
#define output_type_iterate(output)
#define city_owner(_pcity_)
#define city_list_iterate_end
#define output_type_iterate_end
bool city_reduce_size(struct city *pcity, citizens pop_loss, struct player *destroyer, const char *reason)
bool city_refresh(struct city *pcity)
double unit_win_chance(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, const struct action *paction)
bool is_unit_reachable_at(const struct unit *defender, const struct unit *attacker, const struct tile *location)
bool is_stack_vulnerable(const struct tile *ptile)
int get_virtual_defense_power(const struct civ_map *nmap, const struct unit_type *att_type, const struct unit_type *def_type, struct player *def_player, struct tile *ptile, bool fortified, int veteran)
int unit_bombard_rate(struct unit *punit)
int get_total_defense_power(const struct unit *attacker, const struct unit *defender)
int get_total_attack_power(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)
void get_modified_firepower(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, int *att_fp, int *def_fp)
struct player * conn_get_player(const struct connection *pconn)
void conn_list_do_unbuffer(struct conn_list *dest)
void conn_list_do_buffer(struct conn_list *dest)
bool conn_is_global_observer(const struct connection *pconn)
#define conn_list_iterate(connlist, pconn)
#define conn_list_iterate_end
static void base(QVariant data1, QVariant data2)
static void enter_hut(QVariant data1, QVariant data2)
static void frighten_hut(QVariant data1, QVariant data2)
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)
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct req_context *other_context, enum effect_type effect_type)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
#define ACT_TIME_INSTANTANEOUS
#define IDENTITY_NUMBER_ZERO
#define PL_(String1, String2, n)
const char * tile_link(const struct tile *ptile)
const struct ft_color ftc_server
const char * city_link(const struct city *pcity)
const char * unit_link(const struct unit *punit)
const char * unit_tile_link(const struct unit *punit)
int current_turn_timeout(void)
void game_remove_unit(struct world *gworld, struct unit *punit)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
void increase_timeout_because_unit_moved(void)
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
void idex_register_unit(struct world *iworld, struct unit *punit)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define fc_assert_exit_msg(condition, message,...)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
#define log_error(message,...)
int sq_map_distance(const struct tile *tile0, const struct tile *tile1)
bool is_safe_ocean(const struct civ_map *nmap, const struct tile *ptile)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
struct tile * mapstep(const struct civ_map *nmap, const struct tile *ptile, enum direction8 dir)
bool base_get_direction_for_step(const struct civ_map *nmap, const struct tile *start_tile, const struct tile *end_tile, enum direction8 *dir)
#define square_iterate(nmap, center_tile, radius, tile_itr)
#define adjc_iterate(nmap, center_tile, itr_tile)
#define square_iterate_end
static int map_move_cost_unit(const struct civ_map *nmap, struct unit *punit, const struct tile *ptile)
#define circle_iterate(nmap, center_tile, sq_radius, tile_itr)
#define circle_iterate_end
void vision_clear_sight(struct vision *vision)
void destroy_extra(struct tile *ptile, struct extra_type *pextra)
void bounce_units_on_terrain_change(struct tile *ptile)
void tile_claim_bases(struct tile *ptile, struct player *powner)
void create_extra(struct tile *ptile, struct extra_type *pextra, struct player *pplayer)
void tile_change_side_effects(struct tile *ptile, bool refresh_city)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
void map_show_circle(struct player *pplayer, struct tile *ptile, int radius_sq)
void update_tile_knowledge(struct tile *ptile)
void check_terrain_change(struct tile *ptile, struct terrain *oldter)
struct player_tile * map_get_player_tile(const struct tile *ptile, const struct player *pplayer)
void vision_change_sight(struct vision *vision, const v_radius_t radius_sq)
#define map_get_player_site(_ptile_, _pplayer_)
bool can_exist_at_tile(const struct civ_map *nmap, const struct unit_type *utype, const struct tile *ptile)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
bool is_native_tile(const struct unit_type *punittype, const struct tile *ptile)
int unit_move_rate(const struct unit *punit)
bool unit_could_load_at(const struct unit *punit, const struct tile *ptile)
bool is_native_to_class(const struct unit_class *punitclass, const struct terrain *pterrain, const bv_extras *extras)
bool can_unit_survive_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
static mpqt_worker * worker
static const char * name_translation_get(const struct name_translation *ptrans)
const char * nation_rule_name(const struct nation_type *pnation)
struct nation_type * nation_of_unit(const struct unit *punit)
const char * nation_adjective_for_player(const struct player *pplayer)
const char * nation_plural_for_player(const struct player *pplayer)
void notify_player(const struct player *pplayer, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void notify_conn(struct conn_list *dest, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
int send_packet_unit_remove(struct connection *pc, const struct packet_unit_remove *packet)
void lsend_packet_unit_remove(struct conn_list *dest, const struct packet_unit_remove *packet)
void dlsend_packet_unit_remove(struct conn_list *dest, int unit_id)
int send_packet_unit_short_info(struct connection *pc, const struct packet_unit_short_info *packet, bool force_to_send)
int send_packet_unit_info(struct connection *pc, const struct packet_unit_info *packet)
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)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
struct player * player_by_number(const int player_id)
bool can_player_see_unit_at(const struct player *pplayer, const struct unit *punit, const struct tile *ptile, bool is_transported)
int player_slot_count(void)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
bool can_player_see_unit(const struct player *pplayer, const struct unit *punit)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
int player_index(const struct player *pplayer)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
struct player_slot * slots
bool pplayers_non_attack(const struct player *pplayer, const struct player *pplayer2)
#define players_iterate_end
#define players_iterate(_pplayer)
static bool is_barbarian(const struct player *pplayer)
void player_update_last_war_action(struct player *pplayer)
void player_status_add(struct player *plr, enum player_status pstatus)
void maybe_make_contact(struct tile *ptile, struct player *pplayer)
void send_player_info_c(struct player *src, struct conn_list *dest)
struct conn_list * player_reply_dest(struct player *pplayer)
void player_loot_player(struct player *pvictor, struct player *pvictim)
#define phase_players_iterate(pplayer)
#define phase_players_iterate_end
bool are_reqs_active(const struct req_context *context, const struct req_context *other_context, const struct requirement_vector *reqs, const enum req_problem_type prob_type)
void script_server_signal_emit(const char *signal_name,...)
void script_server_remove_exported_object(void *object)
void format_time_duration(time_t t, char *buf, int maxlen)
#define CLIP(lower, current, upper)
int identity_number(void)
struct player * random_move_time
struct conn_list * est_connections
struct packet_game_info info
int autoupgrade_veteran_loss
struct civ_game::@32::@36 server
enum gameloss_style gameloss_style
enum goods_selection_method goods_selection
enum happyborders_type happyborders
int nuke_defender_survival_chance_pct
bool only_real_fight_makes_veteran
enum airlifting_style airlifting_style
bool only_killing_makes_veteran
bool combat_odds_scaled_veterancy
enum action_decision action_decision_want
struct unit_order orders[MAX_LEN_ROUTE]
enum unit_activity activity
enum unit_activity changed_from
enum server_side_agent ssa_controller
struct conn_list * connections
struct player::@73::@75 server
struct player_economic economic
struct player_score score
const struct player * player
struct vision * old_vision
enum unit_activity activity
enum action_decision action_decision_want
enum unit_activity activity
struct extra_type * changed_from_target
struct unit::@84::@87 server
struct extra_type * activity_target
enum unit_activity changed_from
struct player * nationality
void(* removal_callback)(struct unit *punit)
struct unit_move_data * moving
struct goods_type * carrying
struct tile * action_decision_tile
const struct unit_type * utype
enum server_side_agent ssa_controller
#define sz_strlcpy(dest, src)
const char * terrain_name_translation(const struct terrain *pterrain)
struct extra_type * get_preferred_pillage(bv_extras extras)
void tile_add_extra(struct tile *ptile, const struct extra_type *pextra)
bool tile_has_claimable_base(const struct tile *ptile, const struct unit_type *punittype)
bool tile_apply_activity(struct tile *ptile, Activity_type_id act, struct extra_type *tgt)
int tile_extras_defense_bonus(const struct tile *ptile, const struct unit_type *punittype)
int tile_activity_time(enum unit_activity activity, const struct tile *ptile, const struct extra_type *tgt)
int tile_has_not_aggressive_extra_for_unit(const struct tile *ptile, const struct unit_type *punittype)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
static const bv_extras * tile_extras(const struct tile *ptile)
#define tile_continent(_tile)
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
struct goods_type * goods_from_city_to_unit(const struct city *src, const struct unit *punit)
Goods_type_id goods_index(const struct goods_type *pgood)
int get_transporter_occupancy(const struct unit *ptrans)
void free_unit_orders(struct unit *punit)
bool unit_is_alive(int id)
int get_activity_rate_this_turn(const struct unit *punit)
bool unit_transport_load(struct unit *pcargo, struct unit *ptrans, bool force)
struct player * unit_nationality(const struct unit *punit)
struct unit * unit_transport_get(const struct unit *pcargo)
bool unit_transport_unload(struct unit *pcargo)
int unit_gain_hitpoints(const struct unit *punit)
bool can_unit_continue_current_activity(const struct civ_map *nmap, struct unit *punit)
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
bool can_unit_do_activity(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity)
void unit_virtual_destroy(struct unit *punit)
void unit_tile_set(struct unit *punit, struct tile *ptile)
void set_unit_activity(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
enum unit_upgrade_result unit_upgrade_test(const struct civ_map *nmap, const struct unit *punit, bool is_free)
bool unit_transported(const struct unit *pcargo)
bool can_unit_unload(const struct unit *pcargo, const struct unit *ptrans)
struct unit_list * unit_transport_cargo(const struct unit *ptrans)
bool unit_has_orders(const struct unit *punit)
struct unit * transporter_for_unit(const struct unit *pcargo)
bool unit_can_convert(const struct civ_map *nmap, const struct unit *punit)
bool activity_requires_target(enum unit_activity activity)
struct unit * tile_non_allied_unit(const struct tile *ptile, const struct player *pplayer, bool everyone_non_allied)
bool can_unit_do_activity_targeted(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity, struct extra_type *target)
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define unit_cargo_iterate_end
static bool is_allied_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define unit_cargo_iterate(_ptrans, _pcargo)
#define CHECK_UNIT(punit)
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer, bool everyone_non_allied)
void illegal_action_msg(struct player *pplayer, const enum event_type event, struct unit *actor, const action_id stopped_action, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
bool unit_perform_action(struct player *pplayer, const int actor_id, const int target_id, const int sub_tgt_id_incoming, const char *name, const action_id action_type, const enum action_requester requester)
bool unit_move_handling(struct unit *punit, struct tile *pdesttile, bool move_do_not_act)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_safe(unitlist, _unit)
#define unit_list_iterate_end
#define unit_list_iterate_safe_end
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
bool can_player_build_unit_direct(const struct player *p, const struct unit_type *punittype, bool consider_reg_impr_req)
struct unit_type * get_role_unit(int role, int role_index)
const char * unit_rule_name(const struct unit *punit)
const struct veteran_system * utype_veteran_system(const struct unit_type *punittype)
int num_role_units(int role)
bool utype_player_already_has_this_unique(const struct player *pplayer, const struct unit_type *putype)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
struct unit_class * unit_class_get(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
const struct veteran_level * vsystem_veteran_level(const struct veteran_system *vsystem, int level)
Unit_type_id utype_number(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
#define utype_fuel(ptype)
static bool utype_has_flag(const struct unit_type *punittype, int flag)
struct vision * vision_new(struct player *pplayer, struct tile *ptile)
void vision_free(struct vision *vision)
#define V_RADIUS(main_sq, invis_sq, subs_sq)
#define vision_site_owner(v)
short int v_radius_t[V_COUNT]