]> git.pond.sub.org Git - empserver/blob - info/Flak.t
Fix trailing whitespace
[empserver] / info / Flak.t
1 .TH Concept Flak
2 .NA Flak "How flak works"
3 .LV Basic
4 This page describes flak, and how it works.
5 .s1
6 Flak is created from gunfire when enemy planes fly overhead.
7 .s1
8 The way that flak works when planes fly over a sector is:
9 .nf
10  * Sector flak is fired.  Up to a maximum of 14 guns can fire.
11    They're then scaled by twice your country's tech factor.  So, for
12    example, if you had 14 guns firing, and have a tech factor of 35%,
13    you would have a total of 14 * .35 * 2 = 10 (after rounding) guns
14    firing.
15  * Land unit flak is then fired.  Only 'flak' capable units will fire
16    in this volley (see "info show"), and each point of aaf counts as
17    1.5 flak guns.  Flak saturates at 14 guns, and is then scaled by
18    unit tech factor.
19  * Ship flak is then fired.  Flak saturates at 14 guns, and is then
20    scaled by unit tech factor.
21 .fi
22 .s1
23 In addition, if you are pin-bombing a land unit or a ship, when
24 you make your bombing run, the specific unit/ship you are bombing
25 gets to fire flak at you again.  This number of guns firing flak
26 in these cases does NOT saturate.
27 .s1
28 When a sector fires flak, the amount of shells required is the # of
29 guns fired divided by 2.  If not enough shells are available, either no flak
30 is fired, or the flak is reduced to the number of shells available.
31 Note that the shells are not consumed during flak fire, they just need
32 to be available.
33 .s1
34 When a ship fires flak, at least 1 shell must be available.
35 If no shells are available, no flak is fired.  Note that the shell is
36 not consumed during flak fire, it just needs to be available.
37 .s1
38 Land units use no shells when firing flak.  Any land unit with an
39 aaf rating of > 0 will fire flak when pin-bombed.
40 .s1
41 The formulas for determining the # of guns fired in a general volley
42 is:
43 .nf
44 Sector:
45     guns = (guns in sector);
46     if (guns > 14)
47         guns = 14;
48
49 Ship:
50     guns = 0;
51     for (each ship in the sector)
52         guns += min(guns, guns able to fire)
53     if (guns > 14)
54         guns = 14;
55
56 Land unit:
57     guns = 0;
58     for (each land unit in the sector)
59         guns += (aaf rating) * 1.5
60     if (guns > 14)
61         guns = 14;
62 .fi
63 .s1
64 Then, for each of the above general flak volleys, the # of guns is
65 scaled like so:
66 .nf
67     firing = guns * (average techfact) * 2;
68
69 where average techfact is the average tech factor of everything that
70 could fire in this volley, regardless of saturation.  Sectors use
71 their owner's tech factor.
72
73 On pinpoint bombing runs, the # of guns firing is determined by:
74
75 Ship:
76     guns = min(guns, guns able to fire) * (techfact of ship) * 2;
77
78 Land unit:
79     guns = (aaf rating) * (techfact of unit) * 3;
80
81 techfact is determined by:
82     techfact = (50.0 + tech) / (200.0 + tech);
83 .fi
84 .s1
85 Once the number of flak guns firing has been determined, the planes
86 have to fly through it.  The plane may have to fly through flak up
87 to 4 times in each sector, depending on circumstances.  They are:
88 .nf
89
90     1) Fly through general sector flak (if any)
91     2) Fly through general ship flak (if any)
92     3) Fly through general unit flak (if any)
93     4) If pin-bombing, fly through specific unit or ship flak (if any)
94 .fi
95 .s1
96 To figure out the damages that a plane takes each time it flies through
97 flak, the following formula's are used:
98 .nf
99
100     flak = # of guns firing.
101     flak = flak - (planes defense);
102     if (plane is not tactical)
103         flak = flak - 1;
104     if (plane is stealthy)
105         flak = flak - 2;
106     if (plane is half stealthy)
107         flak = flak - 1;
108     if (flak > 8)
109         mult = flaktable[16];
110     else if (flak < -7)
111         mult = flaktable[0];
112     else {
113         flak += 8;
114         mult = flaktable[flak];
115     }
116     mult *= flakscale;
117     damage = ((random number from 1 to 8) + 2) * mult;
118     if (damage > 100)
119         damage = 100;
120
121     plane's eff = (plane's eff) - dam;
122     if (plane's eff < 10%)
123         plane is shot down
124     else if (chance((80 - (plane's eff)) / 100))
125         plane aborts mission
126     otherwise the plane continues on it's mission
127
128 For the above, use this table:
129
130     flaktable[0] = 0.132
131     flaktable[1] = 0.20
132     flaktable[2] = 0.20
133     flaktable[3] = 0.25
134     flaktable[4] = 0.30
135     flaktable[5] = 0.35
136     flaktable[6] = 0.40
137     flaktable[7] = 0.45
138     flaktable[8] = 0.50
139     flaktable[9] = 0.50
140     flaktable[10] = 0.55
141     flaktable[11] = 0.60
142     flaktable[12] = 0.65
143     flaktable[13] = 0.70
144     flaktable[14] = 0.75
145     flaktable[15] = 0.80
146     flaktable[16] = 1.1305
147
148 and a flakscale of 1.75
149 .fi
150 .SA "bomb, fly, recon, paradrop, nation, Planes, Interception, Combat"
151