From 329dba55c314cf56ea31c7598682c2231c0d226f Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Fri, 26 Dec 2025 08:41:45 +0200
Subject: [PATCH 33/33] AI: Fix failing war_countdown() "adip->countdown == -1"
 assert

War declaration because of target's spaceship launch proceeded
when the countdown was already indicating war, but player's were
not in war yet. This is possible situation when the senate
is blocking the war, and we are waiting for it to be dissolved
in the next turn change.

See RM #1834

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

diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c
index 15617a667e..c0e3565126 100644
--- a/ai/default/daidiplomacy.c
+++ b/ai/default/daidiplomacy.c
@@ -1641,7 +1641,7 @@ void dai_diplomacy_actions(struct ai_type *ait, struct player *pplayer)
       struct player_spaceship *ship = &aplayer->spaceship;
 
       if (aplayer == pplayer
-          || adip->countdown >= 0  /* already counting down to war */
+          || adip->countdown != -1  /* Already counting down to war */
           || ship->state == SSHIP_NONE
           || players_on_same_team(pplayer, aplayer)
           || pplayers_at_war(pplayer, aplayer)) {
-- 
2.51.0

