march: Require all land units to start in the same sector

The capability to march land units spread over several sectors is
obscure and rarely useful.  Accidental use is probably more frequent
than intentional use.  Issues:

* Interactive prompts show only the leader's position, and give no
  clue that some land units are actually elsewhere.

* Path finding is supported only when all marching land units are in
  the same sector.

* In each step, the bmap is updated for the leader's radar.  The bmap
  is not updated around other marching land units.  Already odd when
  all units are in the leader's sector, and odder still when some are
  elsewhere.

* Interdiction becomes rather complex.  For each movement, every
  sector entered is interdicted independently.  This means the same
  ship, land unit or plane can interdict multiple times.  Interdiction
  order depends on the order the code examines land units. which the
  player can control.  This is all pretty much undocumented.

* Complicates the code and its maintenance.  Multiplies the number of
  test cases needed to cover march.

I feel we're better off without this feature.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-12-28 22:24:17 +01:00
parent 5d0faf7a88
commit 69c99a0f29
9 changed files with 54 additions and 81 deletions

View file

@ -44,12 +44,12 @@ march(void)
struct nstr_item ni_land;
struct emp_qelem land_list;
double minmob, maxmob;
int together;
int together = 1;
if (!snxtitem(&ni_land, EF_LAND, player->argp[1], NULL))
return RET_SYN;
lnd_sel(&ni_land, &land_list);
lnd_mar(&land_list, &minmob, &maxmob, &together, player->cnum);
lnd_mar(&land_list, &minmob, &maxmob, player->cnum);
if (QEMPTY(&land_list)) {
pr("No lands\n");
return RET_FAIL;