]> git.pond.sub.org Git - empserver/commitdiff
Intercept the same all along the flight path
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 25 Sep 2008 14:22:53 +0000 (10:22 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2009 16:14:39 +0000 (17:14 +0100)
In each sector, any country owning the sector, a surface ship or a
land unit gets to intercept.

Before, only the sector owner got to intercept, except for the target
sector.  There, any country owning surface ships or land units got to
intercept in addition to the sector owner.  Thus, a sector owner with
surface ships or land units there got to intercept twice.

Info Intercept claimed you get to intercept once for ships and once
again for land units, which was wrong since 4.0.9.

Info bomb suggested that flak fires only in the target sector, which
was wrong since 4.2.8.  Drop that.

info/Interception.t
info/bomb.t
info/drop.t
info/fly.t
info/paradrop.t
info/recon.t
info/sweep.t
src/lib/subs/aircombat.c

index 0fc4832086951f0824657373fd9e3473cb6ba479..83d297156199c1b0d8645956c4f769ee71dfcec5 100644 (file)
@@ -3,9 +3,9 @@
 .LV Expert
 .s1
 Each time an enemy plane (i.e. a plane owned by a country that your are
-HOSTILE to or worse) flies into over a sector you own, planes you
+HOSTILE to or worse) flies into over a sector, surface ship or land
+unit you own, planes you
 have with the intercept ability will intercept them if:
-
 .NF
 a) The incoming plane is not stealthy, or is detected.
 b) The sector is within 1/2 the interceptor's range (as modified
@@ -23,6 +23,8 @@ e) There is petrol there equal to 1/2 the plane's fuel rating.
        (rounded down)
 .FI
 .s1
+Neutral and friendly planes will be reported, but not intercepted.
+.s1
 Before planes scramble to intercept incoming planes, flak fires (see
 info Flak), air defense missions are executed (see info mission), and
 any SAMs in range
@@ -115,12 +117,4 @@ his flight path, perhaps to have combat again.
 ABM's do not use the normal combat procedure. They simply have a %
 chance of destroying an incoming warhead equal to their defensive value.
 .s1
-If you have land units in the enemy plane's target sector, your plane will
-intercept the enemy planes AGAIN. If you have non-sub ships in the enemy plane's
-target sector, your planes will intercept them yet again. If you own
-the target sector, and have ships & units there, your planes will therefore
-intercept them a total of three times in that sector. Note that a 'target
-sector' is a sector that is the target of a bombing or para mission. Merely
-having ships in a sector will not cause interception of planes flying over.
-.s1
 .SA "Plane-types, plane, fly, recon, bomb, range, mission, Flak, Planes"
index c77fa73fec82fb475bdaa88e59b797efea45c19b..c0b6addd0b38af7023478e7d707ec186d767b3d5 100644 (file)
@@ -51,28 +51,8 @@ Heavy bombers (with the bomber capability), while they can perform pinpoint
 bombing, are notoriously inaccurate and in general miss what they are aiming
 at.  They are used mainly for strategic bombing.
 .s1
-During the course of a mission,
-your planes may fly over someone else's land.
-If you fly over land owned by another country,
-and this country is either hostile or in any war state (see info relation)
-with you, fighter planes from the enemy country will scramble
-and attempt to intercept your force.
-If the country is simply neutral,
-he will be notified that his radar tracked your planes
-as they flew over his country.
-If the country is allied, then nothing will occur.
-.s1
-If you manage to fight though the enemy fighters and arrive
-at the target sector, your force must still contend with
-any flak guns which your enemy has stationed there.
-What's more, any enemy ship in the target sector will also
-shoot at each of your bombers before any attacks are performed.
-Any enemy land units with the 'flak' ability will also fire at
-all your planes at this time.
-.s1
-A well-equipped fleet of battleships in a heavily-defended harbor
-can be very risky to attack, even though hitting ships in harbor is
-like shooting fish in a barrel.
+Bombing missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
 .s1
 When bombing ships/planes/units, entering a '~' character will cause a
 particular plane not to bomb. Other planes on the mission will still
index 00039930e69039473e68c3bdd90a41d75c79bef9..a0ccf2a4f3b956ed1853656590618fba3147e203 100644 (file)
@@ -33,6 +33,9 @@ When getting a path interactively, empire will show you the information
 you have (from your bmap) concerning the current area, to help you plot
 your course.
 .s1
