From 6d38a0493032b3b13adbbcbd07b65663e7368be3 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 17 Jun 2008 20:16:27 +0200 Subject: [PATCH] Don't let non-light units board ships that can't carry them ask_olist() let non-light land units board ships that can carry only light units. If the board succeeds, the non-light unit move onto the ship and then are stuck there. --- src/lib/subs/attsub.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index 4a04fe3f..b874682b 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -1007,6 +1007,12 @@ ask_olist(int combat_mode, struct combat *off, struct combat *def, pr("Land units are not able to board this kind of ship\n"); return; } + if (def->type == EF_SHIP + && (def->shp_mcp->m_flags & (M_SUPPLY | M_SUB)) != M_SUPPLY + && !(lcp->l_flags & L_LIGHT)) { + pr("Only light land units can board this kind of ship\n"); + continue; + } if (land.lnd_mobil <= 0) { pr("%s is out of mobility, and cannot %s\n", prland(&land), att_mode[combat_mode]);