]> git.pond.sub.org Git - empserver/commit
march attack assault: Hit mines like ships do
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 29 Dec 2014 17:05:30 +0000 (18:05 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Feb 2015 15:13:15 +0000 (16:13 +0100)
commitf1042f82f1415a69ecded29b541507147f9698ac
treebd1c3c4056b4ef260063eda18afd4e6928a28091
parent5ce7419ef799b367f704fffb4c39d39558a99120
march attack assault: Hit mines like ships do

When ships enter a sector with sea mines, any minesweepers sweep, then
hit mines, and finally all ships (including the minesweepers) hit
mines.  Sweeping in a sector (navigate sub-command 'm') works the same
without the final step.

When land units enter a sector with land mines, any engineers sweep,
and then all land units (including the engineers) hit mines.  Sweeping
in a sector (march sub-command 'm') works the same, which means
non-engineers can hit mines then.  Broken in Empire 2.

Actually broken for ships too then.  4.0.17 fixed ships, but neglected
to fix land units.

Change the land unit code to work like the ship code.  Fixes march
sub-command 'm' not to expose non-engineers to mines.  Changes march,
attack and assault with option INTERDICT_ATT enabled to expose
engineers twice.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/land.h
src/lib/commands/navi.c
src/lib/subs/lndsub.c
tests/navi-march/02-march-1
tests/navi-march/final.xdump
tests/navi-march/journal.log