Don't store land unit stats in struct lndstr, part 1

New lnd_att(), lnd_def(), lnd_vul(), lnd_spd(), lnd_vis(), lnd_frg(),
lnd_acc(), lnd_dam(), lnd_aaf() replace the struct lndstr members with
the same names.

Make land unit selectors att, def, vul, spd, vis, frg, acc, dam, aaf
virtual.
This commit is contained in:
Markus Armbruster 2008-03-04 21:20:23 +01:00
parent f86d726406
commit cdf1bcfa22
13 changed files with 185 additions and 68 deletions

View file

@ -118,7 +118,7 @@ landdamage(struct lndstr *lp, int dam)
damage_factor = m / (m + lp->lnd_harden);
/* vulnerable units take more damage */
damage_factor *= lp->lnd_vul / 100.0;
damage_factor *= lnd_vul(lp) / 100.0;
land_damage(lp, ldround(damage_factor * dam, 1));
}