}
resupply_all(&land);
putland(land.lnd_uid, &land);
- if (!has_supply(&land)) {
+ if (!lnd_in_supply(&land)) {
pr("%s is out of supply, and cannot %s\n",
prland(&land), att_mode[combat_mode]);
continue;
}
memset(llp, 0, sizeof(struct ulist));
emp_insque(&llp->queue, list);
- llp->supplied = has_supply(&land);
+ resupply_all(&land);
+ putland(land.lnd_uid, &land);
+ llp->supplied = lnd_in_supply(&land);
if (!get_land(A_DEFEND, def, land.lnd_uid, llp, 1))
continue;
if (lnd_spyval(&land) > *d_spyp)
continue;
/* Only supplied units can react */
- if (!has_supply(&land))
- continue;
+ if (list) {
+ resupply_all(&land);
+ putland(land.lnd_uid, &land);
+ if (!lnd_in_supply(&land))
+ continue;
+ } else {
+ if (!lnd_could_be_supplied(&land))
+ continue;
+ }
if (!in_oparea((struct empobj *)&land, def->x, def->y))
continue;