.NA sweep "Use planes to remove mines from sea sectors"
.LV Expert
.SY "sweep <PLANES> <ESCORTS> <SECT> route|destination"
-The \*Qsweep\*U command is identical to the recon command, except
-that if you use planes capable of minesweeping, they will sweep
-sea mines from sectors along their route.
+The \*Qsweep\*U command is used to sweep sea mines from the sectors
+along the route.
.s1
<PLANES> represents a list of planes which are to perform the
-intelligence gathering operation.
-Only planes with sufficient mobility, based in a sector stocked with
-petrol, will be successfully selected for the mission.
+mine-sweeping mission.
+Only planes with capability sweep and sufficient mobility, based in a
+sector stocked with petrol, will be successfully selected for the
+mission.
.s1
<ESCORTS> represent a list of fighter planes which are capable of escorting
the transports all the way to the target.
If the destination sector is not an airport, then all planes in
the mission must have V/STOL capability.
.s1
-Planes with the ASW ability will
-perform a sonar search on each sector as they fly through it.
-Each sub contact will be reported only once, giving the sector and number
-of the sub, from the sector in which it
-is first detected (which may not be the sector the sub is in, as plane
-sonar has a range dependent on acc, and a chance of finding a sub of
-((100-acc)-(4-sub visib)*10))+((100-effic)/5) percent.
-The sub being sonared may detect the sonar ping.
-.s1
-Planes with the sweep ability will
+Planes will
automatically attempt to sweep sea mines in sea sectors they overfly.
Their chance of sweeping is (100-acc), and they can only sweep 1 mine per
overflight of the sector.
.s1
+The planes will additionally gather intelligence, just like they do on
+a recon mission. See info \*Qrecon\*U.
+.s1
Note that a plane must be at least 40% efficient before it can leave
the ground.
.s1
int
reco(void)
{
+ int mission_flags = player->argp[0][0] == 's' ? PM_R | PM_S : PM_R;
coord tx, ty;
coord ax, ay;
int ap_to_target;
* select planes within range
*/
pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target,
- 1, wantflags, P_M | P_O);
+ 1, wantflags | (mission_flags & PM_S ? P_SWEEP : 0), P_M | P_O);
if (QEMPTY(&bomb_list)) {
pr("No planes could be equipped for the mission.\n");
return RET_FAIL;
return RET_FAIL;
}
pln_arm(&esc_list, ap_to_target, 'e', NULL);
- ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath,
- *player->argp[0] == 's' ? PM_R | PM_S : PM_R);
+ ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags);
if (QEMPTY(&bomb_list)) {
pr("No planes got through fighter defenses\n");
} else {