133 struct tile *ptile,
const char *
name,
182 const int *
list,
int n,
const struct tile *ptile);
197 log_verbose(
"handle_unit_type_upgrade() invalid unit type %d",
uti);
204 _(
"Illegal packet, can't upgrade %s (yet)."),
237 PL_(
"%d %s upgraded to %s for %d gold.",
238 "%d %s upgraded to %s for %d gold.",
247 _(
"No units could be upgraded."));
272 PL_(
"%s upgraded to %s for %d gold.",
273 "%s upgraded to %s for %d gold.",
cost),
288 const int *
list,
int n,
const struct tile *ptile)
296 for (
i = 0;
i <
n;
i++) {
369 log_debug(
"capture units: already got unique unit");
372 _(
"You can only have one %s."),
393 for (
i = 0;
i <
n;
i++) {
430 _(
"Your %s succeeded in capturing the %s %s."),
439 _(
"Your %s was captured by the %s."),
452 _(
"%s lost along with control of %s."),
572 _(
"Your %s wiped the %s %s."),
578 _(
"Your %s was wiped by the %s."),
650 _(
"The %s don't have a capital to expel their %s to."),
664 _(
"Your %s succeeded in expelling the %s %s."),
669 _(
"Your %s was expelled by the %s."),
674 log_error(
"Bug in unit expulsion: unit can't teleport.");
813 _(
"Your %s heals %s %s."),
819 _(
"%s %s heals your %s."),
1350 const struct player *pplayer)
1435 (is_target ? &
enabler->target_reqs
1971 "Asked to explain why a non actor can't act.");
1974 _(
"Unit cannot do anything."));
1978 _(
"Your %s found no suitable target."),
1988 _(
"Your %s found no suitable target."),
2016 _(
"Your %s cannot act from %s. "
2017 "Only %s can act from a non livable tile."),
2026 _(
"Unit cannot act from %s."),
2034 _(
"Unit cannot act against %s."),
2039 _(
"This unit is being transported, and"
2040 " so cannot act."));
2044 _(
"This unit cannot act when it isn't being "
2049 _(
"This unit is transporting, and"
2050 " so cannot act."));
2054 _(
"This unit cannot act when it isn't transporting."));
2058 _(
"This unit has a home city, and so cannot act."));
2062 _(
"This unit cannot act unless it has a home city."));
2066 _(
"You must declare war on %s first. Try using "
2067 "the Nations report"
2076 _(
"You must break peace with %s first. Try using "
2077 "the Nations report to declare war"
2086 _(
"This unit cannot act against domestic targets."));
2090 _(
"This unit cannot act against foreign targets."));
2095 _(
"%s cannot act against tiles with non allied units."),
2101 _(
"%s %s cannot act."),
2108 _(
"This unit cannot act against %s targets."),
2113 _(
"This unit has too few moves left to act."));
2117 _(
"This unit cannot act against city centers."));
2121 _(
"This unit cannot act against non city centers."));
2125 _(
"This unit cannot act against claimed tiles."));
2129 _(
"This unit cannot act against unclaimed tiles."));
2133 _(
"This unit is too near its target to act."));
2137 _(
"This unit is too far away from its target to act."));
2141 _(
"Can't perform any action this scenario permits."));
2145 _(
"Can't perform any action this close to a city."));
2150 _(
"%s can't do anything to %s. It is too big."),
2157 _(
"%s needs an improvement to grow, so "
2158 "%s cannot do anything to it."),
2165 _(
"%s don't have enough capacity, so "
2166 "%s cannot do anything."),
2173 _(
"%s can't do anything to an unknown target tile."),
2183 "Treasury contains %d gold.",
2190 PL_(
"%s can't do anything. %d gold may help. %s",
2191 "%s can't do anything. %d gold may help. %s",
2199 _(
"%s cannot move that far from the coast line."),
2204 _(
"%s cannot disembark outside of a city or a native base "
2212 _(
"%s can't do anything since there is an unreachable "
2218 _(
"%s can't do anything since there is unit with a positive "
2224 _(
"%s can't do anything since you already have a %s."),
2235 _(
"No action possible."));
2253 const int target_tile_id,
2255 const int request_kind)
2314 _(
"Target not at target tile."));
2453 target_city_id =
plrtile->site->identity;
2481 "Invalid action target kind.");
2539 _(
"Only %s can do %s."),
2547 _(
"%s can't do %s."),
2557 _(
"Your %s found no target suitable for %s."),
2565 _(
"Having your %s do %s to this target is redundant."),
2594 _(
"Your %s can't do %s from %s. "
2595 "Only %s can do %s from a non livable tile."),
2608 _(
"Your %s can't do %s from %s."),
2620 _(
"Your %s can't do %s to %s."),
2630 _(
"Your %s can't do %s while being transported."),
2639 _(
"Your %s can't do %s while not being transported."),
2648 _(
"Your %s can't do %s while transporting."),
2657 _(
"Your %s can't do %s while not transporting."),
2666 _(
"Your %s can't do %s because it has a home city."),
2675 _(
"Your %s can't do %s because it is homeless."),
2685 _(
"Your %s can't do %s while you"
2686 " aren't at war with %s."),
2698 _(
"Your %s can't do %s while you "
2699 "are at peace with %s. Try using "
2700 "the Nations report to declare war"
2715 _(
"Your %s can't do %s to domestic %s."),
2727 _(
"Your %s can't do %s to foreign %s."),
2737 _(
"Your %s can't do %s to tiles with non allied units."),
2746 _(
"%s %s can't do %s."),
2756 _(
"Your %s can't do %s to %s %s."),
2768 _(
"Your %s has too few moves left to do %s."),
2777 _(
"Your %s can't do %s to city centers."),
2787 _(
"Your %s can only do %s to city centers."),
2796 _(
"Your %s can't do %s to claimed tiles."),
2806 _(
"Your %s can't do %s to unclaimed tiles."),
2816 PL_(
"Your %s must be at least %d tile away to do %s.",
2817 "Your %s must be at least %d tiles away to do %s.",
2829 PL_(
"Your %s can't be more than %d tile away to do %s.",
2830 "Your %s can't be more than %d tiles away to do %s.",
2840 _(
"Can't do %s in this scenario."),
2847 _(
"Can't do %s this close to a city."),
2854 _(
"%s can't do %s to %s. It is too big."),
2863 _(
"%s needs an improvement to grow, so "
2864 "%s cannot do %s."),
2873 _(
"%s has no capacity to %s %s."),
2882 _(
"%s can't do %s to an unknown tile."),
2893 "Treasury contains %d gold.",
2901 PL_(
"%s can't do %s for %d gold. %s",
2902 "%s can't do %s for %d gold. %s",
2912 _(
"%s cannot move that far from the coast line."),
2919 _(
"%s cannot disembark outside of a city or a native base "
2929 _(
"Your %s can't do %s there since there's an "
2930 "unreachable unit."),
2938 _(
"Your %s can't do %s there since there's an "
2939 "unit with positive defense value."),
2946 _(
"You already have a %s."),
2956 _(
"Your %s can't do %s when %s is legal."),
2968 _(
"Your %s was unable to do %s."),
3017 "The player wasn't responsible for this.");
3055 _(
"Your %s lost %d hit points while attempting to"
3068 _(
"Your %s was killed while attempting to do %s."),
3097 _(
"Your %s lost %s MP for attempting an illegal action."),
3158 _(
"No explanation why you couldn't do %s. This is a bug."
3159 " Sorry about that. -- Sveinung"),
3169 const int target_id,
3173 actor_id, target_id,
3188 const int target_id,
3192 struct player *pplayer =
pc->playing;
3201 log_error(
"handle_unit_action_query() the action %d doesn't exist.",
3210 log_verbose(
"handle_unit_action_query() invalid actor %d",
3222 actor_id, target_id,
3225 action_type, request_kind);
3239 actor_id, target_id,
3241 action_type, request_kind);
3264 actor_id, target_id,
3303 const int target_id,
3304 const int sub_tgt_id,
3319 const int target_id,
3320 const int sub_tgt_id,
3339 const int target_id,
3357 log_error(
"unit_perform_action() the action %d doesn't exist.",
3367 log_verbose(
"unit_perform_action() invalid actor %d",
3375 if (pcity ==
NULL) {
3376 log_verbose(
"unit_perform_action() invalid target city %d",
3386 log_verbose(
"unit_perform_action() invalid target unit %d",
3399 log_verbose(
"unit_perform_action() invalid target tile %d",
3434 switch (
paction->sub_target_kind) {
3463 log_verbose(
"unit_perform_action() action %d requires action "
3464 "but extra id %d is invalid.",
3465 action_type, sub_tgt_id);
3469 if (
paction->actor.is_unit.unitwaittime_controlled
3475#define ACTION_PERFORM_UNIT_CITY(action, actor, target, action_performer) \
3477 && is_action_enabled_unit_on_city(nmap, action_type, \
3478 actor_unit, pcity)) { \
3480 script_server_signal_emit("action_started_unit_city", \
3481 action_by_number(action), actor, target); \
3482 if (!actor || !unit_is_alive(actor_id)) { \
3486 if (!target || !city_exist(target_id)) { \
3490 success = action_performer; \
3492 action_success_actor_price(paction, actor_id, actor); \
3494 script_server_signal_emit("action_finished_unit_city", \
3495 action_by_number(action), success, \
3496 unit_is_alive(actor_id) ? actor : NULL, \
3497 city_exist(target_id) ? target : NULL); \
3500 illegal_action(pplayer, actor_unit, action_type, \
3501 pcity ? city_owner(pcity) : NULL, NULL, pcity, NULL, \
3505#define ACTION_PERFORM_UNIT_SELF(action, actor, action_performer) \
3507 && is_action_enabled_unit_on_self(nmap, action_type, actor_unit)) { \
3509 script_server_signal_emit("action_started_unit_self", \
3510 action_by_number(action), actor); \
3511 if (!actor || !unit_is_alive(actor_id)) { \
3515 success = action_performer; \
3517 action_success_actor_price(paction, actor_id, actor); \
3519 script_server_signal_emit("action_finished_unit_self", \
3520 action_by_number(action), success, \
3521 unit_is_alive(actor_id) ? actor : NULL); \
3524 illegal_action(pplayer, actor_unit, action_type, \
3525 unit_owner(actor_unit), NULL, NULL, actor_unit, \
3529#define ACTION_PERFORM_UNIT_UNIT(action, actor, target, action_performer) \
3531 && is_action_enabled_unit_on_unit(nmap, action_type, actor_unit, punit)) { \
3533 script_server_signal_emit("action_started_unit_unit", \
3534 action_by_number(action), actor, target); \
3535 if (!actor || !unit_is_alive(actor_id)) { \
3539 if (!target || !unit_is_alive(target_id)) { \
3543 success = action_performer; \
3545 action_success_actor_price(paction, actor_id, actor); \
3546 action_success_target_pay_mp(paction, target_id, punit); \
3548 script_server_signal_emit("action_finished_unit_unit", \
3549 action_by_number(action), success, \
3550 unit_is_alive(actor_id) ? actor : NULL, \
3551 unit_is_alive(target_id) ? target : NULL); \
3554 illegal_action(pplayer, actor_unit, action_type, \
3555 punit ? unit_owner(punit) : NULL, NULL, NULL, punit, \
3559#define ACTION_PERFORM_UNIT_UNITS(action, actor, target, action_performer)\
3561 && is_action_enabled_unit_on_stack(nmap, action_type, \
3562 actor_unit, target_tile)) { \
3564 script_server_signal_emit("action_started_unit_units", \
3565 action_by_number(action), actor, target); \
3566 if (!actor || !unit_is_alive(actor_id)) { \
3570 success = action_performer; \
3572 action_success_actor_price(paction, actor_id, actor); \
3574 script_server_signal_emit("action_finished_unit_units", \
3575 action_by_number(action), success, \
3576 unit_is_alive(actor_id) ? actor : NULL, \
3580 illegal_action(pplayer, actor_unit, action_type, \
3581 NULL, target_tile, NULL, NULL, \
3585#define ACTION_PERFORM_UNIT_TILE(action, actor, target, action_performer) \
3587 && is_action_enabled_unit_on_tile(nmap, action_type, \
3588 actor_unit, target_tile, \
3591 script_server_signal_emit("action_started_unit_tile", \
3592 action_by_number(action), actor, target); \
3593 if (!actor || !unit_is_alive(actor_id)) { \
3597 success = action_performer; \
3599 action_success_actor_price(paction, actor_id, actor); \
3601 script_server_signal_emit("action_finished_unit_tile", \
3602 action_by_number(action), success, \
3603 unit_is_alive(actor_id) ? actor : NULL, \
3607 illegal_action(pplayer, actor_unit, action_type, \
3608 target_tile ? tile_owner(target_tile) : NULL, \
3609 target_tile, NULL, NULL, \
3613#define ACTION_PERFORM_UNIT_EXTRAS(action, actor, target, action_performer)\
3615 && is_action_enabled_unit_on_extras(nmap, action_type, \
3616 actor_unit, target_tile, \
3619 script_server_signal_emit("action_started_unit_extras", \
3620 action_by_number(action), actor, target); \
3621 if (!actor || !unit_is_alive(actor_id)) { \
3625 success = action_performer; \
3627 action_success_actor_price(paction, actor_id, actor); \
3629 script_server_signal_emit("action_finished_unit_extras", \
3630 action_by_number(action), success, \
3631 unit_is_alive(actor_id) ? actor : NULL, \
3635 illegal_action(pplayer, actor_unit, action_type, \
3636 target_tile ? target_tile->extras_owner : NULL, \
3637 target_tile, NULL, NULL, \
3641#define ACTION_PERFORM_UNIT_ANY(paction, actor, \
3642 target_city, target_unit, target_tile, \
3644 switch (action_get_target_kind(paction)) { \
3646 ACTION_PERFORM_UNIT_CITY(paction->id, actor, target_city, \
3647 action_performer); \
3650 ACTION_PERFORM_UNIT_UNIT(paction->id, actor, target_unit, \
3651 action_performer); \
3654 ACTION_PERFORM_UNIT_UNITS(paction->id, actor, target_tile, \
3655 action_performer); \
3658 ACTION_PERFORM_UNIT_TILE(paction->id, actor, target_tile, \
3659 action_performer); \
3662 ACTION_PERFORM_UNIT_EXTRAS(paction->id, actor, target_tile, \
3663 action_performer); \
3666 ACTION_PERFORM_UNIT_SELF(paction->id, actor, TRUE); \
3669 fc_assert(action_get_target_kind(paction) != ATK_COUNT); \
4146 const char *giver =
NULL;
4160 _(
"%s transferred control over a %s to you in %s."),
4201 _(
"%s added to aid %s in growing."),
4209 _(
"%s adds %s to your city %s."),
4239 struct tile *ptile,
const char *
name,
4244 struct player *nationality;
4297 log_verbose(
"handle_unit_change_activity() invalid unit %d", unit_id);
4345 activity_target =
NULL;
4352 if (activity_target ==
NULL) {
4354 bool required =
TRUE;
4386 if (activity_target ==
NULL && required) {
4426 if (pplayer !=
NULL) {
4448 }
else if (
pconn->observer) {
4460 int att_veteran,
int def_veteran,
int bombard)
4468 combat.make_att_veteran = att_veteran;
4469 combat.make_def_veteran = def_veteran;
4534 _(
"Your %s destroyed %s by doing %s."),
4540 _(
"%s destroyed %s by doing %s."),
4568 log_debug(
"Start bombard: %s %s to %d, %d.",
4595 _(
"Your %s killed the %s %s by doing %s."),
4604 _(
"Your %s was killed by the %s %s doing %s."),
4613 _(
"Your %s bombards the %s %s."),
4621 _(
"Your %s is bombarded by the %s %s."),
4684 log_debug(
"Start nuclear attack: %s %s against (%d, %d).",
4692 _(
"Your %s was shot down by "
4695 _(
"The nuclear attack on %s was avoided by"
4696 " your SDI defense."),
city_link(pcity));
4714 if (
paction->actor_consuming_always) {
4789 _(
"You destroy %s completely."),
4796 _(
"%s has been destroyed by %s."),
4857 _(
" and achieved the rank of %s"),
4893 if (firepower == 1) {
4948 log_debug(
"Start attack: %s %s against %s %s.",
4960 "Trying to attack a unit with which you have peace "
4966 "Trying to attack a unit with which you have "
5060 log_debug(
"Attacker lost: %s %s against %s %s.",
5072 _(
"Your %s %s [id:%d %sD:%.1f lost %d HP, %d HP remaining]"
5073 " survived the pathetic %sattack from %s %s "
5074 "[id:%d %sA:%.1f HP:%d]."),
5095 _(
"Your %s %s [id:%d %sD:%.1f lost %d HP, %d HP remaining]"
5096 " survived the pathetic %sattack from the %s %s %s "
5097 "[id:%d %sA:%.1f HP:%d]."),
5126 _(
"Your attacking %s %s [id:%d %sA:%.1f HP:%d] failed "
5127 "against %s %s [id:%d lost %d HP, %d HP "
5148 _(
"Your attacking %s %s [id:%d %sA:%.1f HP:%d] failed "
5149 "against the %s %s %s [id:%d lost %d HP, %d HP "
5171 log_debug(
"Defender lost: %s %s against %s %s.",
5184 _(
"Your %s %s [id:%d %sD:%.1f HP:%d] lost to an attack by "
5185 "%s %s [id:%d %sA:%.1f lost %d HP, has %d HP "
5208 _(
"Your %s %s [id:%d %sD:%.1f HP:%d] lost to an attack by "
5209 "the %s %s %s [id:%d %sA:%.1f lost %d HP, has %d HP "
5234 _(
"Your attacking %s %s [id:%d %s%sA:%.1f lost %d HP, "
5235 "has %d remaining] succeeded against %s %s "
5255 _(
"Your attacking %s %s [id:%d %s%sA:%.1f lost %d HP, "
5256 "has %d remaining] succeeded against the %s %s %s "
5287 if (pcity !=
NULL) {
5358 _(
"Your %s failed to do %s in %s."),
5382 _(
"Your %s succeeded in destroying"
5383 " the production of %s in %s."),
5388 _(
"The production of %s was destroyed in %s,"
5389 " %s are suspected."),
5446 _(
"Your %s failed to do %s in %s."),
5464 _(
"Your %s didn't find a %s to %s in %s."),
5480 _(
"Your %s cannot do %s to %s in %s."),
5505 _(
"Your %s destroyed the %s in %s."),
5511 _(
"The %s destroyed the %s in %s."),
5571 struct tile *dest_tile,
5588 _(
"Cannot attack unless you declare war first."));
5593 _(
"%s can only move into your own zone of control."),
5599 _(
"%s cannot move that far from the coast line."),
5606 _(
"Cannot invade unless you break peace with "
5614 _(
"%s cannot disembark outside of a city or a native base "
5623 _(
"Terrain is unsuitable for %s units."),
5925 prod =
_(
"current production");
5932 work =
_(
"remaining");
5937 work =
_(
"surplus");
5944 _(
"Your %s does %s to help build the %s in %s (%d %s)."),
5963 _(
"Help building the %s in %s received from %s %s "
6019 _(
"Sorry, your %s cannot establish"
6020 " a trade route because it has no home city."),
6029 _(
"Sorry, your %s cannot establish"
6030 " a trade route because it's not carrying any goods."),
6040 _(
"Sorry, your %s cannot establish"
6041 " a trade route between %s and %s."),
6078 _(
"Sorry, your %s cannot establish"
6079 " a trade route here!"),
6084 PL_(
" The city of %s already has %d "
6085 "better trade route!",
6086 " The city of %s already has %d "
6102 _(
"Sorry, your %s cannot establish"
6103 " a trade route here!"),
6108 PL_(
" The city of %s already has %d "
6109 "better trade route!",
6110 " The city of %s already has %d "
6136 switch (bonus_type) {
6141 _(
"Your %s from %s has arrived in %s carrying %s."),
6151 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6152 " and revenues amount to %d in gold.",
6153 "Your %s from %s has arrived in %s carrying %s,"
6154 " and revenues amount to %d in gold.",
6166 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6167 " and revenues amount to %d in research.",
6168 "Your %s from %s has arrived in %s carrying %s,"
6169 " and revenues amount to %d in research.",
6181 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6182 " and revenues amount to %d in gold and research.",
6183 "Your %s from %s has arrived in %s carrying %s,"
6184 " and revenues amount to %d in gold and research.",
6223 _(
"New trade route established from %s to %s."),
6229 _(
"The %s established a trade route between their "
6370 log_verbose(
"handle_unit_sscs_set() invalid unit %d", unit_id);
6385 log_verbose(
"unit_sscs_set() invalid target tile %d for unit %d",
6428 }
else if (value == 1) {
6438 log_verbose(
"handle_unit_sscs_set(): illegal sentry state for %s %d",
6472 log_verbose(
"handle_unit_server_side_agent_set() invalid unit %d",
6479 log_verbose(
"handle_unit_server_side_agent_set() invalid agent %d",
6766 int length = packet->
length;
6783 log_error(
"handle_unit_orders() invalid %s (%d) "
6795 log_verbose(
"handle_unit_orders() invalid %s (%d) tile (%d, %d) "
6809 log_error(
"received invalid orders from %s for %s (%d).",
6849 for (
i = 0;
i < length;
i++) {
6856 "no action/activity required",
6879 if (pcity ==
NULL || pcity->
owner != pplayer || ptile ==
NULL) {
6906 ptask->ptile = ptile;
6908 if (packet->
tgt >= 0) {
6912 log_debug(
"Illegal worker task target %d", packet->
tgt);
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)
struct act_prob action_prob_self(const struct unit *actor_unit, const 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)
const char * action_name_translation(const struct action *paction)
struct act_prob action_prob_unit_vs_tgt(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)
const char * action_id_rule_name(action_id act_id)
struct act_prob action_prob_vs_tile(const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
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 action * action_is_blocked_by(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)
struct act_prob action_prob_vs_stack(const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile)
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 act_prob action_prob_vs_extras(const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
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_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)
#define action_noninternal_iterate_end
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_noninternal_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 req_context *other_context, 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)
bool improvement_has_flag(const struct impr_type *pimprove, enum impr_flag_id flag)
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 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
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 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)
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)
struct goods_type * unit_current_goods(const struct unit *punit, const struct city *homecity)
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, int priority, 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)
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_bribe_cost(const struct unit *punit, const struct player *briber, const struct unit *briber_unit)
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)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
enum gen_action activity_default_action(enum unit_activity act)
bool can_unit_do_autoworker(const struct unit *punit)
void set_unit_activity_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type *new_target, enum gen_action trigger_action)
bool can_unit_do_activity(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity)
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 is_flagless_to_player(const struct unit *punit, const struct player *pplayer)
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, bool everyone_non_allied)
bool unit_activity_handling_targeted(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target, enum gen_action trigger_action)
#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 void handle_unit_change_activity_real(struct player *pplayer, int unit_id, enum unit_activity activity, struct extra_type *activity_target, enum gen_action trigger_action)
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)
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_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)
#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)
#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 unit_activity_targeted_internal(struct unit *punit, enum unit_activity new_activity, struct extra_type **new_target, enum gen_action trigger_action)
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 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)
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)
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 bool unit_activity_internal(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
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 unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
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