]> git.pond.sub.org Git - empserver/blob - src/lib/global/plane.c
Indented with src/scripts/indent-emp.
[empserver] / src / lib / global / plane.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  plane.c: Plane characteristics
29  * 
30  *  Known contributors to this file:
31  *     Dave Pare, 1986
32  *     Jeff Bailey
33  *     Thomas Ruschak, 1992
34  *     Ken Stevens, 1995
35  *     Steve McClure, 1998
36  */
37
38 /*
39  * plane characteristics
40  * flags indicate capabilities of craft...
41  * P_T: tactical, P_F: fighter/interceptor, P_B: bomber,
42  * P_C: cargo, P_G: glider, P_V: vtol, P_M: (one-shot) missile
43  * P_L: light, can land on carriers.
44  * P_O: orbits (sat's & anti-sats), P_N: nuke killer (SDI)
45  * P_X: stealthy
46  * P_E: Extra light
47  * P_K: Chopper
48  * P_P: Can paratroop
49  * P_A: ASW plane, can find subs when reconning, can bomb subs
50  * P_R: recon plane, gets some info
51  * P_I: Image capability (advanced spying)
52  * 
53  * Note if a plane is P_M (a missile) then it will automatically be made
54  * P_V (vtol) in init_global()
55  */
56
57 #include "misc.h"
58 #include "plane.h"
59
60 struct plchrstr plchr[] = {
61
62 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
63     {
64      "f1   fighter 1",
65      "f1   Sopwith Camel",
66      8, 2, 400, 50, 90, 1, 1, 1, 4, 1, 1,
67      0,
68      P_V | P_T | P_F},
69
70 /* name        lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
71     {
72      "f2   fighter 2",
73      "f2   P-51 Mustang",
74      8, 2, 400, 80, 80, 1, 4, 4, 8, 1, 1,
75      0,
76      P_L | P_T | P_F},
77
78 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
79     {
80      "jf1  jet fighter 1",
81      "jf1  F-4 Phantom",
82      12, 4, 1000, 125, 45, 1, 14, 14, 11, 2, 3,
83      0,
84      P_T | P_F | P_L},
85
86
87 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
88     {
89      "jf2  jet fighter 2",
90      "jf2  AV-8B Harrier",
91      12, 4, 1400, 195, 30, 1, 17, 17, 14, 2, 3,
92      0,
93      P_T | P_F | P_L | P_V},
94
95 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
96     {
97      "sf   stealth fighter",
98      "sf   F-117A Nighthawk",
99      15, 5, 3000, 325, 45, 3, 19, 19, 20, 2, 4,
100      80,
101      P_T | P_F | P_L},
102
103 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
104     {
105      "es   escort",
106      "es   P-38 Lightning",
107      9, 3, 700, 90, 60, 1, 5, 5, 15, 1, 2,
108      0,
109      P_ESC | P_T},
110
111 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
112     {
113      "jes  jet escort",
114      "jes  F-14E jet escort",
115      14, 8, 1400, 160, 60, 1, 10, 10, 25, 2, 3,
116      0,
117      P_ESC | P_T},
118
119 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
120     {
121      "lb   lt bomber",
122      "lb   TBD-1 Devastator",
123      10, 3, 550, 60, 50, 2, 0, 3, 7, 1, 1,
124      0,
125      P_L | P_V | P_T | P_B},
126
127 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
128     {
129      "jl   jet lt bomber",
130      "jl   A-6 Intruder",
131      14, 4, 1000, 130, 25, 3, 0, 9, 11, 2, 3,
132      0,
133      P_T | P_B | P_L},
134
135 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
136     {
137      "mb   medium bomber",
138      "mb   medium bomber",
139      14, 5, 1000, 80, 45, 4, 0, 5, 14, 3, 3,
140      0,
141      P_T | P_B},
142
143 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
144     {
145      "jmb  jet med bomber",
146      "jfb  FB-111 Aardvark f/b",
147      20, 10, 1800, 140, 30, 7, 8, 8, 20, 5, 5,
148      0,
149      P_T | P_B},
150     {
151      "hb   hvy bomber",
152      "hb   B-26B Marauder",
153      20, 6, 1100, 90, 90, 5, 0, 4, 15, 2, 2,
154      0,
155      P_B},
156
157 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
158     {
159      "jhb  jet hvy bomber",
160      "jhb  B-52 Strato-Fortress",
161      26, 13, 3200, 150, 80, 12, 0, 11, 35, 5, 6,
162      0,
163      P_B},
164
165 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
166     {
167      "sb   stealth bomber",
168      "sb   B-2 stealth bomber",
169      15, 5, 4000, 325, 25, 8, 0, 15, 28, 2, 5,
170      80,
171      P_T | P_B},
172
173
174 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
175     {
176      "as   anti-sub plane",
177      "as   anti-sub plane",
178      10, 3, 550, 100, 85, 2, 0, 3, 15, 2, 2,
179      0,
180      P_SWEEP | P_MINE | P_T | P_A},
181
182 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
183     {
184      "np   naval plane",
185      "np   naval plane",
186      20, 10, 1800, 135, 70, 3, 0, 4, 28, 4, 2,
187      0,
188      P_SWEEP | P_MINE | P_C | P_T | P_A | P_L},
189
190 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
191     {
192      "nc   naval chopper",
193      "nc   AH-1 Cobra",
194      8, 2, 800, 160, 55, 2, 0, 3, 11, 2, 2,
195      0,
196      P_V | P_SWEEP | P_T | P_A | P_K},
197
198 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
199     {
200      "ac   attack chopper",
201      "ac   AH-64 Apache",
202      8, 2, 800, 200, 15, 1, 0, 9, 11, 2, 2,
203      40,
204      P_V | P_T | P_K},
205
206 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
207     {
208      "tc   transport chopper",
209      "tc   transport chopper",
210      8, 2, 800, 135, 0, 5, 0, 3, 7, 2, 2,
211      40,
212      P_V | P_C | P_P | P_L | P_K},
213
214 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
215     {
216      "tr   transport",
217      "tr   C-56 Lodestar",
218      14, 5, 1000, 85, 0, 7, 0, 2, 15, 3, 3,
219      0,
220      P_C | P_P},
221
222 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
223     {
224      "jt   jet transport",
225      "jt   C-141 Starlifter",
226      18, 5, 1500, 160, 0, 16, 0, 9, 35, 3, 4,
227      0,
228      P_C | P_P},
229
230 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
231     {
232      "zep  Zeppelin",
233      "zep  Zeppelin",
234      6, 2, 1000, 70, 60, 2, 0, -3, 15, 3, 2,
235      0,
236      P_S | P_V | P_T | P_C},
237 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
238     {
239      "re   recon",
240      "re   recon",
241      12, 4, 800, 130, 0, 0, 0, 4, 15, 2, 2,
242      20,
243      P_S},
244
245 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
246     {
247      "sp   spyplane",
248      "sp   E2-C Hawkeye",
249      15, 5, 2000, 190, 0, 0, 0, 11, 32, 2, 5,
250      50,
251      P_S},
252
253 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
254     {
255      "lst  landsat",
256      "lst  landsat",
257      20, 20, 2000, 245, 0, 0, 0, 3, 41, 0, 9,
258      0,
259      P_O},
260
261 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
262     {
263      "ss   spysat",
264      "ss   KH-7 spysat",
265      20, 20, 4000, 305, 0, 0, 0, 3, 61, 0, 9,
266      0,
267      P_I | P_O | P_S},
268
269 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
270     {
271      "mi   naval missile",
272      "mi   Harpoon",
273      8, 2, 300, 160, 50, 6, 0, 5, 6, 0, 0,
274      0,
275      P_L | P_T | P_M | P_MAR},
276 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
277     {
278      "sam  sam",
279      "sam  Sea Sparrow",
280      3, 1, 200, 180, 0, 0, 0, 18, 2, 0, 0,
281      0,
282      P_L | P_F | P_E | P_M},
283
284 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
285     {
286      "ssm",
287      "ssm  V2",
288      15, 15, 800, 145, 60, 3, 0, 3, 4, 0, 0,
289      0,
290      P_T | P_M},
291
292 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
293     {
294      "srbm",
295      "srbm Atlas",
296      20, 20, 1000, 200, 60, 6, 0, 5, 9, 0, 0,
297      0,
298      P_T | P_M},
299
300 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
301     {
302      "irbm",
303      "irbm Titan",
304      20, 20, 1500, 260, 60, 8, 0, 10, 15, 0, 0,
305      0,
306      P_T | P_M},
307
308 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
309     {
310      "icbm",
311      "icbm Minuteman",
312      20, 20, 3000, 310, 60, 10, 0, 15, 41, 0, 0,
313      0,
314      P_T | P_M},
315 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
316     {
317      "slbm",
318      "slbm Trident",
319      20, 20, 2000, 280, 60, 8, 0, 6, 23, 0, 0,
320      0,
321      P_T | P_L | P_M},
322
323 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
324     {
325      "asat anti-sat",
326      "asat anti-sat",
327      20, 20, 2000, 305, 50, 6, 0, 7, 13, 0, 4,
328      0,
329      P_O | P_M},
330
331 /* name          lcm hcm   $$$  tch acc ld  at/df  ran mil gas stlth  flags */
332     {
333      "abm  anti-ballistic missile",
334      "abm  Patriot",
335      16, 8, 1500, 270, 50, 0, 0, 31, 12, 0, 0,
336      0,
337      P_N | P_M},
338     {
339      "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
340      0,
341      0}
342 };
343
344 int pln_maxno = (sizeof(plchr) / sizeof(struct plchrstr)) - 1;