]> git.pond.sub.org Git - empserver/commit
assault: Make spies "sneaking ashore" use mobility and hit mines
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jul 2016 21:18:06 +0000 (23:18 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:18 +0000 (20:09 +0200)
commit9f851c9f03900b946e77462aad34f7d903fec5d1
tree4a9d70c0aba048f447759e48726a431ea60c56ba
parent36e3caf97eb73cc86a24cd3000e4c2f7277f8faf
assault: Make spies "sneaking ashore" use mobility and hit mines

Assaulting a foreign sector with nothing but spies is special: the
spies sneak ashore.  It is, however, more special than it should be:
the spies use no mobility and ignore landmines.  They do use mobility
and hit landmines in other assaults.  Assaulting your own sector with
nothing but spies is more costly and more risky than assaulting a
foreign one.  This makes no sense.  Has been that way since spies were
added in 4.0.0.

It's that way because sneaking ashore uses its own code to move the
spies instead of move_in_land() via att_move_in_off().  It can't use
move_in_land(), because that prints an unwanted "now occupies"
message, and destroys the list of assaulting units, which we still
need to catch and shoot spies.

Factor the code to move attacking land units to the target sector out
of move_in_land() into att_move_land(), and use that for sneaking
ashore.  This makes the spies use mobility and hit landmines even when
they sneak.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/combat.h
src/lib/commands/assa.c
src/lib/subs/attsub.c