]> git.pond.sub.org Git - empserver/commit
update/revolt: Destroy land units only when casualties demand it
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 18 Sep 2016 15:09:35 +0000 (17:09 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:19 +0000 (20:09 +0200)
commit35ecc008ce102e1afdcd677692e0b24f4dc00818
tree2f6067949e291baafb2c80463fe7d20f5947efb1
parent4fd1e889c8f5b21326a2a34eaa7cd83344752118
update/revolt: Destroy land units only when casualties demand it

take_casualties() first applies casualties without destroying land
units, and if any remain, applies them by destroying land units.  This
is wrong, because the remaining casualties may not suffice to actually
kill.  Has been that way since land units were added in Chainsaw 3.

Apply remaining casualties more carefully: destroy land units only
when efficiency falls below 10%.

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