+int
+lnd_may_mar(struct lndstr *lp, struct lndstr *ldr, char *suffix)
+{
+ struct sctstr sect;
+ int mobtype;
+
+ if (!lp->lnd_own || !getsect(lp->lnd_x, lp->lnd_y, §)) {
+ CANT_REACH();
+ return 0;
+ }
+
+ if (opt_MARKET && ontradingblock(EF_LAND, lp)) {
+ mpr(lp->lnd_own, "%s is on the trading block%s\n",
+ prland(lp), suffix);
+ return 0;
+ }
+
+ if (lp->lnd_ship >= 0) {
+ mpr(lp->lnd_own, "%s is on a ship%s\n", prland(lp), suffix);
+ return 0;
+ }
+ if (lp->lnd_land >= 0) {
+ mpr(lp->lnd_own, "%s is on a unit%s\n", prland(lp), suffix);
+ return 0;
+ }
+
+ if (!(lchr[lp->lnd_type].l_flags & L_SPY) &&
+ !(lchr[lp->lnd_type].l_flags & L_TRAIN) &&
+ lp->lnd_item[I_MILIT] == 0) {
+ mpr(lp->lnd_own, "%s has no mil on it to guide it%s\n",
+ prland(lp), suffix);
+ return 0;
+ }
+
+ switch (lnd_check_mar(lp, §)) {
+ case LND_STUCK_NOT:
+ break;
+ case LND_STUCK_NO_RAIL:
+ mpr(lp->lnd_own, "%s is stuck off the rail system%s\n",
+ prland(lp), suffix);
+ return 0;
+ default:
+ CANT_REACH();
+ /* fall through */
+ case LND_STUCK_IMPASSABLE:
+ mpr(lp->lnd_own, "%s is stuck%s\n", prland(lp), suffix);
+ return 0;
+ }
+
+ if (relations_with(sect.sct_own, lp->lnd_own) != ALLIED &&
+ !(lchr[lp->lnd_type].l_flags & L_SPY) &&
+ sect.sct_own) {
+ mpr(lp->lnd_own, "%s has been kidnapped by %s%s\n",
+ prland(lp), cname(sect.sct_own), suffix);
+ return 0;
+ }
+
+ if (ldr && (lp->lnd_x != ldr->lnd_x || lp->lnd_y != ldr->lnd_y)) {
+ mpr(lp->lnd_own, "%s is not with the leader%s\n",
+ prland(lp), suffix);
+ return 0;
+ }
+
+ /*
+ * The marching code gets confused when trains and non-trains
+ * march together. Disallow for now.
+ */
+ mobtype = lnd_mobtype(lp);
+ if (!ldr || mobtype == lnd_mobtype(ldr))
+ ;
+ else if (mobtype == MOB_RAIL) {
+ mpr(lp->lnd_own,
+ "%s is a train and can't march with the leader%s\n",
+ prland(lp), suffix);
+ return 0;
+ } else {
+ mpr(lp->lnd_own, "%s can't rail-march with the leading train%s\n",
+ prland(lp), suffix);
+ return 0;
+ }
+
+ return 1;
+}
+