From 189a9223bbe306804585312120846711bae88662 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Mon, 7 Jul 2025 23:07:18 +0300
Subject: [PATCH 86/86] AI: Fix comment typos found by codespell

See RM #1585

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 ai/default/daicity.c      |  2 +-
 ai/default/daidiplomacy.c |  4 ++--
 ai/default/daidiplomat.c  |  2 +-
 ai/default/daihand.c      |  4 ++--
 ai/default/daisettler.c   |  2 +-
 ai/default/daitools.c     |  2 +-
 ai/default/daiunit.c      | 10 +++++-----
 ai/tex/texaiplayer.c      |  2 +-
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/ai/default/daicity.c b/ai/default/daicity.c
index 562aa910f1..3b3137feef 100644
--- a/ai/default/daicity.c
+++ b/ai/default/daicity.c
@@ -1776,7 +1776,7 @@ static void adjust_improvement_wants_by_effects(struct ai_type *ait,
         v += v1;
       } else if (v1 > 0) {
         /* If value of the effect is negative, do not hold it against
-         * the tech - having the tech wont force one to build the
+         * the tech - having the tech won't force one to build the
          * building. */
 
         /* We might want the technology that will enable this
diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c
index 258cf1732a..dac93f84ad 100644
--- a/ai/default/daidiplomacy.c
+++ b/ai/default/daidiplomacy.c
@@ -97,7 +97,7 @@ static void clear_old_treaty(struct player *pplayer, struct player *aplayer);
 
 /******************************************************************//**
   Send a diplomatic message. Use this instead of notify directly
-  because we may want to highligh/present these messages differently
+  because we may want to highlight/present these messages differently
   in the future.
 **********************************************************************/
 static void dai_diplo_notify(struct player *pplayer, const char *text, ...)
@@ -391,7 +391,7 @@ static int dai_goldequiv_clause(struct ai_type *ait,
       break;
     }
 
-    /* They were allied with an enemy at the begining of the turn. */
+    /* They were allied with an enemy at the beginning of the turn. */
     if (adip->is_allied_with_enemy
         && pclause->type != CLAUSE_CEASEFIRE) {
       dai_diplo_notify(aplayer, _("*%s (AI)* I would like to see you keep your "
diff --git a/ai/default/daidiplomat.c b/ai/default/daidiplomat.c
index dd87b2440d..27b40cf162 100644
--- a/ai/default/daidiplomat.c
+++ b/ai/default/daidiplomat.c
@@ -77,7 +77,7 @@
 #define LOG_DIPLOMAT LOG_DEBUG
 #define LOG_DIPLOMAT_BUILD LOG_DEBUG
 
-/* 3000 is a just a large number, but not hillariously large as the
+/* 3000 is just a large number, but not hilariously large as the
  * previously used one. This is important for diplomacy. - Per */
 #define DIPLO_DEFENSE_WANT 3000
 
diff --git a/ai/default/daihand.c b/ai/default/daihand.c
index a5e43353c5..7956461bb6 100644
--- a/ai/default/daihand.c
+++ b/ai/default/daihand.c
@@ -190,8 +190,8 @@ enum celebration {
   TODO: Audit the use of pplayer->ai.maxbuycost in the code elsewhere,
   then add support for it here.
 
-  This function first determins the minimum tax rate (rate_tax_min) and a tax
-  rate for a balanced treasury (rate_tax_balance). Similarily, the science
+  This function first determines the minimum tax rate (rate_tax_min) and a tax
+  rate for a balanced treasury (rate_tax_balance). Similarly, the science
   rates are determiend (rate_sci_min and rate_sci_balance). Considering the
   minimum rates for tax and science the chance for celebrations is checked. If
   celebration is possible for more than half of the cities, the needed luxury
diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c
index db55b494f0..2380259e4f 100644
--- a/ai/default/daisettler.c
+++ b/ai/default/daisettler.c
@@ -806,7 +806,7 @@ static struct cityresult *settler_map_iterate(struct ai_type *ait,
 
     if (boat_cost == 0 && pclass->adv.sea_move == MOVE_NONE
         && tile_continent(ptile) != curcont) {
-      /* We have an accidential land bridge. Ignore it. It will in all
+      /* We have an accidental land bridge. Ignore it. It will in all
        * likelihood go away next turn, or even in a few nanoseconds. */
       continue;
     }
diff --git a/ai/default/daitools.c b/ai/default/daitools.c
index 7b231ba56e..3bebfae436 100644
--- a/ai/default/daitools.c
+++ b/ai/default/daitools.c
@@ -320,7 +320,7 @@ struct tile *immediate_destination(struct unit *punit,
     if (path) {
       for (i = 1; i < path->length; i++) {
         if (path->positions[i].tile == path->positions[i - 1].tile) {
-          /* The path-finding code advices us to wait there to refuel. */
+          /* The path-finding code advice us to wait there to refuel. */
           struct tile *ptile = path->positions[i].tile;
 
           pf_path_destroy(path);
diff --git a/ai/default/daiunit.c b/ai/default/daiunit.c
index 7e42c9968e..7821a8c2d8 100644
--- a/ai/default/daiunit.c
+++ b/ai/default/daiunit.c
@@ -127,7 +127,7 @@ struct unit_type *simple_ai_types[U_LAST];
 /**********************************************************************//**
   Returns the city with the most need of an airlift.
 
-  To be considerd, a city must have an air field. All cities with an
+  To be considered, a city must have an air field. All cities with an
   urgent need for units are serviced before cities in danger.
 
   Return value may be nullptr, this means no servicable city found.
@@ -774,7 +774,7 @@ adv_want look_for_charge(struct ai_type *ait, const struct civ_map *nmap,
       if (0 == get_transporter_capacity(buddy)) {
         /* Reduce want based on move cost. We can't do this for
          * transports since they move around all the time, leading
-         * to hillarious flip-flops. */
+         * to hilarious flip-flops. */
         def >>= move_cost / (2 * unit_move_rate(punit));
       }
       if (def > best_def) {
@@ -1179,7 +1179,7 @@ adv_want find_something_to_kill(struct ai_type *ait, const struct civ_map *nmap,
    * never learning steam engine, even though ironclads would be very
    * useful. -- Syela */
   adv_want bk = 0;
-  adv_want want;        /* Want (amortized) of the operaton. */
+  adv_want want;        /* Want (amortized) of the operation. */
   adv_want best = 0;    /* Best of all wants. */
   struct tile *goto_dest_tile = nullptr;
   bool can_occupy;
@@ -1588,7 +1588,7 @@ adv_want find_something_to_kill(struct ai_type *ait, const struct civ_map *nmap,
         want = 0;
       } else {
         want = kill_desire(benefit, attack, bcost, vulnerability, 1);
-          /* Take into account maintainance of the unit. */
+          /* Take into account maintenance of the unit. */
           /* FIXME: Depends on the government. */
         want -= move_time * SHIELD_WEIGHTING;
         /* Take into account unhappiness
@@ -3017,7 +3017,7 @@ static void dai_manage_barbarian_leader(struct ai_type *ait,
         /* If we reached our destination, ferryboat already called
          * ai_manage_unit() for leader. So no need to continue here.
          * Leader might even be dead.
-         * If this return is removed, surronding unit_list_iterate()
+         * If this return is removed, surrounding unit_list_iterate()
          * has to be replaced with unit_list_iterate_safe()*/
         return;
       }
diff --git a/ai/tex/texaiplayer.c b/ai/tex/texaiplayer.c
index 1378379e4a..5ca67afaec 100644
--- a/ai/tex/texaiplayer.c
+++ b/ai/tex/texaiplayer.c
@@ -185,7 +185,7 @@ static enum texai_abort_msg_class texai_check_messages(struct ai_type *ait)
       initialize_infrastructure_cache(msg->plr);
 
       /* Use _safe iterate in case the main thread
-       * destroyes cities while we are iterating through these. */
+       * destroys cities while we are iterating through these. */
       city_list_iterate_safe(msg->plr->cities, pcity) {
         struct adv_choice *choice;
         struct texai_build_choice_req *choice_req
-- 
2.47.2

