Land units pay a mobility penalty when marching into a non-old-owned
sector without sector mobility, to slow them down in newly taken
sectors. Attacking land units pay this penalty regardless of sector
mobility.
When attacking out of an allied sector, the penalty was computed as if
the land unit was owned by that ally. Attacking sectors old-owned by
that ally was too cheap, and taking back one's own was too expensive.
Broken since attacking land units pay the "newly taken" mobility
penalty: commit
2e693275, v4.3.6.
* of high-mobility sectors (mountains): for those we
* still require attack mobility.
*/
- pathcost = att_mobcost(off->own, def, lnd_mobtype(&land));
+ pathcost = att_mobcost(land.lnd_own, def, lnd_mobtype(&land));
mobcost = lnd_pathcost(&land, pathcost);
if (pathcost < 1.0) {
if (land.lnd_mobil <= 0) {
switch (combat_mode) {
case A_ATTACK:
mobcost = lnd_pathcost(&llp->unit.land,
- att_mobcost(off->own, def,
+ att_mobcost(llp->unit.land.lnd_own, def,
lnd_mobtype(&llp->unit.land)));
break;
case A_ASSAULT: