(tend_land): Allow spy units to be tended to and from sub

with no land unit carrying capability.  Closes #1313537.
This commit is contained in:
Ron Koenderink 2005-11-20 18:17:05 +00:00
parent fdec6a8aae
commit e8746e9af0

View file

@ -242,7 +242,15 @@ tend_land(struct shpstr *tenderp, s_char *units)
count_units(&target); count_units(&target);
getship(target.shp_uid, &target); getship(target.shp_uid, &target);
if (target.shp_nland >= mchr[(int)target.shp_type].m_nland) { if ((mchr[(int)target.shp_type].m_flags & M_SUB) &&
(lchr[(int)land.lnd_type].l_flags & L_SPY) &&
!mchr[(int)target.shp_type].m_nland) {
if (target.shp_nland > 1) {
pr("%s doesn't have room for more than two spy units!\n",
prship(&target));
continue;
}
} else if (target.shp_nland >= mchr[(int)target.shp_type].m_nland) {
if (mchr[(int)target.shp_type].m_nland) if (mchr[(int)target.shp_type].m_nland)
pr("%s doesn't have room for any more land units!\n", pr("%s doesn't have room for any more land units!\n",
prship(&target)); prship(&target));