mcp = &mchr[(int)ship.shp_type];
if (mcp->m_flags & M_SUB)
continue;
- if (getrel(getnatp(ship.shp_own), plane_owner) > HOSTILE)
+ if (relations_with(ship.shp_own, plane_owner) > HOSTILE)
continue;
gun = shp_usable_guns(&ship);
if (gun == 0)
continue;
if (land.lnd_ship >= 0 || land.lnd_land >= 0)
continue;
- if (getrel(getnatp(land.lnd_own), plane_owner) > HOSTILE)
+ if (relations_with(land.lnd_own, plane_owner) > HOSTILE)
continue;
flak = aaf * 1.5 * land.lnd_effic / 100.0;
ngun += flak;
memset(mi, 0, sizeof(mi));
act[0] = 0;
for (cn = 1; cn < MAXNOC; cn++) {
- act[cn] = getrel(getnatp(cn), victim) <= HOSTILE;
+ act[cn] = relations_with(cn, victim) <= HOSTILE;
emp_initque((struct emp_qelem *)&mi[cn]);
}
prplane(pp), xyas(x, y, pp->pln_own));
continue;
}
- if (getrel(getnatp(pp->pln_own), victim) > HOSTILE) {
+ if (relations_with(pp->pln_own, victim) > HOSTILE) {
wu(0, pp->pln_own,
"\t%s tracks %s %s at %s\n",
prplane(pp), cname(victim), s, xyas(x, y, pp->pln_own));
if (mission &&
plane.pln_radius < mapdist(x, y, plane.pln_opx, plane.pln_opy))
continue;
- if (getrel(getnatp(plane.pln_own), victim) >= NEUTRAL)
+ if (relations_with(plane.pln_own, victim) >= NEUTRAL)
continue;
/* missiles go one way, so we can use all the range */
if (plane.pln_range < mapdist(x, y, plane.pln_x, plane.pln_y))
return;
if (!chance((double)-nice * times / 20.0))
return;
- if (getrel(getnatp(victim), actor) < HOSTILE)
+ if (relations_with(victim, actor) < HOSTILE)
return;
setrel(victim, actor, HOSTILE);
return 0; /* Only coastwatch notify in nofortfire */
/* Only fire at Hostile ships */
for (i = 0; i < MAXNOC; ++i) {
- if (getrel(getnatp(i), victim) >= NEUTRAL)
+ if (relations_with(i, victim) >= NEUTRAL)
notified[i] = 0;
}
snxtsct_dist(&ns, newx, newy, fort_max_interdiction_range);
if (!(mchr[(int)ship.shp_type].m_flags & M_ANTIMISSILE))
continue;
- if (getrel(getnatp(ship.shp_own), bombown) >= NEUTRAL)
+ if (relations_with(ship.shp_own, bombown) >= NEUTRAL)
continue;
if (ship.shp_effic < 60)