From 2d5109c439474952fab23114de71bbe97c772f09 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 25 Aug 2024 16:09:37 +0300
Subject: [PATCH 15/15] Rename ATK_UNITS as ATK_STACK

See RM #806

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/control.c                    |  2 +-
 client/gui-gtk-3.22/action_dialog.c |  8 ++++----
 client/gui-gtk-4.0/action_dialog.c  |  8 ++++----
 client/gui-gtk-5.0/action_dialog.c  |  8 ++++----
 client/gui-qt/dialogs.cpp           | 12 ++++++------
 client/gui-sdl2/action_dialog.c     |  8 ++++----
 client/gui-sdl3/action_dialog.c     |  8 ++++----
 client/helpdata.c                   |  2 +-
 client/packhand.c                   |  2 +-
 common/actions.c                    | 22 +++++++++++-----------
 common/actres.c                     | 18 +++++++++---------
 common/actres.h                     |  2 +-
 common/unit.c                       |  2 +-
 server/actiontools.c                | 16 ++++++++--------
 server/advisors/autoworkers.c       |  2 +-
 server/diplomats.c                  |  2 +-
 server/ruleset/rssanity.c           |  2 +-
 server/scripting/api_server_edit.c  |  4 ++--
 server/unithand.c                   | 16 ++++++++--------
 server/unittools.c                  |  2 +-
 20 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/client/control.c b/client/control.c
