(shp_mobcost): New.
(use_ammo, eta_calc, torp, fire_torp, perform_mission, retreat_ship1) (shp_sweep, shp_nav_one_sector, cost_ship): Use it. (perform_mission): Fix mobility cost of torpedo: charged full sector cost instead of half.
This commit is contained in:
parent
2cd8e99f49
commit
16b9c41b39
8 changed files with 18 additions and 54 deletions
|
@ -437,7 +437,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
|||
int dam = 0, dam2, mission_flags, tech;
|
||||
natid plane_owner = 0;
|
||||
int gun, shell, md, range, air_dam = 0;
|
||||
double prb, mobcost, hitchance, vrange;
|
||||
double prb, hitchance, vrange;
|
||||
|
||||
getsect(x, y, §);
|
||||
|
||||
|
@ -559,10 +559,7 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
|||
if (!line_of_sight(NULL, x, y, gp->x, gp->y))
|
||||
continue;
|
||||
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)));
|
||||
sp->shp_mobil -= mobcost;
|
||||
sp->shp_mobil -= shp_mobcost(sp) / 2.0;
|
||||
putship(sp->shp_uid, sp);
|
||||
hitchance = DTORP_HITCHANCE(md, sp->shp_visib);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue