]> git.pond.sub.org Git - empserver/blob - src/lib/global/land.c
Indented with src/scripts/indent-emp.
[empserver] / src / lib / global / land.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  *  land.c: Land unit characteristics
29  * 
30  *  Known contributors to this file:
31  *     Thomas Ruschak, 1992
32  *     Ken Stevens, 1995
33  *     Steve McClure, 1998-2000
34  */
35
36 #include "misc.h"
37 #include "var.h"
38 #include "land.h"
39
40 struct lchrstr lchr[] = {
41
42 /* name
43    lcm, hcm, mil, gun, shell, tech,   $,
44    att, def, vul, spd, vis, spy, rad, frg, acc, dam, amm, aaf, fc, fu, xpl, mxl
45    flags, nv
46    cargo
47 */
48 /* ((int)((ETUS*4)/(mil/1000)) is enough food for 3 updates */
49
50     {2,
51      {V_FOOD, V_MILIT},
52      {((int)((ETUS * 4) / 20)), 20},
53      "cav  cavalry",
54      10, 5, 0, 0, 0, 30, 500,
55      1.2, 0.5, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
56      L_RECON | L_LIGHT,
57      },
58
59     {3,
60      {V_FOOD, V_SHELL, V_MILIT},
61      {((int)((ETUS) / 4)), 1, 25},
62      "linf light infantry",
63      8, 4, 0, 0, 0, 40, 300,
64      1.0, 1.5, 60, 28, 15, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
65      L_ASSAULT | L_LIGHT,
66      },
67
68     {2,
69      {V_FOOD, V_MILIT},
70      {((int)((ETUS * 4) / 10)), 100},
71      "inf  infantry",
72      10, 5, 0, 0, 0, 50, 500,
73      1.0, 1.5, 60, 25, 15, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
74      L_ASSAULT | L_LIGHT,
75      },
76
77     {3,
78      {V_FOOD, V_SHELL, V_MILIT},
79      {((int)((ETUS * 5) / 5)), 8, 100},
80      "mtif motor inf",
81      15, 10, 0, 0, 0, 190, 400,
82      1.2, 2.2, 60, 33, 17, 1, 3, 0, 0, 0, 2, 3, 13, 1, 0, 0,
83      L_LIGHT,
84      },
85
86     {3,
87      {V_FOOD, V_SHELL, V_MILIT},
88      {((int)((ETUS * 5) / 5)), 8, 100},
89      "mif  mech inf",
90      15, 10, 0, 0, 0, 190, 800,
91      1.5, 2.5, 50, 33, 17, 1, 3, 0, 0, 0, 2, 3, 13, 1, 0, 0,
92      L_LIGHT,
93      },
94
95     {3,
96      {V_FOOD, V_SHELL, V_MILIT},
97      {((int)((ETUS * 5) / 5)), 4, 100},
98      "mar  marines",
99      10, 5, 0, 0, 0, 140, 1000,
100      1.4, 2.4, 60, 25, 14, 2, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0,
101      L_MARINE | L_ASSAULT | L_LIGHT,
102      },
103
104     {10,
105      {V_SHELL, V_GUN, V_FOOD, V_LCM, V_HCM, V_DUST, V_BAR, V_IRON,
106       V_PETROL, V_MILIT},
107      {200, 10, 300, 200, 100, 100, 10, 100, 300, 25},
108      "sup  supply",
109      10, 5, 0, 0, 0, 50, 500,
110      0.1, 0.2, 80, 25, 20, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
111      L_LIGHT | L_SUPPLY,
112      },
113
114     {12,
115      {V_SHELL, V_GUN, V_FOOD, V_LCM, V_HCM, V_DUST, V_BAR, V_IRON,
116       V_PETROL, V_MILIT, V_OIL, V_RAD},
117      {990, 200, 990, 990, 990, 500, 100, 500, 990, 990, 990, 150},
118      "tra  train",
119      100, 50, 0, 0, 0, 40, 3500,
120      0.0, 0.0, 120, 10, 25, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 12,
121      L_XLIGHT | L_TRAIN | L_HEAVY | L_SUPPLY,
122      },
123
124     {0,
125      {V_FOOD},
126      {0,},
127      "spy  infiltrator",
128      10, 5, 0, 0, 0, 40, 750,
129      0.0, 0.0, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
130      L_ASSAULT | L_RECON | L_LIGHT | L_SPY,
131      },
132
133     {1,
134      {V_SHELL},
135      {3,},
136      "com  commando",
137      10, 5, 0, 0, 0, 55, 1500,
138      0.0, 0.0, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
139      L_ASSAULT | L_RECON | L_LIGHT | L_SPY,
140      },
141
142     {3,
143      {V_FOOD, V_SHELL, V_MILIT},
144      {((int)((ETUS) / 5)), 5, 20},
145      "aau  aa unit",
146      20, 10, 0, 0, 0, 70, 500,
147      0.5, 1.0, 60, 18, 20, 1, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0,
148      L_FLAK | L_LIGHT,
149      },
150
151     {4,
152      {V_FOOD, V_SHELL, V_MILIT, V_GUN},
153      {((int)((ETUS * 4) / 10)), 40, 25, 10},
154      "art  artillery",
155      20, 10, 0, 0, 0, 35, 800,
156      0.1, 0.4, 70, 18, 20, 1, 0, 8, 50, 5, 2, 1, 0, 0, 0, 0,
157      L_LIGHT,
158      },
159
160     {4,
161      {V_FOOD, V_SHELL, V_MILIT, V_GUN},
162      {((int)((ETUS * 4) / 20)), 20, 25, 6},
163      "lat  lt artillery",
164      20, 10, 0, 0, 0, 70, 500,
165      0.2, 0.6, 60, 30, 18, 1, 1, 5, 10, 3, 1, 1, 0, 0, 0, 0,
166      L_LIGHT,
167      },
168
169     {4,
170      {V_FOOD, V_SHELL, V_MILIT, V_GUN},
171      {((int)((ETUS * 4) / 10)), 80, 25, 12},
172      "hat  hvy artillery",
173      40, 20, 0, 0, 0, 100, 800,
174      0.0, 0.2, 60, 12, 20, 1, 0, 11, 99, 8, 4, 1, 0, 0, 0, 0,
175      0,
176      },
177
178     {4,
179      {V_FOOD, V_SHELL, V_MILIT, V_GUN},
180      {((int)((ETUS * 5) / 20)), 40, 25, 10},
181      "mat  mech artillery",
182      20, 10, 0, 0, 0, 200, 1000,
183      0.2, 0.6, 50, 35, 17, 1, 1, 8, 35, 6, 3, 3, 13, 1, 0, 0,
184      L_LIGHT,
185      },
186
187     {3,
188      {V_FOOD, V_SHELL, V_MILIT},
189      {((int)((ETUS * 4) / 20)), 3, 20},
190      "eng  engineer",
191      10, 5, 0, 0, 0, 130, 3000,
192      1.2, 2.4, 50, 25, 14, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
193      L_ENGINEER | L_ASSAULT | L_LIGHT,
194      },
195
196     {3,
197      {V_FOOD, V_SHELL, V_MILIT},
198      {((int)((ETUS * 5) / 20)), 4, 20},
199      "meng mech engineer",
200      10, 5, 0, 0, 0, 260, 4500,
201      1.8, 3.5, 45, 33, 15, 3, 3, 0, 0, 0, 1, 5, 25, 2, 0, 0,
202      L_ENGINEER | L_ASSAULT | L_LIGHT,
203      },
204
205     {3,
206      {V_FOOD, V_SHELL, V_MILIT},
207      {((int)((ETUS * 5) / 10)), 4, 50},
208      "lar  lt armor",
209      10, 5, 0, 0, 0, 150, 600,
210      2.0, 1.0, 50, 42, 15, 4, 4, 0, 0, 0, 1, 2, 25, 1, 0, 0,
211      L_RECON | L_LIGHT,
212      },
213
214     {3,
215      {V_FOOD, V_SHELL, V_MILIT},
216      {((int)((ETUS * 4) / 5)), 3, 100},
217      "har  hvy armor",
218      20, 10, 0, 0, 0, 120, 500,
219      2.0, 0.8, 50, 18, 17, 1, 1, 0, 0, 0, 2, 1, 10, 2, 0, 0,
220      0,
221      },
222
223     {3,
224      {V_FOOD, V_SHELL, V_MILIT},
225      {((int)((ETUS * 5) / 10)), 4, 50},
226      "arm  armor",
227      20, 10, 0, 0, 0, 170, 1000,
228      3.0, 1.5, 40, 33, 16, 2, 2, 0, 0, 0, 1, 2, 13, 1, 0, 0,
229      L_LIGHT,
230      },
231
232     {3,
233      {V_FOOD, V_SHELL, V_MILIT},
234      {((int)((ETUS * 5) / 10)), 4, 50},
235      "sec  security",
236      10, 5, 0, 0, 0, 170, 600,
237      1.0, 2.0, 60, 25, 15, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
238      L_SECURITY | L_LIGHT,
239      },
240
241     {2,
242      {V_FOOD, V_MILIT},
243      {((int)((ETUS * 5) / 40)), 10},
244      "rad  radar unit",
245      10, 5, 0, 0, 0, 270, 1000,
246      0.0, 0.0, 50, 33, 15, 3, 0, 0, 0, 0, 0, 2, 25, 2, 1, 0,
247      L_XLIGHT | L_RADAR | L_LIGHT,
248      },
249
250 /* name
251    lcm, hcm, mil, gun, shell, tech,   $,
252    att, def, vul, spd, vis, spy, rad, frg, acc, dam, amm, aaf, fc, fu, xpl,
253    flags, nv
254    cargo
255 */
256
257     {0,
258      {0},
259      {0},
260      "",
261      0, 0, 0, 0, 0, 0, 0,
262      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
263      0,
264      }
265 };
266
267 int lnd_maxno = (sizeof(lchr) / sizeof(struct lchrstr)) - 1;