xref: /netbsd/games/sail/globals.c (revision 01be1267)
1*01be1267Sjsm /*	$NetBSD: globals.c,v 1.9 2000/02/09 22:27:56 jsm Exp $	*/
2982615d7Scgd 
361f28255Scgd /*
4982615d7Scgd  * Copyright (c) 1983, 1993
5982615d7Scgd  *	The Regents of the University of California.  All rights reserved.
661f28255Scgd  *
761f28255Scgd  * Redistribution and use in source and binary forms, with or without
861f28255Scgd  * modification, are permitted provided that the following conditions
961f28255Scgd  * are met:
1061f28255Scgd  * 1. Redistributions of source code must retain the above copyright
1161f28255Scgd  *    notice, this list of conditions and the following disclaimer.
1261f28255Scgd  * 2. Redistributions in binary form must reproduce the above copyright
1361f28255Scgd  *    notice, this list of conditions and the following disclaimer in the
1461f28255Scgd  *    documentation and/or other materials provided with the distribution.
1561f28255Scgd  * 3. All advertising materials mentioning features or use of this software
1661f28255Scgd  *    must display the following acknowledgement:
1761f28255Scgd  *	This product includes software developed by the University of
1861f28255Scgd  *	California, Berkeley and its contributors.
1961f28255Scgd  * 4. Neither the name of the University nor the names of its contributors
2061f28255Scgd  *    may be used to endorse or promote products derived from this software
2161f28255Scgd  *    without specific prior written permission.
2261f28255Scgd  *
2361f28255Scgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2461f28255Scgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2561f28255Scgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2661f28255Scgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2761f28255Scgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2861f28255Scgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2961f28255Scgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3061f28255Scgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3161f28255Scgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3261f28255Scgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3361f28255Scgd  * SUCH DAMAGE.
3461f28255Scgd  */
3561f28255Scgd 
36bf72b656Schristos #include <sys/cdefs.h>
3761f28255Scgd #ifndef lint
38982615d7Scgd #if 0
39156daa7aStls static char sccsid[] = "@(#)globals.c	8.2 (Berkeley) 4/28/95";
40982615d7Scgd #else
41*01be1267Sjsm __RCSID("$NetBSD: globals.c,v 1.9 2000/02/09 22:27:56 jsm Exp $");
42982615d7Scgd #endif
4361f28255Scgd #endif /* not lint */
4461f28255Scgd 
45156daa7aStls #include "extern.h"
4661f28255Scgd 
4761f28255Scgd struct scenario scene[] = {
4861f28255Scgd 	/*
4961f28255Scgd 	 * int winddir;
5061f28255Scgd 	 * int windspeed;
5161f28255Scgd 	 * int windchange;
5261f28255Scgd 	 * int vessels;
5361f28255Scgd 	 * char *name;
5461f28255Scgd 	 * struct ship ship[NSHIP];
5561f28255Scgd 	 */
56bf72b656Schristos 	{ 5, 3, 5, 2, "Ranger vs. Drake",
5761f28255Scgd 		{
5861f28255Scgd 			{ "Ranger",		specs+0,  N_A,  7, 20, 4, 0 },
5961f28255Scgd 			{ "Drake",		specs+1,  N_B,  7, 31, 5, 0 }
60bf72b656Schristos 		}
6161f28255Scgd 	},
62bf72b656Schristos 	{ 1, 3, 6, 2, "The Battle of Flamborough Head",
6361f28255Scgd 		{
6461f28255Scgd 			{ "Bonhomme Rich",	specs+2,  N_A, 13, 40, 2, 0 },
6561f28255Scgd 			{ "Serapis",		specs+3,  N_B,  2, 42, 2, 0 }
66bf72b656Schristos 		}
6761f28255Scgd 	},
68bf72b656Schristos 	{ 5, 5, 5, 10, "Arbuthnot and Des Touches",
6961f28255Scgd 		{
7061f28255Scgd 			{ "America",		specs+4,  N_B,  7, 37, 4, 0 },
7161f28255Scgd 			{ "Befford",		specs+5,  N_B,  5, 35, 4, 0 },
7261f28255Scgd 			{ "Adamant",		specs+6,  N_B,  3, 33, 4, 0 },
7361f28255Scgd 			{ "London",		specs+7,  N_B,  1, 31, 4, 0 },
7461f28255Scgd 			{ "Royal Oak",		specs+8,  N_B, -1, 29, 4, 0 },
7561f28255Scgd 			{ "Neptune",		specs+9,  N_F,  6, 44, 4, 0 },
7661f28255Scgd 			{ "Duc Bougogne",	specs+10, N_F,  8, 46, 4, 0 },
7761f28255Scgd 			{ "Conquerant",		specs+48, N_F, 10, 48, 4, 0 },
7861f28255Scgd 			{ "Provence",		specs+11, N_F, 12, 50, 4, 0 },
7961f28255Scgd 			{ "Romulus",		specs+12, N_F, 20, 58, 4, 0 }
80bf72b656Schristos 		}
8161f28255Scgd 	},
82bf72b656Schristos 	{ 1, 3, 5, 10, "Suffren and Hughes",
8361f28255Scgd 		{
8461f28255Scgd 			{ "Monmouth",		specs+52, N_B,  9, 45, 2, 0 },
8561f28255Scgd 			{ "Hero",		specs+5,  N_B, 13, 49, 2, 0 },
8661f28255Scgd 			{ "Isis",		specs+6,  N_B, 12, 48, 2, 0 },
8761f28255Scgd 			{ "Superb",		specs+50, N_B, 10, 46, 2, 0 },
8861f28255Scgd 			{ "Burford",		specs+48, N_B, 11, 47, 2, 0 },
8961f28255Scgd 			{ "Flamband",		specs+13, N_F,  7, 59, 4, 0 },
9061f28255Scgd 			{ "Annibal",		specs+9,  N_F,  4, 56, 4, 0 },
9161f28255Scgd 			{ "Severe",		specs+11, N_F,  2, 54, 4, 0 },
9261f28255Scgd 			{ "Brilliant",		specs+49, N_F, -1, 51, 4, 0 },
9361f28255Scgd 			{ "Sphinx",		specs+51, N_F, -5, 47, 4, 0 }
94bf72b656Schristos 		}
9561f28255Scgd 	},
96bf72b656Schristos 	{ 1, 3, 4, 2, "Nymphe vs. Cleopatre",
9761f28255Scgd 		{
9861f28255Scgd 			{ "Nymphe",		specs+14, N_B, 13, 30, 2, 0 },
9961f28255Scgd 			{ "Cleopatre",		specs+15, N_F,  3, 41, 2, 0 }
100bf72b656Schristos 		}
10161f28255Scgd 	},
102bf72b656Schristos 	{ 1, 3, 5, 2, "Mars vs. Hercule",
10361f28255Scgd 		{
10461f28255Scgd 			{ "Mars",		specs+16, N_B, 13, 30, 2, 0 },
10561f28255Scgd 			{ "Hercule",		specs+17, N_F,  3, 41, 2, 0 }
106bf72b656Schristos 		}
10761f28255Scgd 	},
108bf72b656Schristos 	{ 5, 3, 5, 2, "Ambuscade vs. Baionnaise",
10961f28255Scgd 		{
11061f28255Scgd 			{ "Ambuscade",		specs+18, N_B, 13, 30, 2, 0 },
11161f28255Scgd 			{ "Baionnaise",		specs+19, N_F,  3, 41, 2, 0 }
112bf72b656Schristos 		}
11361f28255Scgd 	},
114bf72b656Schristos 	{ 1, 5, 6, 2, "Constellation vs. Insurgent",
11561f28255Scgd 		{
11661f28255Scgd 			{ "Constellation",	specs+20, N_A,  9, 50, 8, 0 },
11761f28255Scgd 			{ "Insurgent",		specs+22, N_F,  4, 24, 2, 0 }
118bf72b656Schristos 		}
11961f28255Scgd 	},
120bf72b656Schristos 	{ 1, 3, 5, 2, "Constellation vs. Vengeance",
12161f28255Scgd 		{
12261f28255Scgd 			{ "Constellation",	specs+20, N_A, 12, 40, 2, 0 },
12361f28255Scgd 			{ "Vengeance",		specs+21, N_F,  1, 43, 2, 0 }
124bf72b656Schristos 		}
12561f28255Scgd 	},
126bf72b656Schristos 	{ 1, 3, 6, 10, "The Battle of Lissa",
12761f28255Scgd 		{
12861f28255Scgd 			{ "Amphion",		specs+23, N_B,  8, 50, 4, 0 },
12961f28255Scgd 			{ "Active",		specs+24, N_B,  6, 48, 4, 0 },
13061f28255Scgd 			{ "Volage",		specs+25, N_B,  4, 46, 4, 0 },
13161f28255Scgd 			{ "Cerberus",		specs+26, N_B,  2, 44, 4, 0 },
13261f28255Scgd 			{ "Favorite",		specs+27, N_F,  9, 34, 2, 0 },
13361f28255Scgd 			{ "Flore",		specs+21, N_F, 13, 39, 2, 0 },
13461f28255Scgd 			{ "Danae",		specs+64, N_F, 15, 37, 2, 0 },
13561f28255Scgd 			{ "Bellona",		specs+28, N_F, 17, 35, 2, 0 },
13661f28255Scgd 			{ "Corona",		specs+29, N_F, 12, 31, 2, 0 },
13761f28255Scgd 			{ "Carolina",		specs+30, N_F, 15, 28, 2, 0 }
138bf72b656Schristos 		}
13961f28255Scgd 	},
140bf72b656Schristos 	{ 2, 5, 6, 2, "Constitution vs. Guerriere",
14161f28255Scgd 		{
14261f28255Scgd 			{ "Constitution",	specs+31, N_A,  7, 35, 1, 0 },
14361f28255Scgd 			{ "Guerriere",		specs+32, N_B,  7, 47, 4, 0 }
144bf72b656Schristos 		}
14561f28255Scgd 	},
146bf72b656Schristos 	{ 1, 3, 5, 2, "United States vs. Macedonian",
14761f28255Scgd 		{
14861f28255Scgd 			{ "United States",	specs+33, N_A,  1, 52, 6, 0 },
14961f28255Scgd 			{ "Macedonian",		specs+34, N_B, 14, 40, 1, 0 }
150bf72b656Schristos 		}
15161f28255Scgd 	},
152bf72b656Schristos 	{ 1, 3, 6, 2, "Constitution vs. Java",
15361f28255Scgd 		{
15461f28255Scgd 			{ "Constitution",	specs+31, N_A,  1, 40, 2, 0 },
15561f28255Scgd 			{ "Java",		specs+35, N_B, 11, 40, 2, 0 }
156bf72b656Schristos 		}
15761f28255Scgd 	},
158bf72b656Schristos 	{ 1, 3, 5, 2, "Chesapeake vs. Shannon",
15961f28255Scgd 		{
16061f28255Scgd 			{ "Chesapeake",		specs+36, N_A, 13, 40, 2, 0 },
16161f28255Scgd 			{ "Shannon",		specs+37, N_B,  1, 42, 2, 0 }
162bf72b656Schristos 		}
16361f28255Scgd 	},
164bf72b656Schristos 	{ 1, 1, 6, 5, "The Battle of Lake Erie",
16561f28255Scgd 		{
16661f28255Scgd 			{ "Lawrence",		specs+38, N_A,  4, 55, 8, 0 },
16761f28255Scgd 			{ "Niagara",		specs+42, N_A,  7, 61, 8, 0 },
16861f28255Scgd 			{ "Lady Prevost",	specs+39, N_B,  4, 25, 2, 0 },
16961f28255Scgd 			{ "Detroit",		specs+40, N_B,  7, 22, 2, 0 },
17061f28255Scgd 			{ "Q. Charlotte",	specs+41, N_B, 10, 19, 2, 0 }
171bf72b656Schristos 		}
17261f28255Scgd 	},
173bf72b656Schristos 	{ 1, 1, 5, 2, "Wasp vs. Reindeer",
17461f28255Scgd 		{
17561f28255Scgd 			{ "Wasp",		specs+42, N_A,  3, 41, 2, 0 },
17661f28255Scgd 			{ "Reindeer",		specs+43, N_B, 10, 48, 2, 0 }
177bf72b656Schristos 		}
17861f28255Scgd 	},
179bf72b656Schristos 	{ 1, 2, 5, 3, "Constitution vs. Cyane and Levant",
18061f28255Scgd 		{
18161f28255Scgd 			{ "Constitution",	specs+31, N_A, 10, 45, 2, 0 },
18261f28255Scgd 			{ "Cyane",		specs+44, N_B,  3, 37, 2, 0 },
18361f28255Scgd 			{ "Levant",		specs+45, N_B,  5, 35, 2, 0 }
184bf72b656Schristos 		}
18561f28255Scgd 	},
186bf72b656Schristos 	{ 5, 5, 5, 3, "Pellew vs. Droits de L'Homme",
18761f28255Scgd 		{
18861f28255Scgd 			{ "Indefatigable",	specs+46, N_B, 12, 45, 6, 0 },
18961f28255Scgd 			{ "Amazon",		specs+47, N_B,  9, 48, 6, 0 },
19061f28255Scgd 			{ "Droits L'Hom",	specs+48, N_F,  3, 28, 5, 0 }
191bf72b656Schristos 		}
19261f28255Scgd 	},
193bf72b656Schristos 	{ 2, 2, 3, 10, "Algeciras",
19461f28255Scgd 		{
19561f28255Scgd 			{ "Caesar",		specs+49, N_B,  7, 70, 6, 0 },
19661f28255Scgd 			{ "Pompee",		specs+50, N_B,  5, 72, 6, 0 },
19761f28255Scgd 			{ "Spencer",		specs+5,  N_B,  3, 74, 6, 0 },
19861f28255Scgd 			{ "Hannibal",		specs+7,  N_B,  1, 76, 6, 0 },
19961f28255Scgd 			{ "Real-Carlos",	specs+53, N_S,  9, 20, 3, 0 },
20061f28255Scgd 			{ "San Fernando",	specs+54, N_S, 11, 16, 3, 0 },
20161f28255Scgd 			{ "Argonauta",		specs+55, N_S, 10, 14, 4, 0 },
20261f28255Scgd 			{ "San Augustine",	specs+56, N_S,  6, 22, 4, 0 },
20361f28255Scgd 			{ "Indomptable",	specs+51, N_F,  7, 23, 5, 0 },
20461f28255Scgd 			{ "Desaix",		specs+52, N_F,  7, 27, 7, 0 }
205bf72b656Schristos 		}
20661f28255Scgd 	},
207bf72b656Schristos 	{ 5, 3, 6, 7, "Lake Champlain",
20861f28255Scgd 		{
20961f28255Scgd 			{ "Saratoga",		specs+60, N_A,  8, 10, 1, 0 },
21061f28255Scgd 			{ "Eagle",		specs+61, N_A,  9, 13, 2, 0 },
21161f28255Scgd 			{ "Ticonderoga",	specs+62, N_A, 12, 17, 3, 0 },
21261f28255Scgd 			{ "Preble",		specs+63, N_A, 14, 20, 2, 0 },
21361f28255Scgd 			{ "Confiance",		specs+57, N_B,  4, 70, 6, 0 },
21461f28255Scgd 			{ "Linnet",		specs+58, N_B,  7, 68, 6, 0 },
21561f28255Scgd 			{ "Chubb",		specs+59, N_B, 10, 65, 6, 0 }
216bf72b656Schristos 		}
21761f28255Scgd 	},
218bf72b656Schristos 	{ 5, 3, 6, 4, "Last Voyage of the USS President",
21961f28255Scgd 		{
22061f28255Scgd 			{ "President",		specs+67, N_A, 12, 42, 5, 0 },
22161f28255Scgd 			{ "Endymion",		specs+64, N_B,  5, 42, 5, 0 },
22261f28255Scgd 			{ "Pomone",		specs+65, N_B,  7, 82, 6, 0 },
22361f28255Scgd 			{ "Tenedos",		specs+66, N_B,  7, -1, 4, 0 }
224bf72b656Schristos 		}
22561f28255Scgd 	},
226bf72b656Schristos 	{ 7, 5, 5, 2, "Hornblower and the Natividad",
22761f28255Scgd 		{
22861f28255Scgd 			{ "Lydia",		specs+68, N_B, 12, 40, 2, 0 },
22961f28255Scgd 			{ "Natividad",		specs+69, N_S,  2, 40, 4, 0 }
230bf72b656Schristos 		}
23161f28255Scgd 	},
232bf72b656Schristos 	{ 1, 3, 6, 2, "Curse of the Flying Dutchman",
23361f28255Scgd 		{
23461f28255Scgd 			{ "Piece of Cake",	specs+19, N_S,  7, 40, 2, 0 },
23561f28255Scgd 			{ "Flying Dutchy",	specs+71, N_F,  7, 41, 1, 0 }
236bf72b656Schristos 		}
23761f28255Scgd 	},
238bf72b656Schristos 	{ 1, 4, 1, 4, "The South Pacific",
23961f28255Scgd 		{
24061f28255Scgd 			{ "USS Scurvy",		specs+70, N_A,  7, 40, 1, 0 },
24161f28255Scgd 			{ "HMS Tahiti",		specs+71, N_B, 12, 60, 1, 0 },
24261f28255Scgd 			{ "Australian",		specs+18, N_S,  5, 20, 8, 0 },
24361f28255Scgd 			{ "Bikini Atoll",	specs+63, N_F,  2, 60, 4, 0 }
244bf72b656Schristos 		}
24561f28255Scgd 	},
246bf72b656Schristos 	{ 7, 3, 6, 5, "Hornblower and the battle of Rosas bay",
24761f28255Scgd 		{
24861f28255Scgd 			{ "Sutherland",		specs+5,  N_B, 13, 30, 2, 0 },
24961f28255Scgd 			{ "Turenne",		specs+10, N_F,  9, 35, 6, 0 },
25061f28255Scgd 			{ "Nightmare",		specs+9,  N_F,  7, 37, 6, 0 },
25161f28255Scgd 			{ "Paris",		specs+53, N_F,  3, 45, 4, 0 },
252862f7b5fSglass 			{ "Napoleon",		specs+56, N_F,  1, 40, 6, 0 }
253bf72b656Schristos 		}
25461f28255Scgd 	},
255bf72b656Schristos 	{ 6, 4, 7, 5, "Cape Horn",
25661f28255Scgd 		{
25761f28255Scgd 			{ "Concord",		specs+51, N_A,  3, 20, 4, 0 },
25861f28255Scgd 			{ "Berkeley",		specs+7,  N_A,  5, 50, 5, 0 },
25961f28255Scgd 			{ "Thames",		specs+71, N_B, 10, 40, 1, 0 },
26061f28255Scgd 			{ "Madrid",		specs+53, N_S, 13, 60, 8, 0 },
26161f28255Scgd 			{ "Musket",		specs+10, N_F, 10, 60, 7, 0 }
262bf72b656Schristos 		}
26361f28255Scgd 	},
264bf72b656Schristos 	{ 8, 3, 7, 3, "New Orleans",
26561f28255Scgd 		{
26661f28255Scgd 			{ "Alligator",		specs+71, N_A, 13,  5, 1, 0 },
26761f28255Scgd 			{ "Firefly",		specs+50, N_B, 10, 20, 8, 0 },
26861f28255Scgd 			{ "Cypress",		specs+46, N_B,  5, 10, 6, 0 }
269bf72b656Schristos 		}
27061f28255Scgd 	},
271bf72b656Schristos 	{ 5, 3, 7, 3, "Botany Bay",
27261f28255Scgd 		{
27361f28255Scgd 			{ "Shark",		specs+11, N_B,  6, 15, 4, 0 },
27461f28255Scgd 			{ "Coral Snake",	specs+31, N_F,  3, 30, 6, 0 },
27561f28255Scgd 			{ "Sea Lion",		specs+33, N_F, 13, 50, 8, 0 }
276bf72b656Schristos 		}
27761f28255Scgd 	},
278bf72b656Schristos 	{ 4, 3, 6, 4, "Voyage to the Bottom of the Sea",
27961f28255Scgd 		{
28061f28255Scgd 			{ "Seaview",		specs+71, N_A,  6, 3,  3, 0 },
28161f28255Scgd 			{ "Flying Sub",		specs+64, N_A,  8, 3,  3, 0 },
28261f28255Scgd 			{ "Mermaid",		specs+70, N_B,  2, 5,  5, 0 },
28361f28255Scgd 			{ "Giant Squid",	specs+53, N_S, 10, 30, 8, 0 }
284bf72b656Schristos 		}
28561f28255Scgd 	},
286bf72b656Schristos 	{ 7, 3, 6, 3, "Frigate Action",
28761f28255Scgd 		{
28861f28255Scgd 			{ "Killdeer",		specs+21, N_A,  7, 20, 8, 0 },
28961f28255Scgd 			{ "Sandpiper",		specs+27, N_B,  5, 40, 8, 0 },
29061f28255Scgd 			{ "Curlew",		specs+34, N_S, 10, 60, 8, 0 }
291bf72b656Schristos 		}
29261f28255Scgd 	},
293bf72b656Schristos 	{ 7, 2, 5, 6, "The Battle of Midway",
29461f28255Scgd 		{
29561f28255Scgd 			{ "Enterprise",		specs+49, N_A, 10, 70, 8, 0 },
29661f28255Scgd 			{ "Yorktown",		specs+51, N_A,  3, 70, 7, 0 },
29761f28255Scgd 			{ "Hornet",		specs+52, N_A,  6, 70, 7, 0 },
29861f28255Scgd 			{ "Akagi",		specs+53, N_J,  6, 10, 4, 0 },
29961f28255Scgd 			{ "Kaga",		specs+54, N_J,  4, 12, 4, 0 },
30061f28255Scgd 			{ "Soryu",		specs+55, N_J,  2, 14, 4, 0 }
301bf72b656Schristos 		}
30261f28255Scgd 	},
303bf72b656Schristos 	{ 1, 3, 4, 8, "Star Trek",
30461f28255Scgd 		{
30561f28255Scgd 			{ "Enterprise",		specs+76, N_D,-10, 60, 7, 0 },
30661f28255Scgd 			{ "Yorktown",		specs+77, N_D,  0, 70, 7, 0 },
30761f28255Scgd 			{ "Reliant",		specs+78, N_D, 10, 70, 7, 0 },
30861f28255Scgd 			{ "Galileo",		specs+79, N_D, 20, 60, 7, 0 },
30961f28255Scgd 			{ "Kobayashi Maru",	specs+80, N_K,  0,120, 7, 0 },
31061f28255Scgd 			{ "Klingon II",		specs+81, N_K, 10,120, 7, 0 },
31161f28255Scgd 			{ "Red Orion",		specs+82, N_O,  0,  0, 3, 0 },
31261f28255Scgd 			{ "Blue Orion",		specs+83, N_O, 10,  0, 3, 0 }
31361f28255Scgd 		}
314bf72b656Schristos 	}
31561f28255Scgd };
31661f28255Scgd int nscene = sizeof scene / sizeof (struct scenario);
31761f28255Scgd 
31861f28255Scgd struct shipspecs specs[] = {
31961f28255Scgd /*      bs fs ta guns   hull  crew1   crew3    gunR  carR   rig2  rig4 pts */
32061f28255Scgd /*                 class   qual   crew2    gunL   carL   rig1  rig3        */
321bf72b656Schristos /*00*/{	4, 7, 3,  19, 5,  5, 4,  2,  2,  2,  2,  2, 0, 0,  4, 4, 4,  4,  7 },
322bf72b656Schristos /*01*/{	4, 7, 3,  17, 5,  5, 4,  2,  2,  2,  0,  0, 4, 4,  3, 3, 3,  3,  6 },
323bf72b656Schristos /*02*/{	3, 5, 2,  42, 4,  7, 4,  2,  2,  2,  2,  2, 0, 0,  5, 5, 5, -1, 11 },
324bf72b656Schristos /*03*/{	4, 6, 3,  44, 3,  7, 4,  2,  2,  2,  3,  3, 0, 0,  5, 5, 5,  5, 12 },
325bf72b656Schristos /*04*/{	3, 5, 2,  64, 2, 17, 4,  8,  6,  6, 12, 12, 2, 2,  7, 7, 7, -1, 20 },
326bf72b656Schristos /*05*/{	3, 5, 2,  74, 2, 20, 4,  8,  8,  8, 16, 16, 2, 2,  7, 7, 7, -1, 26 },
327bf72b656Schristos /*06*/{	3, 5, 2,  50, 2, 12, 4,  6,  4,  4,  8,  8, 2, 2,  6, 6, 6, -1, 17 },
328bf72b656Schristos /*07*/{	3, 5, 1,  98, 1, 23, 4, 10, 10, 10, 18, 18, 2, 2,  8, 8, 8, -1, 28 },
329bf72b656Schristos /*08*/{	3, 5, 2,  74, 2, 20, 4,  8,  8,  8, 16, 16, 2, 2,  7, 7, 7, -1, 26 },
330bf72b656Schristos /*09*/{	3, 5, 2,  74, 2, 21, 3, 10, 10,  8, 20, 20, 0, 0,  7, 7, 7, -1, 24 },
331bf72b656Schristos /*10*/{	3, 5, 1,  80, 1, 23, 3, 12, 12, 10, 22, 22, 0, 0,  7, 7, 7, -1, 27 },
332bf72b656Schristos /*11*/{	3, 5, 2,  64, 2, 18, 3,  8,  8,  6, 12, 12, 0, 0,  7, 7, 7, -1, 18 },
333bf72b656Schristos /*12*/{	3, 5, 2,  44, 2, 11, 3,  4,  4,  4,  6,  6, 2, 2,  5, 5, 5, -1, 10 },
334bf72b656Schristos /*13*/{	3, 5, 2,  50, 2, 14, 3,  6,  6,  4,  8,  8, 0, 0,  6, 6, 6, -1, 14 },
335bf72b656Schristos /*14*/{	4, 6, 3,  36, 3, 11, 4,  4,  4,  2,  4,  4, 2, 2,  5, 5, 5,  5, 11 },
336bf72b656Schristos /*15*/{	4, 6, 3,  36, 3, 11, 3,  4,  4,  4,  4,  4, 2, 2,  5, 5, 5,  5, 10 },
337bf72b656Schristos /*16*/{	3, 5, 2,  74, 2, 21, 4, 10,  8,  8, 18, 18, 2, 2,  7, 7, 7, -1, 26 },
338bf72b656Schristos /*17*/{	3, 5, 2,  74, 2, 21, 3, 10, 10,  8, 20, 20, 2, 2,  7, 7, 7, -1, 23 },
339bf72b656Schristos /*18*/{	4, 6, 3,  32, 3,  8, 3,  4,  2,  2,  4,  4, 2, 2,  5, 5, 5,  5,  9 },
340bf72b656Schristos /*19*/{	4, 6, 3,  24, 4,  6, 3,  4,  4,  4,  2,  2, 0, 0,  4, 4, 4,  4,  9 },
341bf72b656Schristos /*20*/{	4, 7, 3,  38, 4, 14, 5,  6,  4,  4,  4,  4, 6, 6,  5, 5, 5,  5, 17 },
342bf72b656Schristos /*21*/{	4, 6, 3,  40, 3, 15, 3,  8,  6,  6,  6,  6, 4, 4,  5, 5, 5,  5, 15 },
343bf72b656Schristos /*22*/{	4, 7, 3,  36, 4, 11, 3,  6,  6,  4,  4,  4, 2, 2,  5, 5, 5,  5, 11 },
344bf72b656Schristos /*23*/{	4, 6, 3,  32, 3, 11, 5,  4,  4,  2,  4,  4, 2, 2,  5, 5, 5,  5, 13 },
345bf72b656Schristos /*24*/{	4, 6, 3,  38, 3, 14, 5,  4,  4,  4,  6,  6, 4, 4,  5, 5, 5,  5, 18 },
346bf72b656Schristos /*25*/{	4, 6, 3,  22, 3,  6, 5,  2,  2,  2,  0,  0, 8, 8,  4, 4, 4,  4, 11 },
347bf72b656Schristos /*26*/{	4, 6, 3,  32, 3, 11, 5,  4,  4,  2,  4,  4, 2, 2,  5, 5, 5,  5, 13 },
348bf72b656Schristos /*27*/{	4, 6, 3,  40, 3, 14, 3,  6,  6,  4,  6,  6, 4, 4,  5, 5, 5,  5, 15 },
349bf72b656Schristos /*28*/{	4, 6, 3,  32, 3, 11, 2,  4,  4,  4,  4,  4, 0, 0,  5, 5, 5,  5,  9 },
350bf72b656Schristos /*29*/{	4, 6, 3,  40, 3, 14, 2,  6,  6,  4,  6,  6, 4, 4,  5, 5, 5,  5, 12 },
351bf72b656Schristos /*30*/{	4, 6, 3,  32, 3,  8, 2,  4,  4,  1,  2,  2, 0, 0,  4, 4, 4,  4,  7 },
352bf72b656Schristos /*31*/{	4, 7, 3,  44, 4, 18, 5,  6,  6,  6,  8,  8, 6, 6,  6, 6, 6,  6, 24 },
353bf72b656Schristos /*32*/{	4, 6, 3,  38, 3, 14, 4,  4,  4,  2,  6,  6, 4, 4,  5, 5, 5,  5, 15 },
354bf72b656Schristos /*33*/{	4, 5, 3,  44, 3, 18, 5,  8,  6,  6,  8,  8, 8, 8,  6, 6, 6,  6, 24 },
355bf72b656Schristos /*34*/{	4, 6, 3,  38, 3, 14, 4,  4,  4,  4,  6,  6, 4, 4,  5, 5, 5,  5, 16 },
356bf72b656Schristos /*35*/{	4, 7, 3,  38, 4, 14, 4,  6,  6,  6,  6,  6, 6, 6,  5, 5, 5,  5, 19 },
357bf72b656Schristos /*36*/{	4, 6, 3,  38, 3, 14, 3,  6,  6,  4,  6,  6, 6, 6,  5, 5, 5,  5, 14 },
358bf72b656Schristos /*37*/{	4, 6, 3,  38, 3, 14, 5,  6,  4,  4,  6,  6, 6, 6,  5, 5, 5,  5, 17 },
359bf72b656Schristos /*38*/{	4, 7, 3,  20, 5,  6, 4,  4,  2,  2,  0,  0, 6, 6,  4, 4, 4,  4,  9 },
360bf72b656Schristos /*39*/{	4, 7, 3,  13, 6,  3, 4,  0,  2,  2,  0,  0, 2, 2,  2, 2, 2,  2,  5 },
361bf72b656Schristos /*40*/{	4, 7, 3,  19, 5,  5, 4,  2,  2,  2,  2,  2, 0, 0,  4, 4, 4,  4,  7 },
362bf72b656Schristos /*41*/{	4, 7, 3,  17, 5,  5, 4,  2,  2,  2,  2,  2, 0, 0,  3, 3, 3,  3,  6 },
363bf72b656Schristos /*42*/{	4, 7, 3,  20, 5,  6, 5,  4,  2,  2,  0,  0, 6, 6,  4, 4, 4,  4, 12 },
364bf72b656Schristos /*43*/{	4, 7, 3,  18, 5,  5, 5,  2,  2,  2,  0,  0, 6, 6,  4, 4, 4,  4,  9 },
365bf72b656Schristos /*44*/{	4, 7, 3,  24, 5,  6, 4,  4,  2,  2,  0,  0,10,10,  4, 4, 4,  4, 11 },
366bf72b656Schristos /*45*/{	4, 7, 3,  20, 5,  6, 4,  2,  2,  2,  0,  0, 8, 8,  4, 4, 4,  4, 10 },
367bf72b656Schristos /*46*/{	4, 6, 3,  44, 3, 11, 5,  4,  4,  4,  4,  4, 2, 2,  5, 5, 5,  5, 14 },
368bf72b656Schristos /*47*/{	4, 6, 3,  36, 3, 12, 4,  4,  4,  4,  6,  6, 2, 2,  5, 5, 5,  5, 14 },
369bf72b656Schristos /*48*/{	3, 5, 2,  74, 2, 21, 3, 10,  8,  8, 20, 20, 2, 2,  4, 4, 7, -1, 24 },
370bf72b656Schristos /*49*/{	3, 5, 2,  80, 2, 24, 4, 10,  8,  8, 20, 20, 2, 2,  8, 8, 8, -1, 31 },
371bf72b656Schristos /*50*/{	3, 5, 2,  74, 2, 21, 4,  8,  8,  6, 16, 16, 4, 4,  7, 7, 7, -1, 27 },
372bf72b656Schristos /*51*/{	3, 5, 2,  80, 2, 24, 3, 12, 12, 10, 22, 22, 2, 2,  7, 7, 7, -1, 27 },
373bf72b656Schristos /*52*/{	3, 5, 2,  74, 2, 21, 3, 10, 10,  8, 20, 20, 2, 2,  7, 7, 7, -1, 24 },
374bf72b656Schristos /*53*/{	3, 5, 1, 112, 1, 27, 2, 12, 12, 12, 24, 24, 0, 0,  9, 9, 9, -1, 27 },
375bf72b656Schristos /*54*/{	3, 5, 1,  96, 1, 24, 2, 12, 12, 10, 20, 20, 0, 0,  8, 8, 8, -1, 24 },
376bf72b656Schristos /*55*/{	3, 5, 2,  80, 2, 23, 2, 10, 10,  8, 20, 20, 0, 0,  7, 7, 7, -1, 23 },
377bf72b656Schristos /*56*/{	3, 5, 2,  74, 2, 21, 2, 10,  8,  8, 16, 16, 4, 4,  7, 7, 7, -1, 20 },
378bf72b656Schristos /*57*/{	4, 6, 3,  37, 3, 12, 4,  4,  4,  2,  6,  6, 4, 4,  5, 5, 5,  5, 14 },
379bf72b656Schristos /*58*/{	4, 7, 3,  16, 5,  5, 5,  2,  2,  2,  0,  0, 4, 4,  4, 4, 4,  4, 10 },
380bf72b656Schristos /*59*/{	4, 7, 3,  11, 6,  3, 4,  2,  2,  2,  0,  0, 2, 2,  2, 2, 2,  2,  5 },
381bf72b656Schristos /*60*/{	4, 7, 3,  26, 5,  6, 4,  4,  2,  2,  2,  2, 6, 6,  4, 4, 4,  4, 12 },
382bf72b656Schristos /*61*/{	4, 7, 3,  20, 5,  6, 4,  4,  2,  2,  0,  0, 6, 6,  4, 4, 4,  4, 11 },
383bf72b656Schristos /*62*/{	4, 7, 3,  17, 5,  5, 4,  2,  2,  2,  0,  0, 6, 6,  4, 4, 4,  4,  9 },
384bf72b656Schristos /*63*/{	4, 7, 3,   7, 6,  3, 4,  0,  2,  2,  0,  0, 2, 2,  2, 2, 2,  2,  4 },
385bf72b656Schristos /*64*/{	4, 6, 3,  40, 3, 15, 4,  4,  4,  4,  8,  8, 6, 6,  5, 5, 5,  5, 17 },
386bf72b656Schristos /*65*/{	4, 6, 3,  44, 3, 15, 4,  8,  8,  6, 10, 10, 2, 2,  6, 6, 6,  6, 20 },
387bf72b656Schristos /*66*/{	4, 6, 3,  38, 3, 14, 4,  4,  4,  4,  6,  6, 6, 6,  5, 5, 5,  5, 15 },
388bf72b656Schristos /*67*/{	4, 5, 3,  44, 3, 18, 5,  8,  6,  6,  8,  8, 8, 8,  6, 6, 6,  6, 24 },
389bf72b656Schristos /*68*/{	4, 6, 3,  36, 3,  9, 5,  4,  4,  2,  4,  4, 2, 2,  5, 5, 5,  5, 13 },
390bf72b656Schristos /*69*/{	3, 5, 2,  50, 2, 14, 2,  6,  6,  6,  8,  8, 0, 0,  6, 6, 6, -1, 14 },
391bf72b656Schristos /*70*/{	3, 5, 1, 136, 1, 30, 1,  8, 14, 14, 28, 28, 0, 0,  9, 9, 9, -1, 27 },
392bf72b656Schristos /*71*/{	3, 5, 1, 120, 1, 27, 5, 16, 14, 14, 28, 28, 2, 2,  9, 9, 9, -1, 43 },
393bf72b656Schristos /*72*/{	3, 5, 1, 120, 2, 21, 5, 15, 17, 15, 25, 25, 7, 7,  9, 9, 9, -1, 36 },
394bf72b656Schristos /*73*/{	3, 5, 1,  90, 3, 18, 4, 13, 15, 13, 20, 20, 6, 6,  5, 5, 5,  5, 28 },
395bf72b656Schristos /*74*/{	4, 7, 3,   6, 6,  3, 4,  2,  2,  2, 20, 20, 6, 6,  2, 2, 3,  3,  5 },
396bf72b656Schristos /*75*/{	3, 5, 1, 110, 2, 20, 4, 14, 15, 11, 26, 26, 8, 8,  7, 8, 9, -1, 34 },
397bf72b656Schristos /*76*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
398bf72b656Schristos /*77*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
399bf72b656Schristos /*78*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
400bf72b656Schristos /*79*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
401bf72b656Schristos /*80*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
402bf72b656Schristos /*81*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
403bf72b656Schristos /*82*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 },
404bf72b656Schristos /*83*/{	4, 7, 3, 450, 1, 99, 5, 50, 40, 40, 50, 50,25,25,  9, 9, 9, -1, 75 }
40561f28255Scgd /*      bs fs ta guns   hull  crew1   crew3    gunR  carR   rig2  rig4 pts */
40661f28255Scgd /*                 class   qual   crew2    gunL   carL   rig1  rig3        */
40761f28255Scgd };
40861f28255Scgd 
409092d3130Sjsm const struct windeffects WET[7][6] = {
41061f28255Scgd 	{ {9,9,9,9}, {9,9,9,9}, {9,9,9,9}, {9,9,9,9}, {9,9,9,9}, {9,9,9,9} },
41161f28255Scgd 	{ {3,2,2,0}, {3,2,1,0}, {3,2,1,0}, {3,2,1,0}, {2,1,0,0}, {2,1,0,0} },
41261f28255Scgd 	{ {1,1,1,0}, {1,1,0,0}, {1,0,0,0}, {1,0,0,0}, {1,0,0,0}, {1,0,0,0} },
41361f28255Scgd 	{ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },
41461f28255Scgd 	{ {0,0,0,0}, {1,0,0,0}, {1,1,0,0}, {1,1,0,0}, {2,2,1,0}, {2,2,1,0} },
41561f28255Scgd 	{ {1,0,0,0}, {1,1,0,0}, {1,1,1,0}, {1,1,1,0}, {3,2,2,0}, {3,2,2,0} },
41661f28255Scgd 	{ {2,1,1,0}, {3,2,1,0}, {3,2,1,0}, {3,2,1,0}, {3,3,2,0}, {3,3,2,0} }
41761f28255Scgd };
41861f28255Scgd 
419092d3130Sjsm const struct Tables RigTable[11][6] = {
42061f28255Scgd 	{ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,1}, {0,0,1,0} },
42161f28255Scgd 	{ {0,0,0,0}, {0,0,0,0}, {0,0,0,1}, {0,0,1,0}, {1,0,0,1}, {0,1,1,1} },
42261f28255Scgd 	{ {0,0,0,0}, {0,0,0,1}, {0,0,1,1}, {0,1,0,1}, {0,1,0,1}, {1,0,1,2} },
42361f28255Scgd 	{ {0,0,0,0}, {0,0,1,1}, {0,1,0,1}, {0,0,0,2}, {0,1,0,2}, {1,0,1,2} },
42461f28255Scgd 	{ {0,1,0,1}, {1,0,0,1}, {0,1,1,2}, {0,1,0,2}, {0,0,1,3}, {1,0,1,4} },
42561f28255Scgd 	{ {0,0,1,1}, {0,1,0,2}, {1,0,0,3}, {0,1,1,3}, {1,0,0,4}, {1,1,1,4} },
42661f28255Scgd 	{ {0,0,1,2}, {0,1,1,2}, {1,1,0,3}, {0,1,0,4}, {1,0,0,4}, {1,0,1,5} },
42761f28255Scgd 	{ {0,0,1,2}, {0,1,0,3}, {1,1,0,3}, {1,0,2,4}, {0,2,1,5}, {2,1,0,5} },
42861f28255Scgd 	{ {0,2,1,3}, {1,0,0,3}, {2,1,0,4}, {0,1,1,4}, {0,1,0,5}, {1,0,2,6} },
42961f28255Scgd 	{ {1,1,0,4}, {1,0,1,4}, {2,0,0,5}, {0,2,1,5}, {0,1,2,6}, {0,2,0,7} },
43061f28255Scgd 	{ {1,0,1,5}, {0,2,0,6}, {1,2,0,6}, {1,1,1,6}, {2,0,2,6}, {1,1,2,7} }
43161f28255Scgd };
432092d3130Sjsm const struct Tables HullTable[11][6] = {
43361f28255Scgd 	{ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {1,0,0,0}, {0,1,0,0} },
43461f28255Scgd 	{ {0,0,0,0}, {0,0,0,0}, {0,1,0,0}, {1,1,0,0}, {1,0,1,0}, {1,0,1,1} },
43561f28255Scgd 	{ {0,1,0,0}, {1,0,0,0}, {1,1,0,0}, {1,0,1,0}, {1,0,1,1}, {2,1,0,0} },
43661f28255Scgd 	{ {0,1,1,0}, {1,0,0,0}, {1,1,1,0}, {2,0,0,1}, {2,0,1,0}, {2,2,0,0} },
43761f28255Scgd 	{ {0,1,1,0}, {1,0,0,1}, {2,1,0,1}, {2,2,1,0}, {3,0,1,0}, {3,1,0,0} },
43861f28255Scgd 	{ {1,1,1,0}, {2,0,2,1}, {2,1,1,0}, {2,2,0,0}, {3,1,0,1}, {3,1,1,0} },
43961f28255Scgd 	{ {1,2,2,0}, {2,0,2,1}, {2,1,0,1}, {2,2,0,0}, {3,1,1,0}, {4,2,1,0} },
44061f28255Scgd 	{ {2,1,1,0}, {2,0,1,1}, {3,2,2,0}, {3,2,0,0}, {4,2,1,0}, {4,2,1,1} },
44161f28255Scgd 	{ {2,1,2,0}, {3,1,1,1}, {3,2,2,0}, {4,2,1,0}, {4,1,0,2}, {4,2,2,0} },
44261f28255Scgd 	{ {2,3,1,0}, {3,2,2,0}, {3,2,2,1}, {4,2,2,0}, {4,1,0,3}, {5,1,2,0} },
44361f28255Scgd 	{ {2,2,4,0}, {3,3,1,1}, {4,2,1,1}, {5,1,0,2}, {5,1,2,1}, {6,2,2,0} },
44461f28255Scgd };
44561f28255Scgd 
446092d3130Sjsm const char AMMO[9][4] = {
44761f28255Scgd 	{ -1, 1, 0, 1 },
44861f28255Scgd 	{ -1, 1, 0, 1 },
44961f28255Scgd 	{ -1, 1, 0, 1 },
45061f28255Scgd 	{ -2, 1, 0, 2 },
45161f28255Scgd 	{ -2, 2, 0, 2 },
45261f28255Scgd 	{ -2, 2, 0, 2 },
45361f28255Scgd 	{ -3, 2, 0, 2 },
45461f28255Scgd 	{ -3, 2, 0, 3 },
45561f28255Scgd 	{ -3, 2, 0, 3 }
45661f28255Scgd };
45761f28255Scgd 
458092d3130Sjsm const char HDT[9][10] = {
45961f28255Scgd 	{ 1, 0,-1,-2,-3,-3,-4,-4,-4,-4 },
46061f28255Scgd 	{ 1, 1, 0,-1,-2,-2,-3,-3,-3,-3 },
46161f28255Scgd 	{ 2, 1, 0,-1,-2,-2,-3,-3,-3,-3 },
46261f28255Scgd 	{ 2, 2, 1, 0,-1,-1,-2,-2,-2,-2 },
46361f28255Scgd 	{ 3, 2, 1, 0,-1,-1,-2,-2,-2,-2 },
46461f28255Scgd 	{ 3, 3, 2, 1, 0, 0,-1,-1,-1,-1 },
46561f28255Scgd 	{ 4, 3, 2, 1, 0, 0,-1,-1,-1,-1 },
46661f28255Scgd 	{ 4, 4, 3, 2, 1, 1, 0, 0, 0, 0 },
46761f28255Scgd 	{ 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 }
46861f28255Scgd };
46961f28255Scgd 
470092d3130Sjsm const char HDTrake[9][10] = {
47161f28255Scgd 	{ 2, 1, 0,-1,-2,-2,-3,-3,-3,-3 },
47261f28255Scgd 	{ 2, 2, 1, 0,-1,-1,-2,-2,-2,-2 },
47361f28255Scgd 	{ 3, 2, 1, 0,-1,-1,-2,-2,-2,-2 },
47461f28255Scgd 	{ 4, 3, 2, 1, 0, 0,-1,-1,-1,-1 },
47561f28255Scgd 	{ 5, 4, 3, 2, 1, 1, 0, 0, 0, 0 },
47661f28255Scgd 	{ 6, 5, 4, 3, 2, 2, 1, 1, 1, 1 },
47761f28255Scgd 	{ 7, 6, 5, 4, 3, 3, 2, 2, 2, 2 },
47861f28255Scgd 	{ 8, 7, 6, 5, 4, 4, 3, 3, 3, 3 },
47961f28255Scgd 	{ 9, 8, 7, 6, 5, 5, 4, 4, 4, 4 }
48061f28255Scgd };
48161f28255Scgd 
482092d3130Sjsm const char QUAL[9][5] = {
48361f28255Scgd 	{ -1, 0, 0, 1, 1 },
48461f28255Scgd 	{ -1, 0, 0, 1, 1 },
48561f28255Scgd 	{ -1, 0, 0, 1, 2 },
48661f28255Scgd 	{ -1, 0, 0, 1, 2 },
48761f28255Scgd 	{ -1, 0, 0, 2, 2 },
48861f28255Scgd 	{ -1,-1, 0, 2, 2 },
48961f28255Scgd 	{ -2,-1, 0, 2, 2 },
49061f28255Scgd 	{ -2,-1, 0, 2, 2 },
49161f28255Scgd 	{ -2,-1, 0, 2, 3 }
49261f28255Scgd };
49361f28255Scgd 
494092d3130Sjsm const char MT[9][3] = {
49561f28255Scgd 	{ 1, 0, 0 },
49661f28255Scgd 	{ 1, 1, 0 },
49761f28255Scgd 	{ 2, 1, 0 },
49861f28255Scgd 	{ 2, 1, 1 },
49961f28255Scgd 	{ 2, 2, 1 },
50061f28255Scgd 	{ 3, 2, 1 },
50161f28255Scgd 	{ 3, 2, 2 },
50261f28255Scgd 	{ 4, 3, 2 },
50361f28255Scgd 	{ 4, 4, 2 }
50461f28255Scgd };
50561f28255Scgd 
506092d3130Sjsm const char rangeofshot[] = {
50761f28255Scgd 	0,
50861f28255Scgd 	1,		/* grape */
50961f28255Scgd 	3,		/* chain */
51061f28255Scgd 	10,		/* round */
51161f28255Scgd 	1		/* double */
51261f28255Scgd };
51361f28255Scgd 
514092d3130Sjsm const char *const countryname[] = {
51561f28255Scgd 	"American", "British", "Spanish", "French", "Japanese",
51661f28255Scgd 	"Federation", "Klingon", "Orion"
51761f28255Scgd };
51861f28255Scgd 
519092d3130Sjsm const char *const classname[] = {
52061f28255Scgd 	"Drift wood",
52161f28255Scgd 	"Ship of the Line",
52261f28255Scgd 	"Ship of the Line",
52361f28255Scgd 	"Frigate",
52461f28255Scgd 	"Corvette",
52561f28255Scgd 	"Sloop",
52661f28255Scgd 	"Brig"
52761f28255Scgd };
52861f28255Scgd 
529092d3130Sjsm const char *const directionname[] = {
53061f28255Scgd 	"dead ahead",
53161f28255Scgd 	"off the starboard bow",
53261f28255Scgd 	"off the starboard beam",
53361f28255Scgd 	"off the starboard quarter",
53461f28255Scgd 	"dead astern",
53561f28255Scgd 	"off the port quarter",
53661f28255Scgd 	"off the port beam",
53761f28255Scgd 	"off the port bow",
53861f28255Scgd 	"dead ahead"
53961f28255Scgd };
54061f28255Scgd 
541092d3130Sjsm const char *const qualname[] = { "dead", "mutinous", "green", "mundane", "crack", "elite" };
54261f28255Scgd 
543092d3130Sjsm const char loadname[] = { '-', 'G', 'C', 'R', 'D', 'E' };
54461f28255Scgd 
545092d3130Sjsm const char dr[] = { 0, 1, 1, 0, -1, -1, -1, 0, 1 };
546092d3130Sjsm const char dc[] = { 0, 0, -1, -1, -1, 0, 1, 1, 1 };
54773479d22Sjsm 
54873479d22Sjsm int mode;
54973479d22Sjsm jmp_buf restart;
55073479d22Sjsm 
55173479d22Sjsm char debug;				/* -D */
55273479d22Sjsm char randomize;				/* -x, give first available ship */
55373479d22Sjsm char longfmt;				/* -l, print score in long format */
55473479d22Sjsm char nobells;				/* -b, don't ring bell before Signal */
55573479d22Sjsm 
556*01be1267Sjsm gid_t gid;
557*01be1267Sjsm gid_t egid;
55873479d22Sjsm 
55973479d22Sjsm struct scenario *cc;		/* the current scenario */
56073479d22Sjsm struct ship *ls;		/* &cc->ship[cc->vessels] */
56173479d22Sjsm 
56273479d22Sjsm int winddir;
56373479d22Sjsm int windspeed;
56473479d22Sjsm int turn;
56573479d22Sjsm int game;
56673479d22Sjsm int alive;
56773479d22Sjsm int people;
56873479d22Sjsm char hasdriver;
569