From 7b898a47f476cd1a8dfbf10772b5bd79e4b7b31d Mon Sep 17 00:00:00 2001
From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Date: Sat, 14 Nov 2026 13:55:04 -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/aiparatrooper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ai/default/aiparatrooper.c b/ai/default/aiparatrooper.c
index f367dd5878..3750a92849 100644
--- a/ai/default/aiparatrooper.c
+++ b/ai/default/aiparatrooper.c
@@ -395,8 +395,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

