sectors to it. In order to export something from a sector, you must have
military control of the sector. In order to import something from a
distribution sector, you must have military control of the distribution
-sector. (Military control is defined as having mil in the sector equal
-to at least 1/10th the number of unconverted civilians there. Units count
-as if they were straight mil, i.e. a 100% unit that contained 50 mil would
-count as 50 mil for the purposes of control)
+sector.
+.s1
+Military control is defined as having military in the sector equal to
+at least 1/10th the number of unconverted civilians there. Military
+in land units count towards military control. Military in efficient
+security units count double.
.s1
Mobility is used from the sector when sending \*Qto\*U the distribution sector.
When getting something \*Qfrom\*U the distribution sector, mobility is paid
is equivalent to a \*Qmap\*U command, like
this:
.EX map # ls
+.s1
.L "Military control"
.s1
-In order to move something (other than mil) out of a sector, you must have
-military control of the sector. Military control is defined as having mil in
-the sector equal to at least 1/10th the number of unconverted civilians there.
-Units count as if they were straight mil, i.e. a 100% unit that contained 50
-mil would count as 50 mil for the purposes of control)
+In order to move something (other than military) out of a sector, you
+must have military control of the sector. Military control is defined
+as having military in the sector equal to at least 1/10th the number
+of unconverted civilians there.
+.s1
+Military in land units count towards military control. Military in
+efficient security units count double.
.s1
.L Mobility
See \*Qinfo Mobility\*U for a description of how much mobility it costs to
/*
* Return strength of security detail in @sp.
* Store sum of efficiency of land units with security capability in
- * @seceffp.
+ * @seceffp unless it is null.
*/
double
security_strength(struct sctstr *sp, int *seceffp)
}
}
- *seceffp = seceff;
+ if (seceffp)
+ *seceffp = seceff;
return strength;
}
int
military_control(struct sctstr *sp)
{
- int tot_mil = 0;
- struct nstr_item ni;
- struct lndstr land;
+ int tot_mil;
if (sp->sct_oldown != sp->sct_own) {
- snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
- while (nxtitem(&ni, &land)) {
- if (land.lnd_ship >= 0 || land.lnd_land >= 0)
- continue;
- if (land.lnd_own == sp->sct_own)
- tot_mil += land.lnd_item[I_MILIT];
- }
- if ((sp->sct_item[I_MILIT] + tot_mil) * 10 < sp->sct_item[I_CIVIL])
+ tot_mil = sp->sct_item[I_MILIT] + security_strength(sp, NULL);
+ if (tot_mil * 10 < sp->sct_item[I_CIVIL])
return 0;
}