]> git.pond.sub.org Git - empserver/commit
update/revolt: Fix land unit casualties
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Apr 2018 14:31:11 +0000 (16:31 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 29 Apr 2018 08:33:48 +0000 (10:33 +0200)
commit60429028e751c5c07f1e45d3f62b1386d2eea84d
treee6200db0a1a956ebd85513f33f366877e7d827f1
parentd111522fe821f0e606161ed75e0e18523f793469
update/revolt: Fix land unit casualties

Fix the bug demonstrated by the previous commit:
take_casualties_from_lands() limits total casualties to @each.  It
should limit each land unit's casualties, and only if !may_kill.  This
can lead to fewer casualties than called for; oops in
take_casualties().  Broken in commit 025e9cc25, v4.4.0.

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