index 3439d565fd..4ffcbe2862 100644
--- a/client/control.c
+++ b/client/control.c
@@ -2012,7 +2012,7 @@ static void do_disband_alternative(void *p)
       request_do_action(act, punit->id, punit->id, 0, "");
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
     if ((ptile = unit_tile(punit))
         && action_prob_possible(action_prob_vs_stack(nmap, punit, act, ptile))) {
       request_do_action(act, punit->id, ptile->index, 0, "");
diff --git a/client/gui-gtk-3.22/action_dialog.c b/client/gui-gtk-3.22/action_dialog.c
index fb60c772ab..ac228f6866 100644
--- a/client/gui-gtk-3.22/action_dialog.c
+++ b/client/gui-gtk-3.22/action_dialog.c
@@ -275,7 +275,7 @@ static void simple_action_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -382,7 +382,7 @@ static void request_action_details_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -1384,7 +1384,7 @@ void popup_action_selection(struct unit *actor_unit,
   target_ids[ATK_UNIT] = target_unit ?
                          target_unit->id :
                          IDENTITY_NUMBER_ZERO;
-  target_ids[ATK_UNITS] = target_tile ?
+  target_ids[ATK_STACK] = target_tile ?
                           tile_index(target_tile) :
                           TILE_INDEX_NONE;
   target_ids[ATK_TILE] = target_tile ?
@@ -1464,7 +1464,7 @@ void popup_action_selection(struct unit *actor_unit,
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(shl, act, act_probs,
                    get_act_sel_action_custom_text(action_by_number(act),
                                                   act_probs[act],
diff --git a/client/gui-gtk-4.0/action_dialog.c b/client/gui-gtk-4.0/action_dialog.c
index 59d2964845..22da3691d3 100644
--- a/client/gui-gtk-4.0/action_dialog.c
+++ b/client/gui-gtk-4.0/action_dialog.c
@@ -275,7 +275,7 @@ static void simple_action_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -382,7 +382,7 @@ static void request_action_details_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -1379,7 +1379,7 @@ void popup_action_selection(struct unit *actor_unit,
   target_ids[ATK_UNIT] = target_unit ?
                          target_unit->id :
                          IDENTITY_NUMBER_ZERO;
-  target_ids[ATK_UNITS] = target_tile ?
+  target_ids[ATK_STACK] = target_tile ?
                           tile_index(target_tile) :
                           TILE_INDEX_NONE;
   target_ids[ATK_TILE] = target_tile ?
@@ -1459,7 +1459,7 @@ void popup_action_selection(struct unit *actor_unit,
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(shl, act, act_probs,
                    get_act_sel_action_custom_text(action_by_number(act),
                                                   act_probs[act],
diff --git a/client/gui-gtk-5.0/action_dialog.c b/client/gui-gtk-5.0/action_dialog.c
index 878bf3ef34..ee3f97a5bc 100644
--- a/client/gui-gtk-5.0/action_dialog.c
+++ b/client/gui-gtk-5.0/action_dialog.c
@@ -275,7 +275,7 @@ static void simple_action_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -382,7 +382,7 @@ static void request_action_details_callback(GtkWidget *w, gpointer data)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = args->target_tile_id;
@@ -1379,7 +1379,7 @@ void popup_action_selection(struct unit *actor_unit,
   target_ids[ATK_UNIT] = target_unit ?
                          target_unit->id :
                          IDENTITY_NUMBER_ZERO;
-  target_ids[ATK_UNITS] = target_tile ?
+  target_ids[ATK_STACK] = target_tile ?
                           tile_index(target_tile) :
                           TILE_INDEX_NONE;
   target_ids[ATK_TILE] = target_tile ?
@@ -1459,7 +1459,7 @@ void popup_action_selection(struct unit *actor_unit,
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(shl, act, act_probs,
                    get_act_sel_action_custom_text(action_by_number(act),
                                                   act_probs[act],
diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp
index 24b7dd3849..7b7f8a1c1b 100644
--- a/client/gui-qt/dialogs.cpp
+++ b/client/gui-qt/dialogs.cpp
@@ -1411,7 +1411,7 @@ choice_dialog::choice_dialog(const QString title, const QString text,
   target_id[ATK_SELF] = unit_id;
   target_id[ATK_CITY] = IDENTITY_NUMBER_ZERO;
   target_id[ATK_UNIT] = IDENTITY_NUMBER_ZERO;
-  target_id[ATK_UNITS] = TILE_INDEX_NONE;
+  target_id[ATK_STACK] = TILE_INDEX_NONE;
   target_id[ATK_TILE] = TILE_INDEX_NONE;
   target_id[ATK_EXTRAS] = TILE_INDEX_NONE;
   sub_target_id[ASTK_BUILDING] = B_LAST;
@@ -2123,9 +2123,9 @@ void popup_action_selection(struct unit *actor_unit,
   }
 
   if (target_tile) {
-    cd->target_id[ATK_UNITS] = tile_index(target_tile);
+    cd->target_id[ATK_STACK] = tile_index(target_tile);
   } else {
-    cd->target_id[ATK_UNITS] = TILE_INDEX_NONE;
+    cd->target_id[ATK_STACK] = TILE_INDEX_NONE;
   }
 
   if (target_tile) {
@@ -2189,11 +2189,11 @@ void popup_action_selection(struct unit *actor_unit,
   // Unit acting against all units at a tile
 
   // Set the correct target for the following actions.
-  qv2 = cd->target_id[ATK_UNITS];
+  qv2 = cd->target_id[ATK_STACK];
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(cd, act, act_probs,
                    get_act_sel_action_custom_text(action_by_number(act),
                                                   act_probs[act],
@@ -4269,7 +4269,7 @@ void action_selection_refresh(struct unit *actor_unit,
       break;
     case ATK_TILE:
     case ATK_EXTRAS:
-    case ATK_UNITS:
+    case ATK_STACK:
       if (target_tile != nullptr) {
         qv2 = tile_index(target_tile);
       } else {
diff --git a/client/gui-sdl2/action_dialog.c b/client/gui-sdl2/action_dialog.c
index 0fdd8a6353..b275666955 100644
--- a/client/gui-sdl2/action_dialog.c
+++ b/client/gui-sdl2/action_dialog.c
@@ -744,7 +744,7 @@ static int simple_action_callback(struct widget *pwidget)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = diplomat_dlg->target_ids[ATK_TILE];
@@ -915,7 +915,7 @@ static void action_entry(const action_id act,
     break;
   case ATK_TILE:
   case ATK_EXTRAS:
-  case ATK_UNITS:
+  case ATK_STACK:
     buf->data.tile = tgt_tile;
     break;
   case ATK_SELF:
@@ -1004,7 +1004,7 @@ void popup_action_selection(struct unit *actor_unit,
     diplomat_dlg->target_ids[ATK_UNIT] = IDENTITY_NUMBER_ZERO;
   }
 
-  diplomat_dlg->target_ids[ATK_UNITS] = tile_index(target_tile);
+  diplomat_dlg->target_ids[ATK_STACK] = tile_index(target_tile);
   diplomat_dlg->target_ids[ATK_TILE] = tile_index(target_tile);
   diplomat_dlg->target_ids[ATK_EXTRAS] = tile_index(target_tile);
 
@@ -1050,7 +1050,7 @@ void popup_action_selection(struct unit *actor_unit,
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(act, act_probs,
                    actor_unit, target_tile, NULL, NULL,
                    pwindow, &area);
diff --git a/client/gui-sdl3/action_dialog.c b/client/gui-sdl3/action_dialog.c
index 23bab9ff28..d10857991e 100644
--- a/client/gui-sdl3/action_dialog.c
+++ b/client/gui-sdl3/action_dialog.c
@@ -744,7 +744,7 @@ static int simple_action_callback(struct widget *pwidget)
       failed = TRUE;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_id = diplomat_dlg->target_ids[ATK_TILE];
@@ -915,7 +915,7 @@ static void action_entry(const action_id act,
     break;
   case ATK_TILE:
   case ATK_EXTRAS:
-  case ATK_UNITS:
+  case ATK_STACK:
     buf->data.tile = tgt_tile;
     break;
   case ATK_SELF:
@@ -1004,7 +1004,7 @@ void popup_action_selection(struct unit *actor_unit,
     diplomat_dlg->target_ids[ATK_UNIT] = IDENTITY_NUMBER_ZERO;
   }
 
-  diplomat_dlg->target_ids[ATK_UNITS] = tile_index(target_tile);
+  diplomat_dlg->target_ids[ATK_STACK] = tile_index(target_tile);
   diplomat_dlg->target_ids[ATK_TILE] = tile_index(target_tile);
   diplomat_dlg->target_ids[ATK_EXTRAS] = tile_index(target_tile);
 
@@ -1050,7 +1050,7 @@ void popup_action_selection(struct unit *actor_unit,
 
   action_iterate(act) {
     if (action_id_get_actor_kind(act) == AAK_UNIT
-        && action_id_get_target_kind(act) == ATK_UNITS) {
+        && action_id_get_target_kind(act) == ATK_STACK) {
       action_entry(act, act_probs,
                    actor_unit, target_tile, NULL, NULL,
                    pwindow, &area);
diff --git a/client/helpdata.c b/client/helpdata.c
index 38cd7a7b96..23f86b989b 100644
--- a/client/helpdata.c
+++ b/client/helpdata.c
@@ -3192,7 +3192,7 @@ char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
 
     /* Not relevant */
     if (action_id_get_target_kind(act) != ATK_UNIT
-        && action_id_get_target_kind(act) != ATK_UNITS
+        && action_id_get_target_kind(act) != ATK_STACK
         && action_id_get_target_kind(act) != ATK_SELF) {
       continue;
     }
diff --git a/client/packhand.c b/client/packhand.c
index 03072a919b..39491316d6 100644
--- a/client/packhand.c
+++ b/client/packhand.c
@@ -5111,7 +5111,7 @@ static void action_decision_maybe_auto(struct unit *actor_unit,
     /* Give the order. */
     switch (action_id_get_target_kind(auto_action)) {
     case ATK_TILE:
-    case ATK_UNITS:
+    case ATK_STACK:
     case ATK_EXTRAS:
       if (target_tile != NULL) {
         request_do_action(auto_action,
diff --git a/common/actions.c b/common/actions.c
index 4c097ef851..f00151eed5 100644
--- a/common/actions.c
+++ b/common/actions.c
@@ -2158,7 +2158,7 @@ blocked_find_target_tile(const struct action *act,
       return NULL;
     }
     return unit_tile(target_unit);
-  case ATK_UNITS:
+  case ATK_STACK:
     fc_assert_ret_val(target_unit || target_tile_arg, NULL);
     if (target_unit) {
       return unit_tile(target_unit);
@@ -2214,7 +2214,7 @@ blocked_find_target_city(const struct action *act,
     fc_assert_ret_val(target_unit, NULL);
     fc_assert_ret_val(unit_tile(target_unit), NULL);
     return tile_city(unit_tile(target_unit));
-  case ATK_UNITS:
+  case ATK_STACK:
     fc_assert_ret_val(target_unit || target_tile, NULL);
     if (target_unit) {
       fc_assert_ret_val(unit_tile(target_unit), NULL);
@@ -2292,7 +2292,7 @@ struct action *action_is_blocked_by(const struct civ_map *nmap,
         return blocker;
       }
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
       if (!target_tile) {
         /* Can't be enabled. No target. */
         continue;
@@ -2796,7 +2796,7 @@ is_action_possible(const struct civ_map *nmap,
                 || (tkind == ATK_EXTRAS && target->tile != NULL)
                 || (tkind == ATK_UNIT && target->unit != NULL)
                 /* At this level each individual unit is tested. */
-                || (tkind == ATK_UNITS && target->unit != NULL)
+                || (tkind == ATK_STACK && target->unit != NULL)
                 || (tkind == ATK_SELF),
                 "Missing target!");
 
@@ -2834,7 +2834,7 @@ is_action_possible(const struct civ_map *nmap,
       return TRI_NO;
     }
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
   case ATK_SELF:
@@ -3166,13 +3166,13 @@ is_action_enabled_unit_on_stack_full(const struct civ_map *nmap,
                           action_id_get_actor_kind(wanted_action)),
                         action_actor_kind_name(AAK_UNIT));
 
-  fc_assert_ret_val_msg(ATK_UNITS
+  fc_assert_ret_val_msg(ATK_STACK
                         == action_id_get_target_kind(wanted_action),
                         FALSE, "Action %s is against %s not %s",
                         action_id_rule_name(wanted_action),
                         action_target_kind_name(
                           action_id_get_target_kind(wanted_action)),
-                        action_target_kind_name(ATK_UNITS));
+                        action_target_kind_name(ATK_STACK));
 
   fc_assert_ret_val(actor_tile, FALSE);
 
@@ -4320,13 +4320,13 @@ action_prob_vs_stack_full(const struct civ_map *nmap,
                           action_id_get_actor_kind(act_id)),
                         action_actor_kind_name(AAK_UNIT));
 
-  fc_assert_ret_val_msg(ATK_UNITS == action_id_get_target_kind(act_id),
+  fc_assert_ret_val_msg(ATK_STACK == action_id_get_target_kind(act_id),
                         ACTPROB_IMPOSSIBLE,
                         "Action %s is against %s not %s",
                         action_id_rule_name(act_id),
                         action_target_kind_name(
                           action_id_get_target_kind(act_id)),
-                        action_target_kind_name(ATK_UNITS));
+                        action_target_kind_name(ATK_STACK));
 
   fc_assert_ret_val(actor_tile, ACTPROB_IMPOSSIBLE);
 
@@ -4743,7 +4743,7 @@ struct act_prob action_prob_unit_vs_tgt(const struct action *paction,
   fc_assert_ret_val(act_unit, ACTPROB_IMPOSSIBLE);
 
   switch (action_get_target_kind(paction)) {
-  case ATK_UNITS:
+  case ATK_STACK:
     if (tgt_tile) {
       prob = action_prob_vs_stack(nmap, act_unit, paction->id, tgt_tile);
     }
@@ -7502,7 +7502,7 @@ const char *atk_helpnames[ATK_COUNT] =
 {
   N_("individual cities"), /* ATK_CITY   */
   N_("individual units"),  /* ATK_UNIT   */
-  N_("unit stacks"),       /* ATK_UNITS  */
+  N_("unit stacks"),       /* ATK_STACK  */
   N_("tiles"),             /* ATK_TILE   */
   N_("tile extras"),       /* ATK_EXTRAS */
   N_("itself")             /* ATK_SELF   */
diff --git a/common/actres.c b/common/actres.c
index 886625ba94..484f015fcb 100644
--- a/common/actres.c
+++ b/common/actres.c
@@ -78,7 +78,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_UNIT },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_CAPTURE_UNITS */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_FOUND_CITY */
     FALSE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_TILE },
@@ -90,7 +90,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_CITY },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_BOMBARD */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_DIPLOMATIC,    /* ACTRES_SPY_NUKE */
     TRUE, ACTIVITY_LAST, DRT_DIPLCHANCE,
     EC_NONE, ERM_NONE, ATK_CITY },
@@ -99,7 +99,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_TILE },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_NUKE_UNITS */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_DESTROY_CITY */
     TRUE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_CITY },
@@ -126,7 +126,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_CITY },
   { ACT_TGT_COMPL_SIMPLE, ABK_STANDARD,      /* ACTRES_ATTACK */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_MANDATORY, ABK_NONE,       /* ACTRES_STRIKE_BUILDING */
     TRUE, ACTIVITY_LAST, DRT_DIPLCHANCE,
     EC_NONE, ERM_NONE, ATK_CITY },
@@ -171,7 +171,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_IRRIGATION, ERM_NONE, ATK_TILE },
   { ACT_TGT_COMPL_SIMPLE, ABK_STANDARD,      /* ACTRES_COLLECT_RANSOM */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_TRANSPORT_DEBOARD */
     FALSE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_UNIT },
@@ -192,7 +192,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_CITY },
   { ACT_TGT_COMPL_SIMPLE, ABK_DIPLOMATIC,    /* ACTRES_SPY_ATTACK */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_CONQUER_EXTRAS */
     TRUE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_EXTRAS },
@@ -213,7 +213,7 @@ static struct actres act_results[ACTRES_LAST] = {
     EC_NONE, ERM_NONE, ATK_SELF },
   { ACT_TGT_COMPL_SIMPLE, ABK_STANDARD,      /* ACTRES_WIPE_UNITS */
     TRUE, ACTIVITY_LAST, DRT_NONE,
-    EC_NONE, ERM_NONE, ATK_UNITS },
+    EC_NONE, ERM_NONE, ATK_STACK },
   { ACT_TGT_COMPL_SIMPLE, ABK_NONE,          /* ACTRES_SPY_ESCAPE */
     FALSE, ACTIVITY_LAST, DRT_NONE,
     EC_NONE, ERM_NONE, ATK_CITY },
@@ -605,7 +605,7 @@ bool actres_legal_target_kind(enum action_result result,
   case ACTRES_WIPE_UNITS:
   case ACTRES_SPY_ATTACK:
   case ACTRES_COLLECT_RANSOM:
-    return tgt_kind == ATK_UNITS;
+    return tgt_kind == ATK_STACK;
   case ACTRES_FOUND_CITY:
   case ACTRES_PARADROP:
   case ACTRES_PARADROP_CONQUER:
@@ -640,7 +640,7 @@ bool actres_legal_target_kind(enum action_result result,
     switch (tgt_kind) {
     case ATK_CITY:
     case ATK_UNIT:
-    case ATK_UNITS:
+    case ATK_STACK:
     case ATK_TILE:
     case ATK_EXTRAS:
     case ATK_SELF:
diff --git a/common/actres.h b/common/actres.h
index 05fa47b841..4d18a9e907 100644
--- a/common/actres.h
+++ b/common/actres.h
@@ -42,7 +42,7 @@ struct req_context;
 #define SPECENUM_VALUE0NAME "City"
 #define SPECENUM_VALUE1 ATK_UNIT
 #define SPECENUM_VALUE1NAME "Unit"
-#define SPECENUM_VALUE2 ATK_UNITS
+#define SPECENUM_VALUE2 ATK_STACK
 #define SPECENUM_VALUE2NAME "Stack"
 #define SPECENUM_VALUE3 ATK_TILE
 #define SPECENUM_VALUE3NAME "Tile"
diff --git a/common/unit.c b/common/unit.c
index 825ba55d40..1e00a5822e 100644
--- a/common/unit.c
+++ b/common/unit.c
@@ -972,7 +972,7 @@ bool can_unit_do_activity_targeted_at(const struct civ_map *nmap,
                                               punit, ptile, target);      \
     case ATK_CITY:                                                        \
     case ATK_UNIT:                                                        \
-    case ATK_UNITS:                                                       \
+    case ATK_STACK:                                                       \
     case ATK_SELF:                                                        \
       return FALSE;                                                       \
     case ATK_COUNT:                                                       \
diff --git a/server/actiontools.c b/server/actiontools.c
index 1812fa45f5..3bb306cff3 100644
--- a/server/actiontools.c
+++ b/server/actiontools.c
@@ -231,7 +231,7 @@ static void notify_actor_caught(struct player *receiver,
                   victim_link);
     break;
   case ATK_UNIT:
-  case ATK_UNITS:
+  case ATK_STACK:
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Bribe Enemy Unit ... American ... Partisan */
@@ -289,7 +289,7 @@ static void notify_victim_caught(struct player *receiver,
                   victim_link);
     break;
   case ATK_UNIT:
-  case ATK_UNITS:
+  case ATK_STACK:
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Europeans ... Bribe Enemy Unit ... Partisan */
@@ -413,7 +413,7 @@ static void notify_actor_success(struct player *receiver,
                   victim_link);
     break;
   case ATK_UNIT:
-  case ATK_UNITS:
+  case ATK_STACK:
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRAND: Bribe Enemy Unit ... American ... Partisan */
@@ -468,7 +468,7 @@ static void notify_victim_success(struct player *receiver,
                   victim_link);
     break;
   case ATK_UNIT:
-  case ATK_UNITS:
+  case ATK_STACK:
     notify_player(receiver, victim_tile,
                   E_DIPLOMATIC_INCIDENT, ftc_server,
                   /* TRANS: Europeans ... Bribe Enemy Unit ... Partisan */
@@ -762,7 +762,7 @@ struct tile *action_tgt_tile(struct unit *actor,
     case ATK_EXTRAS:
       prob = action_prob_vs_extras(nmap, actor, act, target, target_extra);
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
       prob = action_prob_vs_stack(nmap, actor, act, target);
       break;
     case ATK_CITY:
@@ -844,7 +844,7 @@ static bool may_unit_act_vs_tile_extra(const struct unit *actor,
       break;
     case ATK_CITY:
     case ATK_UNIT:
-    case ATK_UNITS:
+    case ATK_STACK:
     case ATK_SELF:
       /* Not supported. */
       break;
@@ -1043,7 +1043,7 @@ action_auto_perf_unit_do(const enum action_auto_perf_cause cause,
   }
 
       switch (action_id_get_target_kind(act)) {
-      case ATK_UNITS:
+      case ATK_STACK:
         if (tgt_tile
             && is_action_enabled_unit_on_stack(nmap, act, actor, tgt_tile)) {
           perform_action_to(act, actor, tgt_tile->index, EXTRA_NONE);
@@ -1140,7 +1140,7 @@ action_auto_perf_unit_prob(const enum action_auto_perf_cause cause,
       /* This action can be done by units. */
 
       switch (action_id_get_target_kind(act)) {
-      case ATK_UNITS:
+      case ATK_STACK:
         if (tgt_tile
             && is_action_enabled_unit_on_stack(nmap, act, actor, tgt_tile)) {
           current = action_prob_vs_stack(nmap, actor, act, tgt_tile);
diff --git a/server/advisors/autoworkers.c b/server/advisors/autoworkers.c
index 657349eff4..bed3824eb1 100644
--- a/server/advisors/autoworkers.c
+++ b/server/advisors/autoworkers.c
@@ -1313,7 +1313,7 @@ bool auto_workers_speculate_can_act_at(const struct unit *punit,
       fc_assert_ret_val(action_get_target_kind(paction) != ATK_UNIT,
                         FALSE);
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
       return action_prob_possible(action_speculate_unit_on_stack(
                                     paction->id,
                                     punit, unit_home(punit), ptile,
diff --git a/server/diplomats.c b/server/diplomats.c
index 7daf79d0ff..fc54f1c2b7 100644
--- a/server/diplomats.c
+++ b/server/diplomats.c
@@ -2194,7 +2194,7 @@ static bool diplomat_infiltrate_tile(struct player *pplayer,
         victim_link = city_link(pcity);
         break;
       case ATK_UNIT:
-      case ATK_UNITS:
+      case ATK_STACK:
         victim_link = pvictim ? unit_tile_link(pvictim)
                               : tile_link(ptile);
         break;
diff --git a/server/ruleset/rssanity.c b/server/ruleset/rssanity.c
index 7e9651132c..d44b30a7f8 100644
--- a/server/ruleset/rssanity.c
+++ b/server/ruleset/rssanity.c
@@ -563,7 +563,7 @@ static bool effect_list_sanity_cb(struct effect *peffect, void *data)
     requirement_vector_iterate(&peffect->reqs, preq) {
       if (preq->source.kind == VUT_ACTION) {
         if (action_get_target_kind(preq->source.value.action) != ATK_UNIT) {
-          /* TODO: support for ATK_UNITS could be added. That would require
+          /* TODO: support for ATK_STACK could be added. That would require
            * manually calling action_success_target_pay_mp() in each
            * supported unit stack targeted action performer (like
            * action_consequence_success() does) or to have the unit stack
diff --git a/server/scripting/api_server_edit.c b/server/scripting/api_server_edit.c
index 305696eece..50bdfb93ec 100644
--- a/server/scripting/api_server_edit.c
+++ b/server/scripting/api_server_edit.c
@@ -375,7 +375,7 @@ bool api_edit_perform_action_unit_vs_tile(lua_State *L, Unit *punit,
 
   fc_assert_ret_val(action_get_actor_kind(paction) == AAK_UNIT, FALSE);
   switch (action_get_target_kind(paction)) {
-  case ATK_UNITS:
+  case ATK_STACK:
     enabled = is_action_enabled_unit_on_stack(nmap, paction->id, punit, tgt);
     break;
   case ATK_TILE:
@@ -437,7 +437,7 @@ bool api_edit_perform_action_unit_vs_tile_extra(lua_State *L, Unit *punit,
 
   fc_assert_ret_val(action_get_actor_kind(paction) == AAK_UNIT, FALSE);
   switch (action_get_target_kind(paction)) {
-  case ATK_UNITS:
+  case ATK_STACK:
     enabled = is_action_enabled_unit_on_stack(nmap, paction->id, punit, tgt);
     break;
   case ATK_TILE:
diff --git a/server/unithand.c b/server/unithand.c
index 2168ab7c84..567851191e 100644
--- a/server/unithand.c
+++ b/server/unithand.c
@@ -1118,7 +1118,7 @@ static struct player *need_war_player_hlp(const struct unit *actor,
   case ACTRES_WIPE_UNITS:
   case ACTRES_COLLECT_RANSOM:
     /* Target is a unit stack but a city can block it. */
-    fc_assert_action(action_get_target_kind(paction) == ATK_UNITS, break);
+    fc_assert_action(action_get_target_kind(paction) == ATK_STACK, break);
 
     if (!unit_has_type_flag(actor, UTYF_FLAGLESS)) {
       if (target_tile != NULL) {
@@ -1238,7 +1238,7 @@ static struct player *need_war_player_hlp(const struct unit *actor,
 
     target_player = unit_owner(target_unit);
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
     if (target_tile == NULL) {
       /* No target units since no target tile. */
       return NULL;
@@ -1483,7 +1483,7 @@ static struct ane_expl *expl_act_not_enabl(struct unit *punit,
         explnat->kind = ANEK_MISSING_TARGET;
       }
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
     case ATK_TILE:
     case ATK_EXTRAS:
       if (target_tile == NULL) {
@@ -1531,7 +1531,7 @@ static struct ane_expl *expl_act_not_enabl(struct unit *punit,
     case ATK_EXTRAS:
       tgt_player = target_tile->extras_owner;
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
       /* A unit stack may contain units with multiple owners. Pick the
        * first one. */
       if (target_tile
@@ -2384,7 +2384,7 @@ void handle_unit_get_actions(struct connection *pc,
         probabilities[act] = ACTPROB_IMPOSSIBLE;
       }
       break;
-    case ATK_UNITS:
+    case ATK_STACK:
       if (target_tile) {
         /* Calculate the probabilities. */
         probabilities[act] = action_prob_vs_stack(nmap, actor_unit, act,
@@ -2468,7 +2468,7 @@ void handle_unit_get_actions(struct connection *pc,
           target_extra_id = target_extra->id;
         }
         break;
-      case ATK_UNITS:
+      case ATK_STACK:
         /* The target tile isn't selected here so it hasn't changed. */
         fc_assert(target_tile != NULL);
         break;
@@ -3391,7 +3391,7 @@ bool unit_perform_action(struct player *pplayer,
     fc_assert_ret_val(target_tile != NULL, FALSE);
     pcity = tile_city(target_tile);
     break;
-  case ATK_UNITS:
+  case ATK_STACK:
   case ATK_TILE:
   case ATK_EXTRAS:
     target_tile = index_to_tile(nmap, target_id);
@@ -3650,7 +3650,7 @@ bool unit_perform_action(struct player *pplayer,
     ACTION_PERFORM_UNIT_UNIT(paction->id, actor, target_unit,             \
                              action_performer);                           \
     break;                                                                \
-  case ATK_UNITS:                                                         \
+  case ATK_STACK:                                                         \
     ACTION_PERFORM_UNIT_UNITS(paction->id, actor, target_tile,            \
                               action_performer);                          \
     break;                                                                \
diff --git a/server/unittools.c b/server/unittools.c
index b73edad322..647fd3f5ce 100644
--- a/server/unittools.c
+++ b/server/unittools.c
@@ -4806,7 +4806,7 @@ bool execute_orders(struct unit *punit, const bool fresh)
       prob = ACTPROB_IMPOSSIBLE;
 
       switch (action_id_get_target_kind(order.action)) {
-      case ATK_UNITS:
+      case ATK_STACK:
         prob = action_prob_vs_stack(nmap, punit, order.action,
                                     dst_tile);
         tgt_id = dst_tile->index;
-- 
2.45.2