+Air drop missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
+.s1
 Planes which arrive safely at the target sector will drop the goodies off
 to the waiting people below.
 .s1
index b426c2ff7221c59cc0b59882efbfa5d0756503b3..98d15e0fd5b5f16b592e69db499c532930728316 100644 (file)
@@ -33,8 +33,9 @@ When getting a path interactively, empire will show you the information
 you have (from your bmap) concerning the current area, to help you plot
 your course.
 .s1
-If the transports stray over enemy territory, then they will be
-intercepted and shot at just like any other mission.
+Transport missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
+.s1
 If the destination sector is not an airport, then all planes in
 the mission must have VTOL capability.
 .s1
index 150eb79dd3fd94d18a56ace9847a8ab9c258b3f0..f92d18206626e0237bed0045f4b2c5261c157307 100644 (file)
@@ -28,6 +28,9 @@ destination sector on the command line, or at any time while giving
 the route, and empire will use the best path from the current sector
 to the desired destination sector.
 .s1
+Paradrop missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
+.s1
 If the planes manage to fight through enemy air defenses and arrive
 on-target, each transport in the mission will be shot at by any
 guns present on the ground.
index f6f8f6774a2fd4ffd5cb48e5b7d8bb28dd9b2576..558a751782b215c33281c8a465dc7d6335cfde6f 100644 (file)
@@ -33,7 +33,9 @@ your course.
 .s1
 Information given by recon is not totally accurate.
 .s1
-Recon missions can be intercepted just like any other mission.
+Recon missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
+.s1
 If the destination sector is not an airport, then all planes in
 the mission must have V/STOL capability.
 .s1
index 7d21e955cf07d006944e84a565ac80d80d063f58..8daf3a713c9054586b08584de11ff0b9044ce3f9 100644 (file)
@@ -32,7 +32,9 @@ your course.
 .s1
 Information given by sweep/recon is not totally accurate.
 .s1
-Sweep/recon missions can be intercepted just like any other mission.
+Sweep missions can be intercepted just like any other mission.  See
+info \*QIntercept\*U.
+.s1
 If the destination sector is not an airport, then all planes in
 the mission must have V/STOL capability.
 .s1
index 13efbb5d8275a2c37da8302708b013992a0a2d35..8413a102a144f2b8381fe66630854b989ab50432 100644 (file)
@@ -231,13 +231,16 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
            if (!no_air_defense)
                air_defense(x, y, plane_owner, bomb_list, esc_list);
 
-           if (rel[sect.sct_own] <= HOSTILE) {
-               if (!gotilist[sect.sct_own]) {
-                   getilist(&ilist[sect.sct_own], sect.sct_own);
-                   gotilist[sect.sct_own]++;
+           for (cn = 1; cn < MAXNOC && !QEMPTY(bomb_list); cn++) {
+               if (rel[cn] > HOSTILE)
+                   continue;
+               if (cn != sect.sct_own && !gotships[cn] && !gotlands[cn])
+                   continue;
+               if (!gotilist[cn]) {
+                   getilist(&ilist[cn], cn);
+                   gotilist[cn]++;
                }
-               ac_intercept(bomb_list, esc_list, &ilist[sect.sct_own],
-                            sect.sct_own, x, y);
+               ac_intercept(bomb_list, esc_list, &ilist[cn], cn, x, y);
            }
        }
 
@@ -258,27 +261,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
     /* If the map changed, update it */
     if (changed)
        writemap(player->cnum);
-    /* Now, if the bomber and escort lists are empty, we are done */
-    if (QEMPTY(bomb_list) && QEMPTY(esc_list))
-       goto out;
 
-    /* Something made it through */
-
-    /* Now, let's make life a little rougher. */
-    for (cn = 1; cn < MAXNOC && !QEMPTY(bomb_list); cn++) {
-       if (plane_owner == cn)
-           continue;
-       if (gotships[cn] || gotlands[cn]) {
-           if (rel[cn] <= HOSTILE && !evaded) {
-               if (!gotilist[cn]) {
-                   getilist(&ilist[cn], cn);
-                   gotilist[cn]++;
-               }
-               ac_intercept(bomb_list, esc_list, &ilist[cn], cn, x, y);
-           }
-       }
-    }
-out:
     free_shiplist(&head);
     for (cn = 1; cn < MAXNOC; cn++) {
        if (gotilist[cn])