Update for recent code changes. Make pseudo-code match the real code.
Used to mention interception, but got it mostly wrong, removed.
This commit is contained in:
parent
36fbf37bb8
commit
053248a2f5
1 changed files with 44 additions and 44 deletions
88
info/Flak.t
88
info/Flak.t
|
@ -7,27 +7,23 @@ Flak is created from gunfire when enemy planes fly overhead.
|
||||||
.s1
|
.s1
|
||||||
The way that flak works when planes fly over a sector is:
|
The way that flak works when planes fly over a sector is:
|
||||||
.nf
|
.nf
|
||||||
* Sector flak is fired. Up to a maximum of 14 guns can fire
|
* Sector flak is fired. Up to a maximum of 14 guns can fire.
|
||||||
before being scaled.
|
They're then scaled by twice your country's tech factor. So, for
|
||||||
* Land unit flak is then fired. Up to a maximum of 14 guns can
|
example, if you had 14 guns firing, and have a tech factor of 35%,
|
||||||
fire before being scaled. Only 'flak' capable units will fire
|
you would have a total of 14 * .35 * 2 = 10 (after rounding) guns
|
||||||
in this volley (see "info show"), and only the guns loaded onto
|
firing.
|
||||||
a land unit are counted in the # of guns firing.
|
* Land unit flak is then fired. Only 'flak' capable units will fire
|
||||||
* Ship flak is then fired. Up to a maximum of 14 guns can fire
|
in this volley (see "info show"), and each point of aaf counts as
|
||||||
before being scaled.
|
1.5 flak guns. Flak saturates at 14 guns, and is then scaled by
|
||||||
* Defensive planes then intercept.
|
unit tech factor.
|
||||||
|
* Ship flak is then fired. Flak saturates at 14 guns, and is then
|
||||||
|
scaled by unit tech factor.
|
||||||
.fi
|
.fi
|
||||||
.s1
|
.s1
|
||||||
In all of the above flak rounds, once the maximum # of guns firing
|
In addition, if you are pin-bombing a land unit or a ship, when
|
||||||
has been determined, the # of guns is then scaled by your country's
|
|
||||||
tech factor, and then doubled. So, for example, if you had 14 guns
|
|
||||||
firing, and have a tech factor of 35%, you would have a total of
|
|
||||||
(14 * .35) * 2 = 10 (after rounding) guns firing.
|
|
||||||
.s1
|
|
||||||
In addition, if you are pinbombing a land unit or a ship, when
|
|
||||||
you make your bombing run, the specific unit/ship you are bombing
|
you make your bombing run, the specific unit/ship you are bombing
|
||||||
gets to fire flak at you again. This number of guns firing flak
|
gets to fire flak at you again. This number of guns firing flak
|
||||||
in these cases is NOT scaled after the number of guns is determined.
|
in these cases does NOT saturate.
|
||||||
.s1
|
.s1
|
||||||
When a sector fires flak, the amount of shells required is the # of
|
When a sector fires flak, the amount of shells required is the # of
|
||||||
guns fired divided by 2. If not enough shells are available, either no flak
|
guns fired divided by 2. If not enough shells are available, either no flak
|
||||||
|
@ -53,14 +49,14 @@ Sector:
|
||||||
Ship:
|
Ship:
|
||||||
guns = 0;
|
guns = 0;
|
||||||
for (each ship in the sector)
|
for (each ship in the sector)
|
||||||
guns += min(guns, guns able to fire) * (techfact of ship) * 2;
|
guns += min(guns, guns able to fire)
|
||||||
if (guns > 14)
|
if (guns > 14)
|
||||||
guns = 14;
|
guns = 14;
|
||||||
|
|
||||||
Land unit:
|
Land unit:
|
||||||
guns = 0;
|
guns = 0;
|
||||||
for (each land unit in the sector)
|
for (each land unit in the sector)
|
||||||
guns += (aaf rating) * (techfact of unit) * 3;
|
guns += (aaf rating) * 1.5
|
||||||
if (guns > 14)
|
if (guns > 14)
|
||||||
guns = 14;
|
guns = 14;
|
||||||
.fi
|
.fi
|
||||||
|
@ -68,9 +64,13 @@ Land unit:
|
||||||
Then, for each of the above general flak volleys, the # of guns is
|
Then, for each of the above general flak volleys, the # of guns is
|
||||||
scaled like so:
|
scaled like so:
|
||||||
.nf
|
.nf
|
||||||
firing = guns * (techfact of nation) * 2;
|
firing = guns * (average techfact) * 2;
|
||||||
|
|
||||||
On specific bombing runs, the # of guns firing is determined by:
|
where average techfact is the average tech factor of everything that
|
||||||
|
could fire in this volley, regardless of saturation. Sectors use
|
||||||
|
their owner's tech factor.
|
||||||
|
|
||||||
|
On pinpoint bombing runs, the # of guns firing is determined by:
|
||||||
|
|
||||||
Ship:
|
Ship:
|
||||||
guns = min(guns, guns able to fire) * (techfact of ship) * 2;
|
guns = min(guns, guns able to fire) * (techfact of ship) * 2;
|
||||||
|
@ -78,8 +78,6 @@ Ship:
|
||||||
Land unit:
|
Land unit:
|
||||||
guns = (aaf rating) * (techfact of unit) * 3;
|
guns = (aaf rating) * (techfact of unit) * 3;
|
||||||
|
|
||||||
The # of guns in these cases are NOT scaled.
|
|
||||||
|
|
||||||
techfact is determined by:
|
techfact is determined by:
|
||||||
techfact = (50.0 + tech) / (200.0 + tech);
|
techfact = (50.0 + tech) / (200.0 + tech);
|
||||||
.fi
|
.fi
|
||||||
|
@ -90,28 +88,29 @@ to 4 times in each sector, depending on circumstances. They are:
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
1) Fly through general sector flak (if any)
|
1) Fly through general sector flak (if any)
|
||||||
1a) fight in a possible dog-fight
|
|
||||||
2) Fly through general ship flak (if any)
|
2) Fly through general ship flak (if any)
|
||||||
3) Fly through general unit flak (if any)
|
3) Fly through general unit flak (if any)
|
||||||
4) If pinbombing, fly through specific unit or ship flak (if any)
|
4) If pin-bombing, fly through specific unit or ship flak (if any)
|
||||||
.fi
|
.fi
|
||||||
.s1
|
.s1
|
||||||
To figure out the damages that a plane takes each time it flys through
|
To figure out the damages that a plane takes each time it flies through
|
||||||
flak, the following formula's are used:
|
flak, the following formula's are used:
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
flak = # of guns firing.
|
flak = # of guns firing.
|
||||||
flak = flak - (planes defense + 1);
|
flak = flak - (planes defense);
|
||||||
|
if (plane is not tactical)
|
||||||
|
flak = flak - 1;
|
||||||
if (plane is stealthy)
|
if (plane is stealthy)
|
||||||
flak = flak - 2;
|
flak = flak - 2;
|
||||||
if (plane is half stealthy)
|
if (plane is half stealthy)
|
||||||
flak = flak - 1;
|
flak = flak - 1;
|
||||||
if (flak > 8)
|
if (flak > 8)
|
||||||
mult = flaktable[15] * 1.33;
|
mult = flaktable[16];
|
||||||
else if (flak < -7)
|
else if (flak < -7)
|
||||||
mult = flaktable[0] * 0.66;
|
mult = flaktable[0];
|
||||||
else {
|
else {
|
||||||
flak += 7;
|
flak += 8;
|
||||||
mult = flaktable[flak];
|
mult = flaktable[flak];
|
||||||
}
|
}
|
||||||
mult *= flakscale;
|
mult *= flakscale;
|
||||||
|
@ -128,22 +127,23 @@ flak, the following formula's are used:
|
||||||
|
|
||||||
For the above, use this table:
|
For the above, use this table:
|
||||||
|
|
||||||
flaktable[0] = 0.20
|
flaktable[0] = 0.132
|
||||||
flaktable[1] = 0.20
|
flaktable[1] = 0.20
|
||||||
flaktable[2] = 0.25
|
flaktable[2] = 0.20
|
||||||
flaktable[3] = 0.30
|
flaktable[3] = 0.25
|
||||||
flaktable[4] = 0.35
|
flaktable[4] = 0.30
|
||||||
flaktable[5] = 0.40
|
flaktable[5] = 0.35
|
||||||
flaktable[6] = 0.45
|
flaktable[6] = 0.40
|
||||||
flaktable[7] = 0.50
|
flaktable[7] = 0.45
|
||||||
flaktable[8] = 0.50
|
flaktable[8] = 0.50
|
||||||
flaktable[9] = 0.55
|
flaktable[9] = 0.50
|
||||||
flaktable[10] = 0.60
|
flaktable[10] = 0.55
|
||||||
flaktable[11] = 0.65
|
flaktable[11] = 0.60
|
||||||
flaktable[12] = 0.70
|
flaktable[12] = 0.65
|
||||||
flaktable[13] = 0.75
|
flaktable[13] = 0.70
|
||||||
flaktable[14] = 0.80
|
flaktable[14] = 0.75
|
||||||
flaktable[15] = 0.85
|
flaktable[15] = 0.80
|
||||||
|
flaktable[16] = 1.1305
|
||||||
|
|
||||||
and a flakscale of 1.75
|
and a flakscale of 1.75
|
||||||
.fi
|
.fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue