Factor out common fortress fire code into fort_fire()

This takes care of a number of bugs / inconsistencies:

* sb() fired support even when there were not enough mil.

* Shell resupply bugs: multifire() and quiet_bigdef() resupplied
  shells before checking all other requirements and could thus get
  more shells than actually needed.

Rename landgun() to fortgun() for consistency.
This commit is contained in:
Markus Armbruster 2008-03-14 20:01:05 +01:00
parent 3812cde100
commit e8595066d1
8 changed files with 50 additions and 81 deletions

View file

@ -83,7 +83,7 @@ sabo(void)
continue;
}
dam = landgun(3 * land.lnd_effic, 7);
dam = fortgun(3 * land.lnd_effic, 7);
if (sect.sct_item[I_SHELL] > 20)
dam += seagun(land.lnd_effic,
random() % (sect.sct_item[I_SHELL] / 10));