]> git.pond.sub.org Git - empserver/commit
update/revolt: Change security unit bonus to fix body count
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 17 Sep 2016 09:24:55 +0000 (11:24 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:19 +0000 (20:09 +0200)
commit849af9e06c6863ace80b78fed654f1a57a63d3b3
treeb4acfd4861262d1344761e1b4266db5e19c773c9
parent3e59bf1d6a26cd974f408125533e221917425a32
update/revolt: Change security unit bonus to fix body count

Both ordinary ground combat and guerrilla combat basically kill
combatants one by one randomly until one side is eliminated.  The odds
of each side taking a hit are computed from combat strengths.

Ordinary combat factors bonuses into the odds.  It doesn't mess with
the number of men.

Guerrilla combat does the same for the bonus due to relative
happiness.  It doesn't for land units with security capability: these
fight as if they had twice as many military.  Changes both odds and
number of men.  This inflates the body count reported to the sector
owner.  Visible in tests/update/journal.log, where rebels kill 110 out
of 70 military.  It also complicates take_casualties().  Has been that
way since security land units were added in Chainsaw 3.

To fix the body count and simplify take_casualties(), make capability
security affect only the odds, not the number of men.  Without further
adjustments, this would reduce guerrilla losses: fewer men mean fewer
combat rounds mean fewer chances for rebels to die.  To compensate,
increase the multiplier from two to four.  This should make security
units a bit tougher.  Document the bonus in "info Guerrilla".

More body count bugs remain.

Reusing ordinary combat rules and code for guerrilla combat would be
nice, but isn't feasible for me right now.

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