Change test whether a land unit is artillery

Test for land unit firing damage instead of range, for consistency
with ships.
This commit is contained in:
Markus Armbruster 2008-03-03 07:29:24 +01:00
parent 22c6fd8bf6
commit 69f441ef39
4 changed files with 5 additions and 5 deletions

View file

@ -149,7 +149,7 @@ multifire(void)
if (item.land.lnd_own != player->cnum) if (item.land.lnd_own != player->cnum)
continue; continue;
if (fland.lnd_frg == 0) { if (fland.lnd_dam == 0) {
pr("Unit %d cannot fire!\n", fland.lnd_uid); pr("Unit %d cannot fire!\n", fland.lnd_uid);
continue; continue;
} }
@ -357,7 +357,7 @@ multifire(void)
fx = fland.lnd_x; fx = fland.lnd_x;
fy = fland.lnd_y; fy = fland.lnd_y;
if (fland.lnd_frg == 0) { if (fland.lnd_dam == 0) {
pr("Unit %d cannot fire!\n", fland.lnd_uid); pr("Unit %d cannot fire!\n", fland.lnd_uid);
continue; continue;
} }

View file

@ -227,7 +227,7 @@ mission(void)
} }
if ((mission == MI_INTERDICT) && (type == EF_LAND)) if ((mission == MI_INTERDICT) && (type == EF_LAND))
if (lchr[(int)gp->type].l_frg < 1) { if (lchr[(int)gp->type].l_dam == 0) {
pr("%s: cannot fire at range!\n", obj_nameof(gp)); pr("%s: cannot fire at range!\n", obj_nameof(gp));
continue; continue;
} }

View file

@ -1136,7 +1136,7 @@ lnd_support(natid victim, natid attacker, coord x, coord y, int defending)
snxtitem_all(&ni, EF_LAND); snxtitem_all(&ni, EF_LAND);
while (nxtitem(&ni, &land)) { while (nxtitem(&ni, &land)) {
if (land.lnd_frg == 0) if (land.lnd_dam == 0)
continue; continue;
if ((land.lnd_x == x) && (land.lnd_y == y)) if ((land.lnd_x == x) && (land.lnd_y == y))
continue; continue;

View file

@ -546,7 +546,7 @@ use_supply(struct lndstr *lp)
lp->lnd_item[I_SHELL] = MAX(lp->lnd_item[I_SHELL] - shells_needed, 0); lp->lnd_item[I_SHELL] = MAX(lp->lnd_item[I_SHELL] - shells_needed, 0);
if (lp->lnd_frg) /* artillery */ if (lp->lnd_dam) /* artillery */
goto done; goto done;
food_needed = get_minimum(lp, I_FOOD); food_needed = get_minimum(lp, I_FOOD);