pr("%s is on a ship and can't be fortified\n", prland(&land));
continue;
}
+ if (land.lnd_land >= 0) {
+ pr("%s is on a land unit and can't be fortified\n", prland(&land));
+ continue;
+ }
hard_amt = fort_amt;
continue;
}
- nunits++;
-
- lnd_fortify (&land, hard_amt);
+ if (lnd_fortify (&land, hard_amt) <= 0) {
+ pr("%s can't be fortified%s\n", prland(&land),
+ land.lnd_harden >= land_mob_max ? " any further" : "");
+ continue;
+ }
+ nunits++;
pr("%s hardened to %d\n", prland(&land), land.lnd_harden);
putland(land.lnd_uid, &land);