]> git.pond.sub.org Git - empserver/commit - src/lib/subs/aircombat.c
(FLAK_GUN_MAX): New.
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 10 Jun 2006 18:26:57 +0000 (18:26 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 10 Jun 2006 18:26:57 +0000 (18:26 +0000)
commit3a4e362de517b9a712e8928a0bae2da47fb9295c
tree4d9fa788116e700bb15fc8c995eda938959fee26
parent17759f10712e58618b50b2bf23a71f986fbdaa99
(FLAK_GUN_MAX): New.
(ac_doflak, ac_shipflak, ac_landflak): Use it.
(ac_shipflak, ac_landflak): Tally flak for all ships / units, then
limit to FLAK_GUN_MAX guns of average tech.  Used to limit to
FLAK_GUN_MAX guns *after* ship / land unit tech factor was applied by
exiting the loop early, then reduce *again* for nation tech of whoever
owns the last ship visited.  Makes no sense.  Exiting the loop early
is no good, because it can skip plane spotting.  This change and the
one below make low-tech ship and land unit flak more powerful;
rebalancing might be needed.

(ac_doflak, ac_landflak, ac_shipflak): Round flak randomly instead of
down.  This simplifies things.  In particular, you no longer have to
calculate how many low-tech ships to bunch together to get any flak.
src/lib/subs/aircombat.c