From e0be6ba63462d85b564b3a499a6b1de1346c50e1 Mon Sep 17 00:00:00 2001
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Date: Sat, 7 Nov 2026 17:39:30 -0800
Subject: [PATCH] ai/default: Look at allied cities for trade when national
 routes pay nothing

dai_choose_trade_route() only scanned allied cities for a destination
when it preferred a different continent, and it decided that from the
national route percentages. In civ2civ3 both national percentages are
0, so the national scan is skipped, the preference is false, the allied
scan never runs, and the function returns without a want in every game,
although international routes pay 100 to 200 percent there. Also scan
allies when no national destination was found and international routes
pay at all.

Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
---
 ai/default/daidomestic.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ai/default/daidomestic.c b/ai/default/daidomestic.c
index dcf745d790..a6265947e6 100644
--- a/ai/default/daidomestic.c
+++ b/ai/default/daidomestic.c
@@ -280,7 +280,10 @@ static void dai_choose_trade_route(struct ai_type *ait, struct city *pcity,
   /* FIXME: This check should consider more about relative
    * income from different trade route types. This works just
    * with more typical ruleset setups. */
-  if (prefer_different_cont && !dest_city_nat_different_cont) {
+  if ((prefer_different_cont && !dest_city_nat_different_cont)
+      || (!dest_city_found
+          && (trade_route_type_trade_pct(TRT_IN) > 0
+              || trade_route_type_trade_pct(TRT_IN_IC) > 0))) {
     if (trade_route_type_trade_pct(TRT_IN_IC) >
         trade_route_type_trade_pct(TRT_IN)) {
       prefer_different_cont = TRUE;
-- 
2.55.0

