From 89e6b8e12a4470f20179c2a7ae150f7d22ad26ba Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 13 Jan 2026 00:30:57 +0200
Subject: [PATCH 59/59] AI: Reduce war countdown to 2 turns in case of
 spaceship launch

AI used to reserve long time for war preparations after
an enemy launched their spaceship, before actually declaring the war.
But when trying to stop the spaceship, quick action is more
important than being well prepared. With larger maps, old countdown
didn't cause war declaration before spaceship had already reached
its destination, making the whole war preparation mood.

See RM #1904

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 ai/default/daidiplomacy.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c
index 172086c0ab..d5829e30e1 100644
--- a/ai/default/daidiplomacy.c
+++ b/ai/default/daidiplomacy.c
@@ -1144,7 +1144,7 @@ void dai_diplomacy_begin_new_phase(struct ai_type *ait, struct player *pplayer)
     ai->diplomacy.strategy = WIN_SPACE; /* Yes! */
   } else {
     if (ai->diplomacy.strategy == WIN_SPACE) {
-       ai->diplomacy.strategy = WIN_OPEN;
+      ai->diplomacy.strategy = WIN_OPEN;
     }
   }
 
@@ -1695,8 +1695,7 @@ void dai_diplomacy_actions(struct ai_type *ait, struct player *pplayer)
         /* This means war!!! */
         pplayer->ai_common.love[player_index(aplayer)] -= MAX_AI_LOVE / 2;
         DIPLO_LOG(ait, LOG_DIPL, pplayer, aplayer, "plans war due to spaceship");
-        war_countdown(ait, pplayer, aplayer, 4 + map_size_checked(),
-                      DAI_WR_SPACE);
+        war_countdown(ait, pplayer, aplayer, 2, DAI_WR_SPACE);
       }
     } players_iterate_alive_end;
   }
-- 
2.51.0

