]> git.pond.sub.org Git - empserver/commit
update/revolt: Don't kill land units without military
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 26 Jul 2016 05:16:45 +0000 (07:16 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:19 +0000 (20:09 +0200)
commit8a3eb898ce756f4922ded52d39acb17dd81c94d4
treeb9d5af012e3557e12368d6ad08fcd04df43c523a
parentd8e19174ae5e07d9600057eef41a2298f04f01d0
update/revolt: Don't kill land units without military

Land units without military can't contribute to the fight.  They can
still get killed, and whether they are depends on their UID.

take_casualties() kills land units in UID order until the required
number of casualties is reached.  Killing a land unit without military
provides none, but take_casualties() doesn't care.  The land unit
"dies fighting guerrillas", which makes no sense when it's doesn't
have any military.

If the rebels win, they attempt to capture any surviving land units.
Spies hide or get executed instead.  Same as for any other violent
sector takeover.

Normal ground combat ignores land units without military.  Do the same
here: ignore them in take_casualties().  This protects spies and other
land units without military from the fighting, but exposes them to
capture.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/update/revolt.c
tests/update/99-POGO
tests/update/final.xdump
tests/update/journal.log