Fix bad line breaks.

This commit is contained in:
Markus Armbruster 2005-11-29 17:34:42 +00:00
parent e89fb0bb17
commit f5c81fe39e

View file

@ -109,8 +109,8 @@ bomb(void)
if (!snxtitem(&ni_esc, EF_PLANE, if (!snxtitem(&ni_esc, EF_PLANE,
getstarg(player->argp[2], "escort(s)? ", buf))) getstarg(player->argp[2], "escort(s)? ", buf)))
pr("No escorts...\n"); pr("No escorts...\n");
if ((p = p = getstarg(player->argp[3], "pinpoint, or strategic? ", buf);
getstarg(player->argp[3], "pinpoint, or strategic? ", buf)) == 0) if (!p)
return RET_SYN; return RET_SYN;
mission = *p; mission = *p;
if (strchr("ps", mission) == 0) if (strchr("ps", mission) == 0)
@ -354,9 +354,8 @@ eff_bomb(struct emp_qelem *list, struct sctstr *target)
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
continue; continue;
if (plp->bombs || plp->plane.pln_nuketype != -1) if (plp->bombs || plp->plane.pln_nuketype != -1)
dam += dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', 'p', &nukedam, 1);
&nukedam, 1);
} }
if (dam <= 0) /* dam == 0 if only nukes were delivered */ if (dam <= 0) /* dam == 0 if only nukes were delivered */
return; return;
@ -441,9 +440,8 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target)
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
continue; continue;
if (plp->bombs || plp->plane.pln_nuketype != -1) if (plp->bombs || plp->plane.pln_nuketype != -1)
dam += dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', 'p', &nukedam, 1);
&nukedam, 1);
} }
if (dam <= 0) /* dam == 0 if only nukes were delivered */ if (dam <= 0) /* dam == 0 if only nukes were delivered */
return; return;
@ -565,21 +563,19 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
if (plp->plane.pln_nuketype != -1) if (plp->plane.pln_nuketype != -1)
hitchance = 100; hitchance = 100;
else { else {
hitchance = hitchance = pln_hitchance(&plp->plane,
pln_hitchance(&plp->plane, shp_hardtarget(&ship), EF_SHIP); shp_hardtarget(&ship), EF_SHIP);
pr("%d%% hitchance...", hitchance); pr("%d%% hitchance...", hitchance);
} }
if (roll(100) <= hitchance) { if (roll(100) <= hitchance) {
/* pinbombing is more accurate than normal bombing */ /* pinbombing is more accurate than normal bombing */
dam = dam = 2 * pln_damage(&plp->plane, target->sct_x, target->sct_y,
2 * pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 1);
'p', &nukedam, 1);
} else { } else {
pr("splash\n"); pr("splash\n");
/* Bombs that miss have to land somewhere! */ /* Bombs that miss have to land somewhere! */
dam = dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p',
pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 0);
&nukedam, 0);
collateral_damage(target->sct_x, target->sct_y, dam, list); collateral_damage(target->sct_x, target->sct_y, dam, list);
dam = 0; dam = 0;
} }
@ -681,15 +677,13 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
} }
if (roll(100) <= hitchance) { if (roll(100) <= hitchance) {
/* pinbombing is more accurate than normal bombing */ /* pinbombing is more accurate than normal bombing */
dam = dam = 2 * pln_damage(&plp->plane, target->sct_x, target->sct_y,
2 * pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 1);
'p', &nukedam, 1);
} else { } else {
pr("thud\n"); pr("thud\n");
/* Bombs that miss have to land somewhere! */ /* Bombs that miss have to land somewhere! */
dam = dam = pln_damage(&plp->plane, target->sct_x, target->sct_y,
pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', 'p', &nukedam, 0);
&nukedam, 0);
collateral_damage(target->sct_x, target->sct_y, dam, list); collateral_damage(target->sct_x, target->sct_y, dam, list);
dam = 0; dam = 0;
} }
@ -796,20 +790,18 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
if (plp->plane.pln_nuketype != -1) if (plp->plane.pln_nuketype != -1)
hitchance = 100; hitchance = 100;
else { else {
hitchance = hitchance = pln_hitchance(&plp->plane,
pln_hitchance(&plp->plane, lnd_hardtarget(&land), EF_LAND); lnd_hardtarget(&land), EF_LAND);
pr("%d%% hitchance...", hitchance); pr("%d%% hitchance...", hitchance);
} }
if (roll(100) <= hitchance) { if (roll(100) <= hitchance) {
dam = dam = 2 * pln_damage(&plp->plane, target->sct_x, target->sct_y,
2 * pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 1);
'p', &nukedam, 1);
} else { } else {
pr("thud\n"); pr("thud\n");
/* Bombs that miss have to land somewhere! */ /* Bombs that miss have to land somewhere! */
dam = dam = pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p',
pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 0);
&nukedam, 0);
collateral_damage(target->sct_x, target->sct_y, dam, list); collateral_damage(target->sct_x, target->sct_y, dam, list);
dam = 0; dam = 0;
} }
@ -849,9 +841,8 @@ strat_bomb(struct emp_qelem *list, struct sctstr *target)
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
continue; continue;
if (plp->bombs || plp->plane.pln_nuketype != -1) if (plp->bombs || plp->plane.pln_nuketype != -1)
dam += dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, 's',
pln_damage(&plp->plane, target->sct_x, target->sct_y, 's', &nukedam, 1);
&nukedam, 1);
} }
if (dam <= 0) /* dam == 0 if only nukes were delivered */ if (dam <= 0) /* dam == 0 if only nukes were delivered */
return; return;