continue;
if (mchr[(int)ship.shp_type].m_flags & M_SUB) {
- if (shell < M_TORP_SHELLS)
+ if (shell < SHP_TORP_SHELLS)
shell += supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
- I_SHELL, M_TORP_SHELLS - shell);
- if (shell < M_TORP_SHELLS)
+ I_SHELL, SHP_TORP_SHELLS - shell);
+ if (shell < SHP_TORP_SHELLS)
continue;
if (gun < 1)
continue;
item = ship.shp_item;
if (mchr[(int)ship.shp_type].m_flags & M_SUB) {
shell = item[I_SHELL];
- shell -= M_TORP_SHELLS - 1;
+ shell -= SHP_TORP_SHELLS - 1;
if (shell < 0)
shell = 0;
item[I_SHELL] = shell;
if ((mchr[(int)sub.shp_type].m_flags & M_TORP) == 0)
continue;
shells = sub.shp_item[I_SHELL];
- if (shells < M_TORP_SHELLS)
+ if (shells < SHP_TORP_SHELLS)
shells += supply_commod(sub.shp_own, sub.shp_x, sub.shp_y,
- I_SHELL, M_TORP_SHELLS - shells);
- if (sub.shp_item[I_GUN] == 0 || shells < M_TORP_SHELLS)
+ I_SHELL, SHP_TORP_SHELLS - shells);
+ if (sub.shp_item[I_GUN] == 0 || shells < SHP_TORP_SHELLS)
continue;
if (sub.shp_item[I_MILIT] < 1)
continue;
continue;
}
shells = sub.shp_item[I_SHELL];
- if (shells < M_TORP_SHELLS)
+ if (shells < SHP_TORP_SHELLS)
shells += supply_commod(sub.shp_own, sub.shp_x, sub.shp_y,
- I_SHELL, M_TORP_SHELLS - shells);
- if (sub.shp_item[I_GUN] == 0 || shells < M_TORP_SHELLS) {
+ I_SHELL, SHP_TORP_SHELLS - shells);
+ if (sub.shp_item[I_GUN] == 0 || shells < SHP_TORP_SHELLS) {
pr("Ship #%d has insufficient armament\n", sub.shp_uid);
continue;
}
techfact(sub.shp_tech, ((double)sub.shp_frnge));
erange = (double)roundrange(erange);
pr("Effective torpedo range is %.1f\n", erange);
- shells -= M_TORP_SHELLS;
+ shells -= SHP_TORP_SHELLS;
sub.shp_item[I_SHELL] = shells;
putship(sub.shp_uid, &sub);
mcp = &mchr[(int)sub.shp_type];
shells = sp->shp_item[I_SHELL];
- if (shells < M_TORP_SHELLS)
+ if (shells < SHP_TORP_SHELLS)
shells += supply_commod(sp->shp_own, sp->shp_x, sp->shp_y, I_SHELL,
- M_TORP_SHELLS - shells);
+ SHP_TORP_SHELLS - shells);
- if (sp->shp_item[I_GUN] == 0 || shells < M_TORP_SHELLS)
+ if (sp->shp_item[I_GUN] == 0 || shells < SHP_TORP_SHELLS)
return 0;
if (sp->shp_item[I_MILIT] < 1)
return 0;
/* All set.. fire! */
- shells -= M_TORP_SHELLS;
+ shells -= SHP_TORP_SHELLS;
sp->shp_item[I_SHELL] = shells;
putship(sp->shp_uid, sp);
if (gun < 1)
continue;
shell = sp->shp_item[I_SHELL];
- if (shell < M_TORP_SHELLS)
+ if (shell < SHP_TORP_SHELLS)
shell += supply_commod(sp->shp_own,
sp->shp_x, sp->shp_y, I_SHELL,
- M_TORP_SHELLS - shell);
- if (shell < M_TORP_SHELLS)
+ SHP_TORP_SHELLS - shell);
+ if (shell < SHP_TORP_SHELLS)
continue;
range = sp->shp_effic * techfact(sp->shp_tech,
if (!line_of_sight((s_char **)0, x, y, gp->x, gp->y))
continue;
- sp->shp_item[I_SHELL] = shell - M_TORP_SHELLS;
+ sp->shp_item[I_SHELL] = shell - SHP_TORP_SHELLS;
mobcost = sp->shp_effic * 0.01 * sp->shp_speed;
mobcost = (480.0 / (mobcost +
techfact(sp->shp_tech, mobcost)));