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."),
1351 const struct player *pplayer)
1436 (is_target ? &
enabler->target_reqs
1972 "Asked to explain why a non actor can't act.");
1975 _(
"Unit cannot do anything."));
1979 _(
"Your %s found no suitable target."),
1989 _(
"Your %s found no suitable target."),
2017 _(
"Your %s cannot act from %s. "
2018 "Only %s can act from a non livable tile."),
2027 _(
"Unit cannot act from %s."),
2035 _(
"Unit cannot act against %s."),
2040 _(
"This unit is being transported, and"
2041 " so cannot act."));
2045 _(
"This unit cannot act when it isn't being "
2050 _(
"This unit is transporting, and"
2051 " so cannot act."));
2055 _(
"This unit cannot act when it isn't transporting."));
2059 _(
"This unit has a home city, and so cannot act."));
2063 _(
"This unit cannot act unless it has a home city."));
2067 _(
"You must declare war on %s first. Try using "
2068 "the Nations report"
2077 _(
"You must break peace with %s first. Try using "
2078 "the Nations report to declare war"
2087 _(
"This unit cannot act against domestic targets."));
2091 _(
"This unit cannot act against foreign targets."));
2096 _(
"%s cannot act against tiles with non allied units."),
2102 _(
"%s %s cannot act."),
2109 _(
"This unit cannot act against %s targets."),
2114 _(
"This unit has too few moves left to act."));
2118 _(
"This unit cannot act against city centers."));
2122 _(
"This unit cannot act against non city centers."));
2126 _(
"This unit cannot act against claimed tiles."));
2130 _(
"This unit cannot act against unclaimed tiles."));
2134 _(
"This unit is too near its target to act."));
2138 _(
"This unit is too far away from its target to act."));
2142 _(
"Can't perform any action this scenario permits."));
2146 _(
"Can't perform any action this close to a city."));
2151 _(
"%s can't do anything to %s. It is too big."),
2158 _(
"%s needs an improvement to grow, so "
2159 "%s cannot do anything to it."),
2166 _(
"%s don't have enough capacity, so "
2167 "%s cannot do anything."),
2174 _(
"%s can't do anything to an unknown target tile."),
2184 "Treasury contains %d gold.",
2191 PL_(
"%s can't do anything. %d gold may help. %s",
2192 "%s can't do anything. %d gold may help. %s",
2200 _(
"%s cannot move that far from the coast line."),
2205 _(
"%s cannot disembark outside of a city or a native base "
2213 _(
"%s can't do anything since there is an unreachable "
2219 _(
"%s can't do anything since there is unit with a positive "
2225 _(
"%s can't do anything since you already have a %s."),
2236 _(
"No action possible."));
2254 const int target_tile_id,
2256 const int request_kind)
2315 _(
"Target not at target tile."));
2454 target_city_id =
plrtile->site->identity;
2482 "Invalid action target kind.");
2540 _(
"Only %s can do %s."),
2548 _(
"%s can't do %s."),
2558 _(
"Your %s found no target suitable for %s."),
2566 _(
"Having your %s do %s to this target is redundant."),
2595 _(
"Your %s can't do %s from %s. "
2596 "Only %s can do %s from a non livable tile."),
2609 _(
"Your %s can't do %s from %s."),
2621 _(
"Your %s can't do %s to %s."),
2631 _(
"Your %s can't do %s while being transported."),
2640 _(
"Your %s can't do %s while not being transported."),
2649 _(
"Your %s can't do %s while transporting."),
2658 _(
"Your %s can't do %s while not transporting."),
2667 _(
"Your %s can't do %s because it has a home city."),
2676 _(
"Your %s can't do %s because it is homeless."),
2686 _(
"Your %s can't do %s while you"
2687 " aren't at war with %s."),
2699 _(
"Your %s can't do %s while you "
2700 "are at peace with %s. Try using "
2701 "the Nations report to declare war"
2716 _(
"Your %s can't do %s to domestic %s."),
2728 _(
"Your %s can't do %s to foreign %s."),
2738 _(
"Your %s can't do %s to tiles with non allied units."),
2747 _(
"%s %s can't do %s."),
2757 _(
"Your %s can't do %s to %s %s."),
2769 _(
"Your %s has too few moves left to do %s."),
2778 _(
"Your %s can't do %s to city centers."),
2788 _(
"Your %s can only do %s to city centers."),
2797 _(
"Your %s can't do %s to claimed tiles."),
2807 _(
"Your %s can't do %s to unclaimed tiles."),
2817 PL_(
"Your %s must be at least %d tile away to do %s.",
2818 "Your %s must be at least %d tiles away to do %s.",
2830 PL_(
"Your %s can't be more than %d tile away to do %s.",
2831 "Your %s can't be more than %d tiles away to do %s.",
2841 _(
"Can't do %s in this scenario."),
2848 _(
"Can't do %s this close to a city."),
2855 _(
"%s can't do %s to %s. It is too big."),
2864 _(
"%s needs an improvement to grow, so "
2865 "%s cannot do %s."),
2874 _(
"%s has no capacity to %s %s."),
2883 _(
"%s can't do %s to an unknown tile."),
2894 "Treasury contains %d gold.",
2902 PL_(
"%s can't do %s for %d gold. %s",
2903 "%s can't do %s for %d gold. %s",
2913 _(
"%s cannot move that far from the coast line."),
2920 _(
"%s cannot disembark outside of a city or a native base "
2930 _(
"Your %s can't do %s there since there's an "
2931 "unreachable unit."),
2939 _(
"Your %s can't do %s there since there's an "
2940 "unit with positive defense value."),
2947 _(
"You already have a %s."),
2957 _(
"Your %s can't do %s when %s is legal."),
2969 _(
"Your %s was unable to do %s."),
3018 "The player wasn't responsible for this.");
3056 _(
"Your %s lost %d hit points while attempting to"
3069 _(
"Your %s was killed while attempting to do %s."),
3098 _(
"Your %s lost %s MP for attempting an illegal action."),
3161 _(
"No explanation why you couldn't do %s. This is a bug."
3162 " Sorry about that. -- Sveinung"),
3172 const int target_id,
3176 actor_id, target_id,
3191 const int target_id,
3195 struct player *pplayer =
pc->playing;
3205 log_error(
"handle_unit_action_query() the action %d doesn't exist.",
3214 log_verbose(
"handle_unit_action_query() invalid actor %d",
3222 if (
punit !=
nullptr
3226 actor_id, target_id,
3229 action_type, request_kind);
3239 if (ptile !=
nullptr
3243 actor_id, target_id,
3246 action_type, request_kind);
3260 actor_id, target_id,
3262 action_type, request_kind);
3285 actor_id, target_id,
3324 const int target_id,
3325 const int sub_tgt_id,
3340 const int target_id,
3341 const int sub_tgt_id,
3360 const int target_id,
3378 log_error(
"unit_perform_action() the action %d doesn't exist.",
3388 log_verbose(
"unit_perform_action() invalid actor %d",
3397 log_verbose(
"unit_perform_action() invalid target city %d",
3407 log_verbose(
"unit_perform_action() invalid target unit %d",
3420 log_verbose(
"unit_perform_action() invalid target tile %d",
3455 switch (
paction->sub_target_kind) {
3484 log_verbose(
"unit_perform_action() action %d requires action "
3485 "but extra id %d is invalid.",
3486 action_type, sub_tgt_id);
3490 if (
paction->actor.is_unit.unitwaittime_controlled
3496#define ACTION_PERFORM_UNIT_CITY(action, actor, target, action_performer) \
3498 && is_action_enabled_unit_on_city(nmap, action_type, \
3499 actor_unit, pcity)) { \
3501 script_server_signal_emit("action_started_unit_city", \
3502 action_by_number(action), actor, target); \
3503 if (!actor || !unit_is_alive(actor_id)) { \
3507 if (!target || !city_exist(target_id)) { \
3511 success = action_performer; \
3513 action_success_actor_price(paction, actor_id, actor); \
3515 script_server_signal_emit("action_finished_unit_city", \
3516 action_by_number(action), success, \
3517 unit_is_alive(actor_id) ? actor : NULL, \
3518 city_exist(target_id) ? target : NULL); \
3521 illegal_action(pplayer, actor_unit, action_type, \
3522 pcity ? city_owner(pcity) : NULL, NULL, pcity, NULL, \
3526#define ACTION_PERFORM_UNIT_SELF(action, actor, action_performer) \
3528 && is_action_enabled_unit_on_self(nmap, action_type, actor_unit)) { \
3530 script_server_signal_emit("action_started_unit_self", \
3531 action_by_number(action), actor); \
3532 if (!actor || !unit_is_alive(actor_id)) { \
3536 success = action_performer; \
3538 action_success_actor_price(paction, actor_id, actor); \
3540 script_server_signal_emit("action_finished_unit_self", \
3541 action_by_number(action), success, \
3542 unit_is_alive(actor_id) ? actor : NULL); \
3545 illegal_action(pplayer, actor_unit, action_type, \
3546 unit_owner(actor_unit), NULL, NULL, actor_unit, \
3550#define ACTION_PERFORM_UNIT_UNIT(action, actor, target, action_performer) \
3552 && is_action_enabled_unit_on_unit(nmap, action_type, actor_unit, punit)) { \
3554 script_server_signal_emit("action_started_unit_unit", \
3555 action_by_number(action), actor, target); \
3556 if (!actor || !unit_is_alive(actor_id)) { \
3560 if (!target || !unit_is_alive(target_id)) { \
3564 success = action_performer; \
3566 action_success_actor_price(paction, actor_id, actor); \
3567 action_success_target_pay_mp(paction, target_id, punit); \
3569 script_server_signal_emit("action_finished_unit_unit", \
3570 action_by_number(action), success, \
3571 unit_is_alive(actor_id) ? actor : NULL, \
3572 unit_is_alive(target_id) ? target : NULL); \
3575 illegal_action(pplayer, actor_unit, action_type, \
3576 punit ? unit_owner(punit) : NULL, NULL, NULL, punit, \
3580#define ACTION_PERFORM_UNIT_STACK(action, actor, target, action_performer)\
3582 && is_action_enabled_unit_on_stack(nmap, action_type, \
3583 actor_unit, target_tile)) { \
3585 script_server_signal_emit("action_started_unit_stack", \
3586 action_by_number(action), actor, target); \
3587 script_server_signal_emit("action_started_unit_units", \
3588 action_by_number(action), actor, target); \
3589 if (!actor || !unit_is_alive(actor_id)) { \
3593 success = action_performer; \
3595 action_success_actor_price(paction, actor_id, actor); \
3597 script_server_signal_emit("action_finished_unit_stack", \
3598 action_by_number(action), success, \
3599 unit_is_alive(actor_id) ? actor : NULL, \
3601 script_server_signal_emit("action_finished_unit_units", \
3602 action_by_number(action), success, \
3603 unit_is_alive(actor_id) ? actor : NULL, \
3607 illegal_action(pplayer, actor_unit, action_type, \
3608 NULL, target_tile, NULL, NULL, \
3612#define ACTION_PERFORM_UNIT_TILE(action, actor, target, action_performer) \
3614 && is_action_enabled_unit_on_tile(nmap, action_type, \
3615 actor_unit, target_tile, \
3618 script_server_signal_emit("action_started_unit_tile", \
3619 action_by_number(action), actor, target); \
3620 if (!actor || !unit_is_alive(actor_id)) { \
3624 success = action_performer; \
3626 action_success_actor_price(paction, actor_id, actor); \
3628 script_server_signal_emit("action_finished_unit_tile", \
3629 action_by_number(action), success, \
3630 unit_is_alive(actor_id) ? actor : NULL, \
3634 illegal_action(pplayer, actor_unit, action_type, \
3635 target_tile ? tile_owner(target_tile) : NULL, \
3636 target_tile, NULL, NULL, \
3640#define ACTION_PERFORM_UNIT_EXTRAS(action, actor, target, action_performer)\
3642 && is_action_enabled_unit_on_extras(nmap, action_type, \
3643 actor_unit, target_tile, \
3646 script_server_signal_emit("action_started_unit_extras", \
3647 action_by_number(action), actor, target); \
3648 if (!actor || !unit_is_alive(actor_id)) { \
3652 success = action_performer; \
3654 action_success_actor_price(paction, actor_id, actor); \
3656 script_server_signal_emit("action_finished_unit_extras", \
3657 action_by_number(action), success, \
3658 unit_is_alive(actor_id) ? actor : NULL, \
3662 illegal_action(pplayer, actor_unit, action_type, \
3663 target_tile ? target_tile->extras_owner : NULL, \
3664 target_tile, NULL, NULL, \
3668#define ACTION_PERFORM_UNIT_ANY(paction, actor, \
3669 target_city, target_unit, target_tile, \
3671 switch (action_get_target_kind(paction)) { \
3673 ACTION_PERFORM_UNIT_CITY(paction->id, actor, target_city, \
3674 action_performer); \
3677 ACTION_PERFORM_UNIT_UNIT(paction->id, actor, target_unit, \
3678 action_performer); \
3681 ACTION_PERFORM_UNIT_STACK(paction->id, actor, target_tile, \
3682 action_performer); \
3685 ACTION_PERFORM_UNIT_TILE(paction->id, actor, target_tile, \
3686 action_performer); \
3689 ACTION_PERFORM_UNIT_EXTRAS(paction->id, actor, target_tile, \
3690 action_performer); \
3693 ACTION_PERFORM_UNIT_SELF(paction->id, actor, TRUE); \
3696 fc_assert(action_get_target_kind(paction) != ATK_COUNT); \
4182 const char *giver =
NULL;
4196 _(
"%s transferred control over a %s to you in %s."),
4237 _(
"%s added to aid %s in growing."),
4245 _(
"%s adds %s to your city %s."),
4275 struct tile *ptile,
const char *
name,
4280 struct player *nationality;
4333 log_verbose(
"handle_unit_change_activity() invalid unit %d", unit_id);
4381 activity_target =
NULL;
4388 if (activity_target ==
NULL) {
4390 bool required =
TRUE;
4422 if (activity_target ==
NULL && required) {
4462 if (pplayer !=
NULL) {
4484 }
else if (
pconn->observer) {
4496 int att_veteran,
int def_veteran,
int bombard)
4504 combat.make_att_veteran = att_veteran;
4505 combat.make_def_veteran = def_veteran;
4570 _(
"Your %s destroyed %s by doing %s."),
4576 _(
"%s destroyed %s by doing %s."),
4604 log_debug(
"Start bombard: %s %s to %d, %d.",
4631 _(
"Your %s killed the %s %s by doing %s."),
4640 _(
"Your %s was killed by the %s %s doing %s."),
4649 _(
"Your %s bombards the %s %s."),
4657 _(
"Your %s is bombarded by the %s %s."),
4720 log_debug(
"Start nuclear attack: %s %s against (%d, %d).",
4728 _(
"Your %s was shot down by "
4731 _(
"The nuclear attack on %s was avoided by"
4750 if (
paction->actor_consuming_always) {
4825 _(
"You destroy %s completely."),
4832 _(
"%s has been destroyed by %s."),
4893 _(
" and achieved the rank of %s"),
4929 if (firepower == 1) {
4984 log_debug(
"Start attack: %s %s against %s %s.",
4996 "Trying to attack a unit with which you have peace "
5002 "Trying to attack a unit with which you have "
5096 log_debug(
"Attacker lost: %s %s against %s %s.",
5108 _(
"Your %s %s [id:%d %sD:%.1f lost %d HP, %d HP remaining]"
5109 " survived the pathetic %sattack from %s %s "
5110 "[id:%d %sA:%.1f HP:%d]."),
5131 _(
"Your %s %s [id:%d %sD:%.1f lost %d HP, %d HP remaining]"
5132 " survived the pathetic %sattack from the %s %s %s "
5133 "[id:%d %sA:%.1f HP:%d]."),
5162 _(
"Your attacking %s %s [id:%d %sA:%.1f HP:%d] failed "
5163 "against %s %s [id:%d lost %d HP, %d HP "
5184 _(
"Your attacking %s %s [id:%d %sA:%.1f HP:%d] failed "
5185 "against the %s %s %s [id:%d lost %d HP, %d HP "
5207 log_debug(
"Defender lost: %s %s against %s %s.",
5220 _(
"Your %s %s [id:%d %sD:%.1f HP:%d] lost to an attack by "
5221 "%s %s [id:%d %sA:%.1f lost %d HP, has %d HP "
5244 _(
"Your %s %s [id:%d %sD:%.1f HP:%d] lost to an attack by "
5245 "the %s %s %s [id:%d %sA:%.1f lost %d HP, has %d HP "
5270 _(
"Your attacking %s %s [id:%d %s%sA:%.1f lost %d HP, "
5271 "has %d remaining] succeeded against %s %s "
5291 _(
"Your attacking %s %s [id:%d %s%sA:%.1f lost %d HP, "
5292 "has %d remaining] succeeded against the %s %s %s "
5394 _(
"Your %s failed to do %s in %s."),
5418 _(
"Your %s succeeded in destroying"
5419 " the production of %s in %s."),
5424 _(
"The production of %s was destroyed in %s,"
5425 " %s are suspected."),
5482 _(
"Your %s failed to do %s in %s."),
5500 _(
"Your %s didn't find a %s to %s in %s."),
5516 _(
"Your %s cannot do %s to %s in %s."),
5541 _(
"Your %s destroyed the %s in %s."),
5547 _(
"The %s destroyed the %s in %s."),
5607 struct tile *dest_tile,
5624 _(
"Cannot attack unless you declare war first."));
5629 _(
"%s can only move into your own zone of control."),
5635 _(
"%s cannot move that far from the coast line."),
5642 _(
"Cannot invade unless you break peace with "
5650 _(
"%s cannot disembark outside of a city or a native base "
5659 _(
"Terrain is unsuitable for %s units."),
5961 prod =
_(
"current production");
5968 work =
_(
"remaining");
5973 work =
_(
"surplus");
5980 _(
"Your %s does %s to help build the %s in %s (%d %s)."),
5999 _(
"Help building the %s in %s received from %s %s "
6055 _(
"Sorry, your %s cannot establish"
6056 " a trade route because it has no home city."),
6065 _(
"Sorry, your %s cannot establish"
6066 " a trade route because it's not carrying any goods."),
6076 _(
"Sorry, your %s cannot establish"
6077 " a trade route between %s and %s."),
6115 _(
"Sorry, your %s cannot establish"
6116 " a trade route here!"),
6121 PL_(
" The city of %s already has %d "
6122 "better trade route!",
6123 " The city of %s already has %d "
6140 _(
"Sorry, your %s cannot establish"
6141 " a trade route here!"),
6146 PL_(
" The city of %s already has %d "
6147 "better trade route!",
6148 " The city of %s already has %d "
6174 switch (bonus_type) {
6179 _(
"Your %s from %s has arrived in %s carrying %s."),
6189 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6190 " and revenues amount to %d in gold.",
6191 "Your %s from %s has arrived in %s carrying %s,"
6192 " and revenues amount to %d in gold.",
6204 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6205 " and revenues amount to %d in research.",
6206 "Your %s from %s has arrived in %s carrying %s,"
6207 " and revenues amount to %d in research.",
6219 PL_(
"Your %s from %s has arrived in %s carrying %s,"
6220 " and revenues amount to %d in gold and research.",
6221 "Your %s from %s has arrived in %s carrying %s,"
6222 " and revenues amount to %d in gold and research.",
6260 _(
"New trade route established from %s to %s."),
6266 _(
"The %s established a trade route between their "
6419 log_verbose(
"handle_unit_sscs_set() invalid unit %d", unit_id);
6434 log_verbose(
"unit_sscs_set() invalid target tile %d for unit %d",
6477 }
else if (value == 1) {
6487 log_verbose(
"handle_unit_sscs_set(): illegal sentry state for %s %d",
6521 log_verbose(
"handle_unit_server_side_agent_set() invalid unit %d",
6528 log_verbose(
"handle_unit_server_side_agent_set() invalid agent %d",
6816 int length = packet->
length;
6833 log_error(
"handle_unit_orders() invalid %s (%d) "
6845 log_verbose(
"handle_unit_orders() invalid %s (%d) tile (%d, %d) "
6859 log_error(
"received invalid orders from %s for %s (%d).",
6899 for (
i = 0;
i < length;
i++) {
6906 "no action/activity required",
6956 ptask->ptile = ptile;
6958 if (packet->
tgt >= 0) {
6962 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)
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_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)
bool is_action_enabled_unit_on_stack(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile)
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)
#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 struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
struct unit struct city * 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 diplomat_bribe_unit(struct player *pplayer, struct unit *pdiplomat, struct unit *pvictim, 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)
bool diplomat_bribe_stack(struct player *pplayer, struct unit *pdiplomat, struct tile *pvictim, 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 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 trade_route_list * routes
struct packet_ruleset_control control
struct conn_list * est_connections
struct packet_game_info info
struct packet_scenario_info scenario
struct civ_game::@32::@36 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::@84::@87 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)
int stack_bribe_cost(const struct tile *ptile, const struct player *briber, const struct unit *briber_unit)
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)
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)
#define ACTION_PERFORM_UNIT_STACK(action, actor, target, action_performer)
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 create_trade_route(struct city *from, struct city *to, struct goods_type *goods)
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