navigate: Require all ships to start in the same sector

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

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

* Path finding is supported only when all navigating ships are in
  the same sector.

* Interdiction becomes rather complex.  For each movement, every
  sector entered is interdicted independently.  This means the same
  fort, ship, land unit or plane can interdict multiple times.
  Interdiction order depends on the order the code examines
  ships. 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 navigate.

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:27:37 +01:00
parent 69c99a0f29
commit a024dbb8a3
9 changed files with 44 additions and 60 deletions

View file

@ -19,6 +19,9 @@ navi 24/26 yh
navi 25 h
| landlocked in 1,-1
navi 27 h
| not with flagship
nav 28/10 yh
__cmd added 1 1 0
|| get stuck on the way
| sink, by hitting mine in 11,-5
| #31 hits a mine, #30 doesn't

View file

@ -142,6 +142,7 @@ uid owner xloc yloc type effic mobil off tech opx opy mission radius fleet civil
25 1 4 2 9 100 127 0 40 4 2 none 0 "" 0 2 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
26 1 2 2 2 100 127 0 20 0 0 none 0 "" 0 5 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
27 1 1 -1 9 100 127 0 40 1 -1 none 0 "" 0 2 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
28 1 3 -1 9 100 117 0 40 4 0 none 0 "" 0 2 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
30 1 10 -6 9 100 108 0 40 9 -5 none 0 "" 0 2 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
31 0 11 -5 9 0 53 0 40 9 -5 none 0 "" 0 2 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""
32 1 10 -6 9 75 105 0 40 9 -5 none 0 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 1 1 () ""

View file

@ -114,6 +114,15 @@
Play#1 output Play#1 1 No ships
Play#1 output Play#1 1 command failed
Play#1 output Play#1 6 0 630
Play#1 input nav 28/10 yh
Play#1 command navigate
Play#1 output Play#1 1 pt patrol boat (#10) is not with the flagship & stays in -1,-1
Play#1 output Play#1 1 Flagship is pt patrol boat (#28)
Play#1 output Play#1 1 pt patrol boat (#28) stopped at 3,-1
Play#1 output Play#1 6 0 629
Play#1 input __cmd added 1 1 0
Play#1 command __cmd
Play#1 output Play#1 6 0 630
Play#1 input navi 31/30 jX
Play#1 command navigate
Play#1 output Play#1 1 Flagship is pt patrol boat (#31)
@ -1393,6 +1402,7 @@
Play#0 output Play#0 1 1 25 pt patrol boat 4,2 100% 0 2 0 0 0 0 0 0 127 40
Play#0 output Play#0 1 1 26 cs cargo ship 2,2 100% 0 5 0 0 0 0 0 0 127 20
Play#0 output Play#0 1 1 27 pt patrol boat 1,-1 100% 0 2 0 0 0 0 0 0 127 40
Play#0 output Play#0 1 1 28 pt patrol boat 3,-1 100% 0 2 0 0 0 0 0 0 117 40
Play#0 output Play#0 1 1 30 pt patrol boat 10,-6 100% 0 2 0 0 0 0 0 0 108 40
Play#0 output Play#0 1 1 32 pt patrol boat 10,-6 75% 0 1 0 0 0 0 0 0 105 40
Play#0 output Play#0 1 1 33 pt patrol boat 10,-6 80% 0 1 0 0 0 0 0 0 106 40
@ -1445,7 +1455,7 @@
Play#0 output Play#0 1 1 137 pt patrol boat 11,-5 100% 0 2 0 0 0 0 0 0 117 40
Play#0 output Play#0 1 1 138 pt patrol boat 11,-5 80% 0 1 0 0 0 0 0 0 93 40
Play#0 output Play#0 1 1 139 pt patrol boat 11,-5 74% 0 1 0 0 0 0 0 0 86 40
Play#0 output Play#0 1 70 ships
Play#0 output Play#0 1 71 ships
Play#0 output Play#0 6 0 640
Play#0 input carg * ?shell#0
Play#0 command cargo

View file

@ -88,6 +88,8 @@ edit s 0 U 24 L 2,2 U 25 L 4,2
edit s 1 U 26 L 2,2
| landlocked in 1,-1
edit s 0 U 27 L 1,-1
| at sea, away from #10
edit s 0 U 28 L 4,0
| next to minefield 11,-5
edit s 0 U 30 L 9,-5 U 31 E 20
edit s 30 U 32 m 1 U 33 U 34 U 35 U 36 U 37 U 38 U 39