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);
256 }
else if (!settler) {
303 *att_hp = attacker->
hp;
304 *def_hp = defender->
hp;
308 log_verbose(
"attack:%d, defense:%d, attack firepower:%d, "
331 *att_hp > 0 && *def_hp > 0
356 int *att_hp,
int *def_hp,
368 *att_hp = attacker->
hp;
369 *def_hp = defender->
hp;
373 log_verbose(
"attack:%d, defense:%d, attack firepower:%d, "
404 if (attacker->
hp <= 0 || defender->
hp <= 0
410 if (attacker->
hp > 0) {
413 if (defender->
hp > 0) {
452 _(
"%s was upgraded for free to %s."),
498 "because it was not supported by a city."),
502 _(
"Your %s has run out of hit points."),
552 log_error(
"rescue plane: unit %d died enroute!",
id);
557 log_debug(
"rescue plane: unit %d could not move to "
577 _(
"Your %s has returned to refuel."),
762 _(
"Your %s became more experienced and achieved the rank "
782 _(
"%s converted to %s."),
788 _(
"%s cannot be converted."),
801 _(
"Orders for %s aborted because activity "
802 "is no longer available."),
934 if (pextra !=
NULL) {
945 if (pextra !=
NULL) {
997 if (
punit2->activity == activity
1085 && *target ==
NULL) {
1184 int move_cost,
bool verbose)
1189 log_verbose(
"Teleported %s %s from (%d,%d) to %s",
1195 _(
"Teleported your %s to %s."),
1203 if (move_cost == -1) {
1251 tiles[count++] = ptile;
1261 _(
"Moved your %s."),
1288 _(
"Disbanded your %s."),
1347 "Failed to throw %s %d from %s %d (%d, %d)",
1482 const struct player *pplayer,
1524 const struct player *pplayer,
1799#if defined(FREECIV_DEBUG) && !defined(FREECIV_NDEBUG)
1856 _(
"Unable to defend %s, %s has lost the game."),
1860 _(
"Losing %s meant losing the game! "
1861 "Be more careful next time!"),
1917 _(
"%s lost when %s was lost."),
2028 killer->score.units_killed++;
2164 if (pcity !=
NULL) {
2171 _(
"%s escaped the destruction of %s, and fled to %s."),
2197#ifndef FREECIV_NDEBUG
2221#ifndef FREECIV_NDEBUG
2239#ifndef FREECIV_NDEBUG
2326 if (
pkiller->moves_left <=
vunit->moves_left - move_cost
2369 PL_(
"Your attacking %s succeeded against the %s %s "
2370 "(and %d other unit)!",
2371 "Your attacking %s succeeded against the %s %s "
2372 "(and %d other units)!",
unitcount - 1),
2396 _(
"%s lost to an attack by the %s %s."),
2406 _(
"%s lost when the %s %s attacked the %s %s."),
2422 _(
"%s (and %s) lost to an attack from the %s %s."),
2433 PL_(
"%s and %d other unit lost to an attack "
2435 "%s and %d other units lost to an attack "
2436 "from the %s %s.",
others),
2448 PL_(
"%d unit lost when the %s %s attacked the %s %s.",
2449 "%d units lost when the %s %s attacked the %s %s.",
2468 PL_(
"%d unit escaped from attack by %s %s",
2469 "%d units escaped from attack by %s %s",
2513 PL_(
"%d Barbarian leader captured.",
2514 "%d Barbarian leaders captured.",
2518 PL_(
"%d gold ransom paid.",
2519 "%d gold ransom paid.",
2558 _(
"%s %s collected ransom of %s."),
2564 PL_(
"%s %s collected ransom of %s and %d other unit.",
2565 "%s %s collected ransom of %s and %d other units.",
2724 const struct player *powner;
2744 if (pplayer ==
NULL) {
2745 if (
pconn->observer) {
2748 }
else if (pplayer == powner) {
2772 if (
NULL == pplayer && !
pconn->observer) {
2809 _(
"Your %s was nuked by %s."),
2816 _(
"The %s %s was nuked."),
2831 _(
"%s was nuked by %s."),
2837 if (
owner != pplayer) {
2850 _(
"%s was destroyed by the nuke."),
2852 if (
owner != pplayer) {
2854 _(
"Your nuke destroyed %s."),
2903 _(
"The %s detonated a nuke!"),
2918 _(
"%s transported successfully."),
2986 const struct city *pcity;
3006 _(
"This unit cannot paradrop into %s."),
3018 _(
"%s cannot conquer a city with \"%s\"."),
3033 _(
"Cannot attack unless you declare war first."));
3047 _(
"Your %s paradropped into the %s and was lost."),
3067 _(
"Your %s was killed by enemy units at the "
3068 "paradrop destination."),
3075 if (pcity !=
NULL) {
3155 PL_(
"You found %d gold.",
3156 "You found %d gold.",
cred),
cred);
3162 _(
"An abandoned village is here."));
3165 _(
"Your %s has been killed by barbarians!"),
3443#ifdef REALLY_DEBUG_THIS
3444 log_test(
"AA %s -> %s (%d,%d) %.2f > %.2f && > %.2f",
3455#ifdef REALLY_DEBUG_THIS
3456 log_test(
"!AA %s -> %s (%d,%d) %.2f > %.2f && > %.2f",
3552 _(
"Orders for %s aborted after enemy movement was "
3571 struct tile *src_tile,
3744 "Unit number %d (%p) was going to die, but "
3745 "server attempts to move it.",
3748 "Unit number %d (%p) has done an incomplete move.",
3752 pdata->ref_count = 1;
3757 pdata->powner = powner;
3782#ifndef FREECIV_NDEBUG
3823 "Unit number %d (%p) has done an incomplete move.",
3827 if (
pdata->ref_count == 0) {
4047 if (
pconn->observer) {
4081 if (
pconn->observer) {
4300 bool cancel =
FALSE;
4390 log_debug(
" stopping because we're done this turn");
4398 _(
"Orders for %s aborted as there are units nearby."),
4405 log_debug(
" stopping because we ran a round");
4420 switch (order.
order) {
4425 log_debug(
" stopping because of no more move points");
4431 log_debug(
" stopping. Not enough move points this turn");
4458 switch (order.
order) {
4486 _(
"Orders for %s aborted since they "
4487 "give an invalid activity."),
4496 _(
"Orders for %s aborted since they "
4497 "give an invalid location."),
4507 _(
"Orders for %s aborted as there "
4508 "are units in the way."),
4524 log_debug(
" orders resulted in combat.");
4552 _(
"Orders for %s aborted because of failed move."),
4678 log_error(
"Invalid action target kind");
4693 _(
"%s could not do %s to %s."),
4731 _(
"Orders for %s aborted because "
4732 "doing %s to %s failed."),
4755 _(
"Your %s has invalid orders."),
4762 log_debug(
" stopping because orders are complete");
4796 log_error(
"Unsupported vision layer variant: %d.", vlayer);
4805 const struct tile *ptile)
4889 ftc_server,
_(
"Your unit may not act for another %s "
4890 "this turn. See /help unitwaittime."),
buf);
4957 for (
n = 8;
n > 0 && !moved;
n--) {
5001 dirs[choice] = dirs[
n - 1];
const char * action_name_translation(const struct action *action)
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)
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)
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
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct player *other_player, enum effect_type effect_type)
int get_unit_bonus(const struct unit *punit, 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 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 player *other_player, 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 unit_list * units_supported
struct player * random_move_time
struct conn_list * est_connections
struct packet_game_info info
int autoupgrade_veteran_loss
struct civ_game::@31::@35 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_economic economic
struct player_score score
struct player::@70::@72 server
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::@81::@84 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(struct city *src, struct unit *punit)
Goods_type_id goods_index(const struct goods_type *pgood)
struct unit * tile_non_allied_unit(const struct tile *ptile, const struct player *pplayer)
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)
void set_unit_activity(struct unit *punit, enum unit_activity new_activity)
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)
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)
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)
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)
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]