subs: Change pln_damage()'s parameter noisy to string prefix
No functional change for now. The next commit will put it to use. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
9e643dad00
commit
820d755e59
8 changed files with 26 additions and 24 deletions
|
@ -275,7 +275,7 @@ eff_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
plp = (struct plist *)qp;
|
||||
if (changed_plane_aborts(plp))
|
||||
continue;
|
||||
dam += pln_damage(&plp->plane, 'p', 1);
|
||||
dam += pln_damage(&plp->plane, 'p', "");
|
||||
}
|
||||
getsect(target->sct_x, target->sct_y, §);
|
||||
target = §
|
||||
|
@ -348,7 +348,7 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
plp = (struct plist *)qp;
|
||||
if (changed_plane_aborts(plp))
|
||||
continue;
|
||||
dam += pln_damage(&plp->plane, 'p', 1);
|
||||
dam += pln_damage(&plp->plane, 'p', "");
|
||||
}
|
||||
getsect(target->sct_x, target->sct_y, §);
|
||||
target = §
|
||||
|
@ -457,7 +457,7 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
}
|
||||
if (pct_chance(hitchance)) {
|
||||
/* pinbombing is more accurate than normal bombing */
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', 1);
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', "");
|
||||
} else {
|
||||
pr("splash\n");
|
||||
/* Bombs that miss have to land somewhere! */
|
||||
|
@ -556,7 +556,7 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
}
|
||||
if (pct_chance(hitchance)) {
|
||||
/* pinbombing is more accurate than normal bombing */
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', 1);
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', "");
|
||||
} else {
|
||||
pr("thud\n");
|
||||
/* Bombs that miss have to land somewhere! */
|
||||
|
@ -664,7 +664,7 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
pr("%d%% hitchance...", hitchance);
|
||||
}
|
||||
if (pct_chance(hitchance)) {
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', 1);
|
||||
dam = 2 * pln_damage(&plp->plane, 'p', "");
|
||||
} else {
|
||||
pr("thud\n");
|
||||
/* Bombs that miss have to land somewhere! */
|
||||
|
@ -703,7 +703,7 @@ strat_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
detonate(&nuke, target->sct_x, target->sct_y,
|
||||
plp->plane.pln_flags & PLN_AIRBURST);
|
||||
else
|
||||
dam += pln_damage(&plp->plane, 's', 1);
|
||||
dam += pln_damage(&plp->plane, 's', "");
|
||||
}
|
||||
if (dam <= 0)
|
||||
return;
|
||||
|
|
|
@ -239,7 +239,7 @@ launch_missile(struct plnstr *pp)
|
|||
if (getnuke(nuk_on_plane(pp), &nuke))
|
||||
detonate(&nuke, sx, sy, pp->pln_flags & PLN_AIRBURST);
|
||||
else {
|
||||
dam = pln_damage(pp, 's', 1);
|
||||
dam = pln_damage(pp, 's', "");
|
||||
pr("did %d damage in %s\n", PERCENT_DAMAGE(dam),
|
||||
xyas(sx, sy, player->cnum));
|
||||
if (sect.sct_own != 0) {
|
||||
|
@ -268,11 +268,11 @@ launch_missile(struct plnstr *pp)
|
|||
N_SHP_MISS, N_SHP_SMISS, sublaunch,
|
||||
target_ship.shp_own)) {
|
||||
pr("splash\n");
|
||||
dam = pln_damage(pp, 'p', 0);
|
||||
dam = pln_damage(pp, 'p', NULL);
|
||||
collateral_damage(target_ship.shp_x, target_ship.shp_y, dam);
|
||||
return RET_OK;
|
||||
}
|
||||
dam = pln_damage(pp, 'p', 1);
|
||||
dam = pln_damage(pp, 'p', "");
|
||||
shipdamage(&target_ship, dam);
|
||||
if (target_ship.shp_effic < SHIP_MINEFF)
|
||||
pr("%s sunk!\n", prship(&target_ship));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue