]> git.pond.sub.org Git - empserver/blob - info/Flak.t
info/Empire4.4: Improve a few change log entries
[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 Land units do not need capability flak to fire here.
28 .s1
29 The formulas for determining the # of guns fired in a general volley
30 is:
31 .nf
32 Sector:
33     guns = (guns in sector);
34     if (guns > 14)
35         guns = 14;
36
37 Ship:
38     guns = 0;
39     for (each ship in the sector)
40         guns += min(guns, guns able to fire)
41     if (guns > 14)
42         guns = 14;
43
44 Land unit:
45     guns = 0;
46     for (each land unit in the sector)
47         guns += (aaf rating) * 1.5
48     if (guns > 14)
49         guns = 14;
50 .fi
51 .s1
52 Then, for each of the above general flak volleys, the # of guns is
53 scaled like so:
54 .nf
55     firing = guns * (average techfact) * 2;
56
57 where average techfact is the average tech factor of everything that
58 could fire in this volley, regardless of saturation.  Sectors use
59 their owner's tech factor.
60
61 On pinpoint bombing runs, the # of guns firing is determined by:
62
63 Ship:
64     guns = min(guns, guns able to fire) * (techfact of ship) * 2;
65
66 Land unit:
67     guns = (aaf rating) * (techfact of unit) * 3;
68
69 techfact is determined by:
70     techfact = (50.0 + tech) / (200.0 + tech);
71 .fi
72 .s1
73 Once the number of flak guns firing has been determined, the planes
74 have to fly through it.  The plane may have to fly through flak up
75 to 4 times in each sector, depending on circumstances.  They are:
76 .nf
77
78     1) Fly through general sector flak (if any)
79     2) Fly through general ship flak (if any)
80     3) Fly through general unit flak (if any)
81     4) If pin-bombing, fly through specific unit or ship flak (if any)
82 .fi
83 .s1
84 To figure out the damages that a plane takes each time it flies through
85 flak, the following formula's are used:
86 .nf
87
88     flak = # of guns firing.
89     flak = flak - (planes defense);
90     if (plane is not tactical)
91         flak = flak - 1;
92     if (plane is stealthy)
93         flak = flak - 2;
94     if (plane is half stealthy)
95         flak = flak - 1;
96     if (flak > 8)
97         mult = flaktable[16];
98     else if (flak < -7)
99         mult = flaktable[0];
100     else {
101         flak += 8;
102         mult = flaktable[flak];
103     }
104     mult *= flakscale;
105     damage = ((random number from 1 to 8) + 2) * mult;
106     if (damage > 100)
107         damage = 100;
108
109     plane's eff = (plane's eff) - dam;
110     if (plane's eff < 10%)
111         plane is shot down
112     else if (chance((80 - (plane's eff)) / 100))
113         plane aborts mission
114     otherwise the plane continues on it's mission
115
116 For the above, use this table:
117
118     flaktable[0] = 0.132
119     flaktable[1] = 0.20
120     flaktable[2] = 0.20
121     flaktable[3] = 0.25
122     flaktable[4] = 0.30
123     flaktable[5] = 0.35
124     flaktable[6] = 0.40
125     flaktable[7] = 0.45
126     flaktable[8] = 0.50
127     flaktable[9] = 0.50
128     flaktable[10] = 0.55
129     flaktable[11] = 0.60
130     flaktable[12] = 0.65
131     flaktable[13] = 0.70
132     flaktable[14] = 0.75
133     flaktable[15] = 0.80
134     flaktable[16] = 1.1305
135
136 and a flakscale of 1.75
137 .fi
138 .SA "bomb, fly, recon, paradrop, nation, Planes, Interception, Combat"