+ power value of commodities in sectors
+ power value of commodities loaded on ships and land units)
* (20 + nation tech level) / 500
- + power value of ships, planes and land units
+ + power value of ships, planes, land units and nukes
* (20 + their tech level) / 500
.FI
.s1
.s1
The power value of a sector is efficiency / 10.
.s1
-The power value of a ship, plane or land unit is the power value of
-the materials and money needed to build * efficiency / 100.
+The power value of a ship, plane, land unit or nuke is the power value
+of the materials and money needed to build * efficiency / 100.
.s1
The power value of commodities is amount * type factor. \*Qshow
item\*U shows the type factor in column \*Qpower\*U.
#include "commands.h"
#include "item.h"
#include "land.h"
+#include "nuke.h"
#include "optlist.h"
#include "plane.h"
#include "power.h"
struct mchrstr *mcp;
struct lndstr land;
struct lchrstr *lcp;
+ struct nukstr nuke;
+ struct nchrstr *ncp;
struct nstr_item ni;
struct nstr_sect ns;
struct natstr *natp;
pcp->pl_mat, pcp->pl_cost);
pow->p_planes += 1.0;
}
+ snxtitem_all(&ni, EF_NUKE);
+ while (nxtitem(&ni, &nuke)) {
+ if (nuke.nuk_own == 0)
+ continue;
+ ncp = &nchr[nuke.nuk_type];
+ pow = &powbuf[nuke.nuk_own];
+ upower[nuke.nuk_own] += empunit_power(nuke.nuk_effic,
+ nuke.nuk_tech,
+ ncp->n_mat, ncp->n_cost);
+ }
for (i = 1; NULL != (natp = getnatp(i)); i++) {
pow = &powbuf[i];
pow->p_nation = i;