131 struct tile *ptile,
const char *
name,
180 const int *
list,
int n,
const struct tile *ptile);
195 log_verbose(
"handle_unit_type_upgrade() invalid unit type %d",
uti);
202 _(
"Illegal packet, can't upgrade %s (yet)."),
235 PL_(
"%d %s upgraded to %s for %d gold.",
236 "%d %s upgraded to %s for %d gold.",
245 _(
"No units could be upgraded."));
270 PL_(
"%s upgraded to %s for %d gold.",
271 "%s upgraded to %s for %d gold.",
cost),
286 const int *
list,
int n,
const struct tile *ptile)
294 for (
i = 0;
i <
n;
i++) {
367 log_debug(
"capture units: already got unique unit");
370 _(
"You can only have one %s."),
391 for (
i = 0;
i <
n;
i++) {
428 _(
"Your %s succeeded in capturing the %s %s."),
437 _(
"Your %s was captured by the %s."),
450 _(
"%s lost along with control of %s."),
564 _(
"Your %s wiped the %s %s."),
570 _(
"Your %s was wiped by the %s."),
642 _(
"The %s don't have a capital to expel their %s to."),
656 _(
"Your %s succeeded in expelling the %s %s."),
661 _(
"Your %s was expelled by the %s."),
666 log_error(
"Bug in unit expulsion: unit can't teleport.");
799 _(
"Your %s heals %s %s."),
805 _(
"%s %s heals your %s."),
1328 const struct player *pplayer)
1413 (is_target ? &
enabler->target_reqs
1949 "Asked to explain why a non actor can't act.");
1952 _(
"Unit cannot do anything."));
1956 _(
"Your %s found no suitable target."),
1966 _(
"Your %s found no suitable target."),
1994 _(
"Your %s cannot act from %s. "
1995 "Only %s can act from a non livable tile."),
2004 _(
"Unit cannot act from %s."),
2012 _(
"Unit cannot act against %s."),
2017 _(
"This unit is being transported, and"
2018 " so cannot act."));
2022 _(
"This unit cannot act when it isn't being "
2027 _(
"This unit is transporting, and"
2028 " so cannot act."));
2032 _(
"This unit cannot act when it isn't transporting."));
2036 _(
"This unit has a home city, and so cannot act."));
2040 _(
"This unit cannot act unless it has a home city."));
2044 _(
"You must declare war on %s first. Try using "
2045 "the Nations report"
2054 _(
"You must break peace with %s first. Try using "
2055 "the Nations report to declare war"
2064 _(
"This unit cannot act against domestic targets."));
2068 _(
"This unit cannot act against foreign targets."));
2073 _(
"%s cannot act against tiles with non allied units."),
2079 _(
"%s %s cannot act."),
2086 _(
"This unit cannot act against %s targets."),
2091 _(
"This unit has too few moves left to act."));
2095 _(
"This unit cannot act against city centers."));
2099 _(
"This unit cannot act against non city centers."));
2103 _(
"This unit cannot act against claimed tiles."));
2107 _(
"This unit cannot act against unclaimed tiles."));
2111 _(
"This unit is too near its target to act."));
2115 _(
"This unit is too far away from its target to act."));
2119 _(
"Can't perform any action this scenario permits."));
2123 _(
"Can't perform any action this close to a city."));
2128 _(
"%s can't do anything to %s. It is too big."),
2135 _(
"%s needs an improvement to grow, so "
2136 "%s cannot do anything to it."),
2143 _(
"%s don't have enough capacity, so "
2144 "%s cannot do anything."),
2151 _(
"%s can't do anything to an unknown target tile."),
2161 "Treasury contains %d gold.",
2168 PL_(
"%s can't do anything. %d gold may help. %s",
2169 "%s can't do anything. %d gold may help. %s",
2177 _(
"%s cannot move that far from the coast line."),
2182 _(
"%s cannot disembark outside of a city or a native base "
2190 _(
"%s can't do anything since there is an unreachable "
2196 _(
"%s can't do anything since there is unit with a positive "
2202 _(
"%s can't do anything since you already have a %s."),
2213 _(
"No action possible."));
2231 const int target_tile_id,
2233 const int request_kind)
2292 _(
"Target not at target tile."));
2431 target_city_id =
plrtile->site->identity;
2459 "Invalid action target kind.");
2517 _(
"Only %s can do %s."),
2525 _(
"%s can't do %s."),
2535 _(
"Your %s found no target suitable for %s."),
2543 _(
"Having your %s do %s to this target is redundant."),
2572 _(
"Your %s can't do %s from %s. "
2573 "Only %s can do %s from a non livable tile."),
2586 _(
"Your %s can't do %s from %s."),
2598 _(
"Your %s can't do %s to %s."),
2608 _(
"Your %s can't do %s while being transported."),
2617 _(
"Your %s can't do %s while not being transported."),
2626 _(
"Your %s can't do %s while transporting."),
2635 _(
"Your %s can't do %s while not transporting."),
2644 _(
"Your %s can't do %s because it has a home city."),
2653 _(
"Your %s can't do %s because it is homeless."),
2663 _(
"Your %s can't do %s while you"
2664 " aren't at war with %s."),
2676 _(
"Your %s can't do %s while you "
2677 "are at peace with %s. Try using "
2678 "the Nations report to declare war"
2693 _(
"Your %s can't do %s to domestic %s."),
2705 _(
"Your %s can't do %s to foreign %s."),
2715 _(
"Your %s can't do %s to tiles with non allied units."),
2724 _(
"%s %s can't do %s."),
2734 _(
"Your %s can't do %s to %s %s."),
2746 _(
"Your %s has too few moves left to do %s."),
2755 _(
"Your %s can't do %s to city centers."),
2765 _(
"Your %s can only do %s to city centers."),
2774 _(
"Your %s can't do %s to claimed tiles."),
2784 _(
"Your %s can't do %s to unclaimed tiles."),
2794 PL_(
"Your %s must be at least %d tile away to do %s.",
2795 "Your %s must be at least %d tiles away to do %s.",
2807 PL_(
"Your %s can't be more than %d tile away to do %s.",
2808 "Your %s can't be more than %d tiles away to do %s.",
2818 _(
"Can't do %s in this scenario."),
2825 _(
"Can't do %s this close to a city."),
2832 _(
"%s can't do %s to %s. It is too big."),
2841 _(
"%s needs an improvement to grow, so "
2842 "%s cannot do %s."),
2851 _(
"%s has no capacity to %s %s."),
2860 _(
"%s can't do %s to an unknown tile."),
2871 "Treasury contains %d gold.",
2879 PL_(
"%s can't do %s for %d gold. %s",
2880 "%s can't do %s for %d gold. %s",
2890 _(
"%s cannot move that far from the coast line."),
2897 _(
"%s cannot disembark outside of a city or a native base "
2907 _(
"Your %s can't do %s there since there's an "
2908 "unreachable unit."),
2916 _(
"Your %s can't do %s there since there's an "
2917 "unit with positive defense value."),
2924 _(
"You already have a %s."),
2934 _(
"Your %s can't do %s when %s is legal."),
2946 _(
"Your %s was unable to do %s."),
2992 "The player wasn't responsible for this.");
3030 _(
"Your %s lost %d hit points while attempting to"
3043 _(
"Your %s was killed while attempting to do %s."),
3072 _(
"Your %s lost %s MP for attempting an illegal action."),
3135 _(
"No explanation why you couldn't do %s. This is a bug."
3136 " Sorry about that. -- Sveinung"),
3146 const int target_id,
3150 actor_id, target_id,
3165 const int target_id,
3169 struct player *pplayer =
pc->playing;
3178 log_error(
"handle_unit_action_query() the action %d doesn't exist.",
3187 log_verbose(
"handle_unit_action_query() invalid actor %d",
3199 actor_id, target_id,
3201 action_type, request_kind);
3215 actor_id, target_id,
3217 action_type, request_kind);
3240 actor_id, target_id,
3279 const int target_id,
3280 const int sub_tgt_id,
3295 const int target_id,
3296 const int sub_tgt_id,
3315 const int target_id,
3333 log_error(
"unit_perform_action() the action %d doesn't exist.",
3343 log_verbose(
"unit_perform_action() invalid actor %d",
3351 if (pcity ==
NULL) {
3352 log_verbose(
"unit_perform_action() invalid target city %d",
3362 log_verbose(
"unit_perform_action() invalid target unit %d",
3375 log_verbose(
"unit_perform_action() invalid target tile %d",
3410 switch (
paction->sub_target_kind) {
3439 log_verbose(
"unit_perform_action() action %d requires action "
3440 "but extra id %d is invalid.",
3441 action_type, sub_tgt_id);
3445 if (
paction->actor.is_unit.unitwaittime_controlled
3451#define ACTION_PERFORM_UNIT_CITY(action, actor, target, action_performer) \
3453 && is_action_enabled_unit_on_city(nmap, action_type, \
3454 actor_unit, pcity)) { \
3456 script_server_signal_emit("action_started_unit_city", \
3457 action_by_number(action), actor, target); \
3458 if (!actor || !unit_is_alive(actor_id)) { \
3462 if (!target || !city_exist(target_id)) { \
3466 success = action_performer; \
3468 action_success_actor_price(paction, actor_id, actor); \
3470 script_server_signal_emit("action_finished_unit_city", \
3471 action_by_number(action), success, \
3472 unit_is_alive(actor_id) ? actor : NULL, \
3473 city_exist(target_id) ? target : NULL); \
3476 illegal_action(pplayer, actor_unit, action_type, \
3477 pcity ? city_owner(pcity) : NULL, NULL, pcity, NULL, \
3481#define ACTION_PERFORM_UNIT_SELF(action, actor, action_performer) \
3483 && is_action_enabled_unit_on_self(nmap, action_type, actor_unit)) { \
3485 script_server_signal_emit("action_started_unit_self", \
3486 action_by_number(action), actor); \
3487 if (!actor || !unit_is_alive(actor_id)) { \
3491 success = action_performer; \
3493 action_success_actor_price(paction, actor_id, actor); \
3495 script_server_signal_emit("action_finished_unit_self", \
3496 action_by_number(action), success, \
3497 unit_is_alive(actor_id) ? actor : NULL); \
3500 illegal_action(pplayer, actor_unit, action_type, \
3501 unit_owner(actor_unit), NULL, NULL, actor_unit, \
3505#define ACTION_PERFORM_UNIT_UNIT(action, actor, target, action_performer) \
3507 && is_action_enabled_unit_on_unit(nmap, action_type, actor_unit, punit)) { \
3509 script_server_signal_emit("action_started_unit_unit", \
3510 action_by_number(action), actor, target); \
3511 if (!actor || !unit_is_alive(actor_id)) { \
3515 if (!target || !unit_is_alive(target_id)) { \
3519 success = action_performer; \
3521 action_success_actor_price(paction, actor_id, actor); \
3522 action_success_target_pay_mp(paction, target_id, punit); \
3524 script_server_signal_emit("action_finished_unit_unit", \
3525 action_by_number(action), success, \
3526 unit_is_alive(actor_id) ? actor : NULL, \
3527 unit_is_alive(target_id) ? target : NULL); \
3530 illegal_action(pplayer, actor_unit, action_type, \
3531 punit ? unit_owner(punit) : NULL, NULL, NULL, punit, \
3535#define ACTION_PERFORM_UNIT_UNITS(action, actor, target, action_performer)\
3537 && is_action_enabled_unit_on_stack(nmap, action_type, \
3538 actor_unit, target_tile)) { \
3540 script_server_signal_emit("action_started_unit_units", \
3541 action_by_number(action), actor, target); \
3542 if (!actor || !unit_is_alive(actor_id)) { \
3546 success = action_performer; \
3548 action_success_actor_price(paction, actor_id, actor); \
3550 script_server_signal_emit("action_finished_unit_units", \
3551 action_by_number(action), success, \
3552 unit_is_alive(actor_id) ? actor : NULL, \
3556 illegal_action(pplayer, actor_unit, action_type, \
3557 NULL, target_tile, NULL, NULL, \
3561#define ACTION_PERFORM_UNIT_TILE(action, actor, target, action_performer) \
3563 && is_action_enabled_unit_on_tile(nmap, action_type, \
3564 actor_unit, target_tile, \
3567 script_server_signal_emit("action_started_unit_tile", \
3568 action_by_number(action), actor, target); \
3569 if (!actor || !unit_is_alive(actor_id)) { \
3573 success = action_performer; \
3575 action_success_actor_price(paction, actor_id, actor); \
3577 script_server_signal_emit("action_finished_unit_tile", \
3578 action_by_number(action), success, \
3579 unit_is_alive(actor_id) ? actor : NULL, \
3583 illegal_action(pplayer, actor_unit, action_type, \
3584 target_tile ? tile_owner(target_tile) : NULL, \
3585 target_tile, NULL, NULL, \
3589#define ACTION_PERFORM_UNIT_EXTRAS(action, actor, target, action_performer)\
3591 && is_action_enabled_unit_on_extras(nmap, action_type, \
3592 actor_unit, target_tile, \
3595 script_server_signal_emit("action_started_unit_extras", \
3596 action_by_number(action), actor, target); \
3597 if (!actor || !unit_is_alive(actor_id)) { \
3601 success = action_performer; \
3603 action_success_actor_price(paction, actor_id, actor); \
3605 script_server_signal_emit("action_finished_unit_extras", \
3606 action_by_number(action), success, \
3607 unit_is_alive(actor_id) ? actor : NULL, \
3611 illegal_action(pplayer, actor_unit, action_type, \
3612 target_tile ? target_tile->extras_owner : NULL, \
3613 target_tile, NULL, NULL, \
3617#define ACTION_PERFORM_UNIT_ANY(paction, actor, \
3618 target_city, target_unit, target_tile, \
3620 switch (action_get_target_kind(paction)) { \
3622 ACTION_PERFORM_UNIT_CITY(paction->id, actor, target_city, \
3623 action_performer); \
3626 ACTION_PERFORM_UNIT_UNIT(paction->id, actor, target_unit, \
3627 action_performer); \
3630 ACTION_PERFORM_UNIT_UNITS(paction->id, actor, target_tile, \
3631 action_performer); \
3634 ACTION_PERFORM_UNIT_TILE(paction->id, actor, target_tile, \
3635 action_performer); \
3638 ACTION_PERFORM_UNIT_EXTRAS(paction->id, actor, target_tile, \
3639 action_performer); \
3642 ACTION_PERFORM_UNIT_SELF(paction->id, actor, TRUE); \
3645 fc_assert(action_get_target_kind(paction) != ATK_COUNT); \
4122 const char *giver =
NULL;
4136 _(
"%s transferred control over a %s to you in %s."),
4177 _(
"%s added to aid %s in growing."),
4185 _(
"%s adds %s to your city %s."),
4215 struct tile *ptile,
const char *
name,
4220 struct player *nationality;
4272 log_verbose(
"handle_unit_change_activity() invalid unit %d", unit_id);
4319 activity_target =
NULL;
4326 if (activity_target ==
NULL) {
4328 bool required =
TRUE;
4360 if (activity_target ==
NULL && required) {
4399 if (pplayer !=
NULL) {
4421 }
else if (
pconn->observer) {
4433 int att_veteran,
int def_veteran,
int bombard)
4441 combat.make_att_veteran = att_veteran;
4442 combat.make_def_veteran = def_veteran;
4507 _(
"Your %s destroyed %s by doing %s."),
4513 _(
"%s destroyed %s by doing %s."),
4541 log_debug(
"Start bombard: %s %s to %d, %d.",
4568 _(
"Your %s killed the %s %s by doing %s."),
4577 _(
"Your %s was killed by the %s %s doing %s."),
4586 _(
"Your %s bombards the %s %s."),
4594 _(
"Your %s is bombarded by the %s %s."),
4657 log_debug(
"Start nuclear attack: %s %s against (%d, %d).",
4665 _(
"Your %s was shot down by "
4668 _(
"The nuclear attack on %s was avoided by"
4669 " your SDI defense."),
city_link(pcity));
4687 if (
paction->actor_consuming_always) {
4762 _(
"You destroy %s completely."),
4769 _(
"%s has been destroyed by %s."),
4830 _(
" and achieved the rank of %s"),
4866 if (firepower == 1) {
4921 log_debug(
"Start attack: %s %s against %s %s.",
4931 "Trying to attack a unit with which you have peace "
4935 "Trying to attack a unit with which you have "
5029 log_debug(
"Attacker lost: %s %s against %s %s.",
5040 _(
"Your %s %s [id:%d %sD:%.1f lost %d HP, %d HP remaining]"
5041 " survived the pathetic %sattack from the %s %s %s "
5042 "[id:%d %sA:%.1f HP:%d]."),
5068 _(
"Your attacking %s %s [id:%d %sA:%.1f HP:%d] failed "
5069 "against the %s %s %s [id:%d lost %d HP, %d HP "
5090 log_debug(
"Defender lost: %s %s against %s %s.",
5102 _(
"Your %s %s [id:%d %sD:%.1f HP:%d] lost to an attack by "
5103 "the %s %s %s [id:%d %sA:%.1f lost %d HP, has %d HP "
5126 _(
"Your attacking %s %s [id:%d %s%sA:%.1f lost %d HP, "
5127 "has %d remaining] succeeded against the %s %s %s "
5157 if (pcity !=
NULL) {
5228 _(
"Your %s failed to do %s in %s."),
5252 _(
"Your %s succeeded in destroying"
5253 " the production of %s in %s."),
5258 _(
"The production of %s was destroyed in %s,"
5259 " %s are suspected."),
5316 _(
"Your %s failed to do %s in %s."),
5334 _(
"Your %s didn't find a %s to %s in %s."),
5359 _(
"Your %s destroyed the %s in %s."),
5365 _(
"The %s destroyed the %s in %s."),
5425 struct tile *dest_tile,
5442 _(
"Cannot attack unless you declare war first."));
5447 _(
"%s can only move into your own zone of control."),
5453 _(
"%s cannot move that far from the coast line."),
5460 _(
"Cannot invade unless you break peace with "
5468 _(
"%s cannot disembark outside of a city or a native base "
5477 _(
"Terrain is unsuitable for %s units."),
5779 prod =
_(
"current production");
5786 work =
_(
"remaining");
5791 work =
_(
"surplus");
5798 _(
"Your %s does %s to help build the %s in %s (%d %s)."),
5817 _(
"Help building the %s in %s received from %s %s "
5873 _(
"Sorry, your %s cannot establish"
5874 " a trade route because it has no home city."),
5886 _(
"Sorry, your %s cannot establish"
5887 " a trade route because it's not carrying any goods."),
5897 _(
"Sorry, your %s cannot establish"
5898 " a trade route between %s and %s."),
5935 _(
"Sorry, your %s cannot establish"
5936 " a trade route here!"),
5941 PL_(
" The city of %s already has %d "
5942 "better trade route!",
5943 " The city of %s already has %d "
5959 _(
"Sorry, your %s cannot establish"
5960 " a trade route here!"),
5965 PL_(
" The city of %s already has %d "
5966 "better trade route!",
5967 " The city of %s already has %d "
5993 switch (bonus_type) {
5998 _(
"Your %s from %s has arrived in %s carrying %s."),
6008 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6009 " and revenues amount to %d in gold.",
6010 "Your %s from %s has arrived in %s carrying %s,"
6011 " and revenues amount to %d in gold.",
6023 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6024 " and revenues amount to %d in research.",
6025 "Your %s from %s has arrived in %s carrying %s,"
6026 " and revenues amount to %d in research.",
6038 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6039 " and revenues amount to %d in gold and research.",
6040 "Your %s from %s has arrived in %s carrying %s,"
6041 " and revenues amount to %d in gold and research.",
6080 _(
"New trade route established from %s to %s."),
6086 _(
"The %s established a trade route between their "
6227 log_verbose(
"handle_unit_sscs_set() invalid unit %d", unit_id);
6242 log_verbose(
"unit_sscs_set() invalid target tile %d for unit %d",
6285 }
else if (value == 1) {
6295 log_verbose(
"handle_unit_sscs_set(): illegal sentry state for %s %d",
6329 log_verbose(
"handle_unit_server_side_agent_set() invalid unit %d",
6336 log_verbose(
"handle_unit_server_side_agent_set() invalid agent %d",
6615 int length = packet->
length;
6632 log_error(
"handle_unit_orders() invalid %s (%d) "
6644 log_verbose(
"handle_unit_orders() invalid %s (%d) tile (%d, %d) "
6658 log_error(
"received invalid orders from %s for %s (%d).",
6698 for (
i = 0;
i < length;
i++) {
6705 "no action/activity required",
6728 if (pcity ==
NULL || pcity->
owner != pplayer || ptile ==
NULL) {
6755 ptask->ptile = ptile;
6757 if (packet->
tgt >= 0) {
6761 log_debug(
"Illegal worker task target %d", packet->
tgt);
const char * action_name_translation(const struct action *action)
bool action_distance_inside_max(const struct action *action, const int distance)
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)
bool action_actor_utype_hard_reqs_ok(const struct action *paction, const struct unit_type *actor_unittype)
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_id_rule_name(action_id act_id)
struct action_list * action_list_by_activity(enum unit_activity activity)
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)
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)
bool is_action_enabled_unit_on_city(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct city *target_city)
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)
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_maybe_possible_actor_unit(const struct civ_map *nmap, const action_id act_id, const struct unit *actor_unit)
struct action * action_is_blocked_by(const struct civ_map *nmap, const struct action *act, const struct unit *actor_unit, const struct tile *target_tile_arg, const struct city *target_city_arg, const struct unit *target_unit)
bool action_id_exists(const action_id act_id)
enum action_target_kind action_get_target_kind(const struct action *paction)
struct act_prob action_prob_unit_vs_tgt(const struct civ_map *nmap, const struct action *paction, const struct unit *act_unit, const struct city *tgt_city, const struct unit *tgt_unit, const struct tile *tgt_tile, const struct extra_type *extra_tgt)
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)
struct action_enabler_list * action_enablers_for_action(action_id action)
static struct action * action_by_number(action_id act_id)
#define action_has_result(_act_, _res_)
#define action_enabler_list_iterate_end
#define action_id_get_role(act_id)
#define action_iterate_end
#define action_id_get_actor_kind(act_id)
#define ACTPROB_NOT_KNOWN
#define action_get_activity(_pact_)
#define action_has_result_safe(paction, result)
#define action_enabler_list_iterate(action_enabler_list, aenabler)
#define action_id_distance_accepted(act_id, distance)
#define ACTPROB_IMPOSSIBLE
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
#define action_id_has_result_safe(act_id, result)
#define action_id_has_complex_target(act_id)
#define ASSERT_UNUSED_ACTRES_CASES
#define CALL_PLR_AI_FUNC(_func, _player,...)
void astr_free(struct astring *astr)
const char * astr_build_or_list(struct astring *astr, const char *const *items, size_t number)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
void adv_unit_new_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
struct extra_type * base_extra_get(const struct base_type *pbase)
struct base_type * get_base_by_gui_type(enum base_gui_type type, const struct unit *punit, const struct tile *ptile)
#define BV_ISSET(bv, bit)
void citizens_update(struct city *pcity, struct player *plr)
bool city_production_gets_caravan_shields(const struct universal *tgt)
bool city_has_building(const struct city *pcity, const struct impr_type *pimprove)
bool is_capital(const struct city *pcity)
const char * city_name_get(const struct city *pcity)
bool citymindist_prevents_city_on_tile(const struct civ_map *nmap, const struct tile *ptile)
void city_size_add(struct city *pcity, int add)
bool city_can_grow_to(const struct city *pcity, int pop_size)
struct city * tile_non_attack_city(const struct tile *ptile, const struct player *pplayer)
const char * city_production_name_translation(const struct city *pcity)
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 citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
#define city_list_iterate_end
void nullify_prechange_production(struct city *pcity)
bool city_change_size(struct city *pcity, citizens size, struct player *nationality, const char *reason)
int city_incite_cost(struct player *pplayer, struct city *pcity)
bool city_reduce_size(struct city *pcity, citizens pop_loss, struct player *destroyer, const char *reason)
bool city_refresh(struct city *pcity)
static struct fc_sockaddr_list * list
bool is_unit_reachable_at(const struct unit *defender, const struct unit *attacker, const struct tile *location)
enum unit_attack_result unit_attack_units_at_tile_result(const struct unit *punit, const struct action *paction, const struct tile *ptile)
struct city * sdi_try_defend(const struct civ_map *nmap, const struct player *owner, const struct tile *ptile)
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)
bool is_tired_attack(int moves_left)
enum unit_attack_result unit_wipe_units_at_tile_result(const struct unit *punit, const struct tile *ptile)
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)
void conn_list_do_unbuffer(struct conn_list *dest)
void conn_list_do_buffer(struct conn_list *dest)
#define conn_list_iterate(connlist, pconn)
#define conn_list_iterate_end
static void bombard(QVariant data1, QVariant data2)
struct unit struct city struct unit * target_unit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
struct unit struct city struct unit struct tile * target_tile
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 * target_city
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 struct city struct unit struct tile struct extra_type * target_extra
bool spy_escape(struct player *pplayer, struct unit *actor_unit, struct city *target_city, struct tile *target_tile, const struct action *paction)
bool spy_steal_some_maps(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
bool spy_sabotage_unit(struct player *pplayer, struct unit *pdiplomat, struct unit *pvictim, const struct action *paction)
bool diplomat_embassy(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction)
void spy_send_sabotage_list(struct connection *pc, struct unit *pdiplomat, struct city *pcity, const struct action *paction, int request_kind)
bool diplomat_get_tech(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, Tech_type_id technology, const struct action *paction)
bool diplomat_sabotage(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, Impr_type_id improvement, const struct action *paction)
bool diplomat_incite(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction)
bool spy_steal_gold(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
bool spy_spread_plague(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
bool spy_nuke_city(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
bool diplomat_investigate(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction)
bool diplomat_bribe(struct player *pplayer, struct unit *pdiplomat, struct unit *pvictim, const struct action *paction)
bool spy_attack(struct player *act_player, struct unit *act_unit, struct tile *tgt_tile, const struct action *paction)
bool spy_poison(struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction)
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct player *other_player, enum effect_type effect_type)
@ ANEK_CITY_TOO_CLOSE_TGT
@ ANEK_IS_NOT_CITY_CENTER
@ ANEK_TGT_NON_ALLIED_UNITS_ON_TILE
@ ANEK_ACTOR_HAS_HOME_CITY
@ ANEK_ACT_NOT_ENOUGH_MONEY
@ ANEK_IS_NOT_TRANSPORTING
@ ANEK_ACTOR_HAS_NO_HOME_CITY
@ ANEK_IS_NOT_TRANSPORTED
@ ANEK_TGT_IS_UNIQUE_ACT_HAS
#define IDENTITY_NUMBER_ZERO
#define PL_(String1, String2, n)
const char * city_tile_link(const struct city *pcity)
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)
bool is_player_phase(const struct player *pplayer, int phase)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
static int target_extra_id
struct impr_type * improvement_by_number(const Impr_type_id id)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#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,...)
#define fc_assert_ret_val_msg(condition, val, message,...)
enum direction8 opposite_direction(enum direction8 dir)
const char * dir_get_name(enum direction8 dir)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
int real_map_distance(const struct tile *tile0, const struct tile *tile1)
bool base_get_direction_for_step(const struct civ_map *nmap, const struct tile *start_tile, const struct tile *end_tile, enum direction8 *dir)
static int map_move_cost_unit(const struct civ_map *nmap, struct unit *punit, const struct tile *ptile)
void vision_clear_sight(struct vision *vision)
bool map_is_known(const struct tile *ptile, const struct player *pplayer)
void map_show_tile(struct player *src_player, struct tile *ptile)
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)
struct player_tile * map_get_player_tile(const struct tile *ptile, const struct player *pplayer)
const char * move_points_text(int mp, bool reduce)
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)
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)
enum unit_move_result unit_teleport_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 enter_transport, struct unit *embark_to, bool enter_enemy_city)
bool can_unit_survive_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
bool unit_can_move_to_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *dst_tile, bool igzoc, bool enter_transport, bool enter_enemy_city)
@ MR_DESTINATION_OCCUPIED_BY_NON_ALLIED_UNIT
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_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_of_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,...)
#define REQEST_PLAYER_INITIATED
void dlsend_packet_nuke_tile_info(struct conn_list *dest, int tile)
void lsend_packet_worker_task(struct conn_list *dest, const struct packet_worker_task *packet)
int dsend_packet_unit_actions(struct connection *pc, int actor_unit_id, int target_unit_id, int target_city_id, int target_tile_id, int target_extra_id, int request_kind, const struct act_prob *action_probabilities)
int send_packet_unit_short_info(struct connection *pc, const struct packet_unit_short_info *packet, bool force_to_send)
void lsend_packet_unit_combat_info(struct conn_list *dest, const struct packet_unit_combat_info *packet)
int dsend_packet_unit_action_answer(struct connection *pc, int actor_id, int target_id, int cost, action_id action_type, int request_kind)
int send_packet_unit_info(struct connection *pc, const struct packet_unit_info *packet)
int send_packet_unit_combat_info(struct connection *pc, const struct packet_unit_combat_info *packet)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
const char * player_name(const struct player *pplayer)
bool can_player_see_unit(const struct player *pplayer, const struct unit *punit)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
struct city * player_primary_capital(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)
bool pplayers_non_attack(const struct player *pplayer, const struct player *pplayer2)
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
#define players_iterate_end
#define players_iterate(_pplayer)
int normal_player_count(void)
bool civil_war_triggered(struct player *pplayer)
void maybe_make_contact(struct tile *ptile, struct player *pplayer)
void send_player_info_c(struct player *src, struct conn_list *dest)
struct player * civil_war(struct player *pplayer)
struct conn_list * player_reply_dest(struct player *pplayer)
bool civil_war_possible(struct player *pplayer, bool conquering_city, bool honour_server_option)
const char * universal_name_translation(const struct universal *psource, char *buf, size_t bufsz)
#define requirement_fulfilled_by_unit_type(_ut_, _rqs_)
#define requirement_fulfilled_by_terrain(_ter_, _rqs_)
#define requirement_fulfilled_by_nation(_nat_, _rqs_)
struct research * research_get(const struct player *pplayer)
#define sanity_check_city(x)
void script_server_signal_emit(const char *signal_name,...)
#define CLIP(lower, current, upper)
void spaceship_lost(struct player *pplayer)
#define DEFAULT_SPECIALIST
struct player * no_war_with
const struct unit_type * no_tgt_utype
struct terrain * no_act_terrain
struct city * capacity_city
struct player * peace_with
struct nation_type * no_act_nation
struct worker_task_list * task_reqs
citizens specialists[SP_MAX]
struct packet_ruleset_control control
struct conn_list * est_connections
struct packet_game_info info
struct packet_scenario_info scenario
struct civ_game::@31::@35 server
enum goods_selection_method goods_selection
bool reveal_trade_partner
struct unit_order orders[MAX_LEN_ROUTE]
enum unit_activity activity
struct conn_list * connections
struct player_economic economic
struct player_score score
const struct player * player
enum trade_route_bonus_type bonus_type
enum unit_activity activity
enum action_decision action_decision_want
enum unit_activity activity
struct unit::@81::@84 server
struct extra_type * activity_target
struct goods_type * carrying
struct tile * action_decision_tile
const struct unit_type * utype
enum server_side_agent ssa_controller
int fc_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
const char * terrain_name_translation(const struct terrain *pterrain)
#define terrain_has_flag(terr, flag)
bool tile_is_seen(const struct tile *target_tile, const struct player *pow_player)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_owner(_tile)
struct goods_type * goods_from_city_to_unit(struct city *src, struct unit *punit)
bool can_cities_trade(const struct city *pc1, const struct city *pc2)
enum trade_route_type cities_trade_route_type(const struct city *pcity1, const struct city *pcity2)
int trade_base_between_cities(const struct city *pc1, const struct city *pc2)
int city_num_trade_routes(const struct city *pcity)
static struct goods_type goods[MAX_GOODS_TYPES]
bool goods_has_flag(const struct goods_type *pgood, enum goods_flag_id flag)
struct trade_route_settings * trade_route_settings_by_type(enum trade_route_type type)
unsigned max_trade_routes(const struct city *pcity)
const char * goods_name_translation(struct goods_type *pgood)
int city_trade_removable(const struct city *pcity, struct trade_route_list *would_remove)
bool have_cities_trade_route(const struct city *pc1, const struct city *pc2)
int get_caravan_enter_city_trade_bonus(const struct city *pc1, const struct city *pc2, const struct unit_type *ut, struct goods_type *pgood, const bool establish_trade)
#define trade_route_list_iterate(trade_route_list, proute)
#define trade_route_list_iterate_end
struct unit_order * create_unit_orders(const struct civ_map *nmap, int length, const struct unit_order *orders)
int unit_shield_value(const struct unit *punit, const struct unit_type *punittype, const struct action *paction)
int get_transporter_occupancy(const struct unit *ptrans)
void free_unit_orders(struct unit *punit)
bool unit_is_alive(int id)
struct unit * transporter_for_unit_at(const struct unit *pcargo, const struct tile *ptile)
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)
enum unit_airlift_result test_unit_can_airlift_to(const struct civ_map *nmap, const struct player *restriction, const struct unit *punit, const struct city *pdest_city)
bool can_unit_continue_current_activity(const struct civ_map *nmap, struct unit *punit)
int unit_bribe_cost(struct unit *punit, struct player *briber)
bool can_unit_do_autosettlers(const struct unit *punit)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
void set_unit_activity_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type *new_target)
bool can_unit_do_activity(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity)
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 unit_has_orders(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)
#define MAX_NUM_BATTLEGROUPS
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define ACTION_PERFORM_UNIT_CITY(action, actor, target, action_performer)
static bool rel_may_become_war(const struct player *pplayer, const struct player *oplayer)
static bool do_unit_change_homecity(struct unit *punit, struct city *pcity, const struct action *paction)
static bool do_unit_upgrade(struct player *pplayer, struct unit *punit, struct city *pcity, enum action_requester ordered_by, const struct action *paction)
void handle_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)
static bool do_attack(struct unit *actor_unit, struct tile *target_tile, const struct action *paction)
static void send_combat(struct unit *pattacker, struct unit *pdefender, int att_veteran, int def_veteran, int bombard)
#define ACTION_PERFORM_UNIT_UNITS(action, actor, target, action_performer)
static bool do_unit_make_homeless(struct unit *punit, const struct action *paction)
static bool non_allied_not_listed_at(const struct player *pplayer, const int *list, int n, const struct tile *ptile)
void handle_unit_orders(struct player *pplayer, const struct packet_unit_orders *packet)
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)
static bool do_heal_unit(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
static bool do_capture_units(struct player *pplayer, struct unit *punit, struct tile *pdesttile, const struct action *paction)
static bool do_expel_unit(struct player *pplayer, struct unit *actor, struct unit *target, const struct action *paction)
static bool do_unit_conquer_city(struct player *act_player, struct unit *act_unit, struct city *tgt_city, struct action *paction)
static bool does_nation_block_action(const action_id act_id, bool is_target, struct unit *actor_unit, struct nation_type *pnation)
#define ACTION_PERFORM_UNIT_UNIT(action, actor, target, action_performer)
void handle_unit_change_activity(struct player *pplayer, int unit_id, enum unit_activity activity, int target_id)
void handle_worker_task(struct player *pplayer, const struct packet_worker_task *packet)
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity)
static bool occupy_move(struct tile *def_tile, struct unit *punit, const struct action *paction)
static bool do_unit_embark(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
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)
#define ACTION_PERFORM_UNIT_TILE(action, actor, target, action_performer)
static bool do_unit_strike_city_production(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
static bool illegal_action_pay_price(struct player *pplayer, bool information_revealed, struct unit *act_unit, struct action *stopped_action, struct player *tgt_player, struct tile *tgt_tile, const enum action_requester requester)
static void explain_why_no_action_enabled(struct unit *punit, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
static const char * unit_tired_attack_string(const struct unit *punit)
static bool do_unit_deboard(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
static bool does_terrain_block_action(const action_id act_id, bool is_target, struct unit *actor_unit, struct terrain *pterrain)
static void unit_activity_dependencies(struct unit *punit, enum unit_activity old_activity, struct extra_type *old_target)
static void unit_query_impossible(struct connection *pc, const int actor_id, const int target_id, int request_kind)
static bool unit_bombard(struct unit *punit, struct tile *ptile, const struct action *paction)
bool unit_move_handling(struct unit *punit, struct tile *pdesttile, bool move_do_not_act)
static bool unit_do_destroy_city(struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction)
static void handle_unit_change_activity_real(struct player *pplayer, int unit_id, enum unit_activity activity, struct extra_type *activity_target)
#define ACTION_PERFORM_UNIT_SELF(action, actor, action_performer)
void handle_unit_server_side_agent_set(struct player *pplayer, int unit_id, enum server_side_agent agent)
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)
static struct ane_expl * expl_act_not_enabl(struct unit *punit, const action_id act_id, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
static bool do_action_activity(struct unit *punit, const struct action *paction)
static bool do_unit_strike_city_building(struct player *act_player, struct unit *act_unit, struct city *tgt_city, Impr_type_id tgt_bld_id, const struct action *paction)
static bool need_war_enabler(const struct unit_type *actor_utype, const struct action *paction, struct player *player1, struct player *player2, bool act_if_diplrel_kind(const struct unit_type *, const action_id, const int, const bool))
static bool do_unit_unload(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
void unit_change_homecity_handling(struct unit *punit, struct city *new_pcity, bool rehome)
static bool unit_activity_targeted_internal(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target)
static bool tile_has_units_not_allied_to_but_seen_by(const struct tile *ptile, const struct player *pplayer)
static bool do_action_activity_targeted(struct unit *punit, const struct action *paction, struct extra_type **new_target)
static struct player * need_war_player(const struct unit *actor, const action_id act_id, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
static bool unit_do_help_build(struct player *pplayer, struct unit *punit, struct city *pcity_dest, const struct action *paction)
void handle_unit_type_upgrade(struct player *pplayer, Unit_type_id uti)
static bool city_add_unit(struct player *pplayer, struct unit *punit, struct city *pcity, const struct action *paction)
static bool do_unit_load(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
static bool unit_activity_internal(struct unit *punit, enum unit_activity new_activity)
void handle_unit_action_query(struct connection *pc, const int actor_id, const int target_id, const action_id action_type, int request_kind)
static bool do_wipe_units(struct unit *punit, struct tile *pdesttile, const struct action *paction)
bool unit_activity_handling_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target)
static bool unit_nuke(struct player *pplayer, struct unit *punit, struct tile *def_tile, const struct action *paction)
static bool can_unit_move_to_tile_with_notify(struct unit *punit, struct tile *dest_tile, bool igzoc, struct unit *embark_to, bool enter_enemy_city)
void handle_unit_get_actions(struct connection *pc, const int actor_unit_id, const int target_unit_id_client, const int target_tile_id, const int target_extra_id_client, const int request_kind)
void handle_unit_sscs_set(struct player *pplayer, int unit_id, enum unit_ss_data_type type, int value)
static bool do_unit_board(struct player *act_player, struct unit *act_unit, struct unit *tgt_unit, const struct action *paction)
static void see_combat(struct unit *pattacker, struct unit *pdefender)
#define ACTION_PERFORM_UNIT_ANY(paction, actor, target_city, target_unit, target_tile, action_performer)
static struct player * need_war_player_hlp(const struct unit *actor, const action_id act, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
static const char * unit_achieved_rank_string(const struct unit *punit)
static bool unit_do_regular_move(struct player *actor_player, struct unit *actor_unit, struct tile *target_tile, const struct action *paction)
static bool do_conquer_extras(struct player *act_player, struct unit *act_unit, struct tile *tgt_tile, const struct action *paction)
bool unit_server_side_agent_set(struct player *pplayer, struct unit *punit, enum server_side_agent agent)
static bool do_unit_establish_trade(struct player *pplayer, struct unit *punit, struct city *pcity_dest, const struct action *paction)
static bool do_disembark(struct player *act_player, struct unit *act_unit, struct tile *tgt_tile, const struct action *paction)
static void unit_plans_clear(struct unit *punit)
static bool city_build(struct player *pplayer, struct unit *punit, struct tile *ptile, const char *name, const struct action *paction)
static void unit_attack_civilian_casualties(const struct unit *punit, struct city *pcity, const struct action *paction, const char *reason)
static bool do_unit_hut(struct player *act_player, struct unit *act_unit, struct tile *tgt_tile, const struct action *paction)
enum ane_kind action_not_enabled_reason(struct unit *punit, action_id act_id, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
#define ACTION_PERFORM_UNIT_EXTRAS(action, actor, target, action_performer)
static const char * unit_firepower_if_not_one(int firepower)
static const char * unit_veteran_level_string(const struct unit *punit)
static void illegal_action(struct player *pplayer, struct unit *actor, action_id stopped_action, struct player *tgt_player, struct tile *target_tile, const struct city *target_city, const struct unit *target_unit, int request_kind, const enum action_requester requester)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_safe(unitlist, _unit)
#define unit_list_iterate_end
#define unit_list_iterate_safe_end
bool utype_may_act_tgt_city_tile(const struct unit_type *punit_type, const action_id act_id, const enum citytile_type prop, const bool is_there)
const char * uclass_name_translation(const struct unit_class *pclass)
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(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)
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)
Unit_type_id utype_count(void)
bool utype_can_do_act_when_ustate(const struct unit_type *punit_type, const action_id act_id, const enum ustate_prop prop, const bool is_there)
struct unit_class * unit_class_get(const struct unit *punit)
struct unit_type * utype_by_number(const Unit_type_id id)
const struct veteran_level * utype_veteran_level(const struct unit_type *punittype, int level)
bool utype_is_consumed_by_action(const struct action *paction, const struct unit_type *utype)
bool utype_can_act_if_tgt_diplrel_tile_other(const struct unit_type *punit_type, const action_id act_id, const int prop, const bool is_there)
Unit_type_id utype_index(const struct unit_type *punittype)
int unit_pop_value(const struct unit *punit)
const char * utype_name_translation(const struct unit_type *punittype)
bool can_utype_do_act_if_tgt_diplrel(const struct unit_type *punit_type, const action_id act_id, const int prop, const bool is_there)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
bool role_units_translations(struct astring *astr, int flag, bool alts)
int unit_upgrade_price(const struct player *pplayer, const struct unit_type *from, const struct unit_type *to)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define unit_type_iterate(_p)
#define unit_type_iterate_end
struct vision * vision_new(struct player *pplayer, struct tile *ptile)
void vision_free(struct vision *vision)
bool worker_task_is_sane(struct worker_task *ptask)
void worker_task_init(struct worker_task *ptask)
#define worker_task_list_iterate(tasklist, ptask)
#define worker_task_list_iterate_end