From 979adcc810577089b3eada15532ed2aea992094e Mon Sep 17 00:00:00 2001
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Date: Sat, 14 Nov 2026 13:55:00 -0800
Subject: [PATCH] dai_choose_paratrooper(): Test paradrop by action result

The build choice accepts a unit type only if it can do ACTION_PARADROP
or ACTION_PARADROP_CONQUER. Every shipped ruleset enables only
"Paradrop Unit Enter" and "Paradrop Unit Enter Conquer", which share
those actions' results, so no unit type passes: the AI never builds
Paratroopers and never wants the tech for them.

Test for ACTRES_PARADROP and ACTRES_PARADROP_CONQUER with
utype_can_do_action_result(), as dai_manage_paratrooper() already does
when choosing a jump.

See RM #2482

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

diff --git a/ai/default/daiparadrop.c b/ai/default/daiparadrop.c
index a645d4ce6d..d1b873531a 100644
--- a/ai/default/daiparadrop.c
+++ b/ai/default/daiparadrop.c
@@ -393,8 +393,8 @@ void dai_choose_paratrooper(struct ai_type *ait, const struct civ_map *nmap,
   unit_type_iterate(u_type) {
     struct unit *virtual_unit;
 
-    if (!utype_can_do_action(u_type, ACTION_PARADROP)
-        && !utype_can_do_action(u_type, ACTION_PARADROP_CONQUER)) {
+    if (!utype_can_do_action_result(u_type, ACTRES_PARADROP)
+        && !utype_can_do_action_result(u_type, ACTRES_PARADROP_CONQUER)) {
       continue;
     }
 
-- 
2.55.0

