]> git.pond.sub.org Git - empserver/blob - src/lib/global/product.c
i_type shift (include/item.h 1.12) broke the production of tech/res/edu/hap.
[empserver] / src / lib / global / product.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2004, 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  *  product.c: Product information
29  * 
30  *  Known contributors to this file:
31  *     
32  */
33
34 #include <stddef.h>
35 #include "misc.h"
36 #include "product.h"
37 #include "sect.h"
38 #include "nat.h"
39
40
41 struct pchrstr pchr[] = {
42 /*       level      cost    nrndx nrdep nlndx   nlmin nllag effic  sname name */
43     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
44      I_NONE, 0, 0, 0, 0, 0, 0, 0, 0,
45      "unused", "",},
46     {{I_LCM, I_HCM, I_NONE}, {2, 1, 0},
47      I_SHELL, -1, 3, 0, 0, NAT_TLEV, 20, 10, 100,
48      "shells", "shells",},
49     {{I_OIL, I_LCM, I_HCM}, {1, 5, 10},
50      I_GUN, -1, 30, 0, 0, NAT_TLEV, 20, 10, 100,
51      "guns", "guns",},
52     {{I_OIL, I_NONE, I_NONE}, {1, 0, 0},
53      I_PETROL, -1, 1, 0, 0, NAT_TLEV, 20, 10, 1000,
54      "petrol", "petrol",},
55     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
56      I_IRON, -1, 0, offsetof(struct sctstr, sct_min), 0, -1, 0, 0, 100,
57      "iron ore", "iron",},
58     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
59      I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 100,
60      "gold dust", "dust",},
61     {{I_DUST, I_NONE, I_NONE}, {5, 0, 0},
62      I_BAR, -1, 10, 0, 0, -1, 0, 0, 100,
63      "gold bars", "bars",},
64     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
65      I_FOOD, -1, 0, offsetof(struct sctstr, sct_fertil), 0, NAT_TLEV, -10, 10, 900,
66      "food", "food",},
67     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
68      I_OIL, -1, 0, offsetof(struct sctstr, sct_oil), 10, NAT_TLEV, -10, 10, 100,
69      "oil", "oil",},
70     {{I_IRON, I_NONE, I_NONE}, {1, 0, 0},
71      I_LCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100,
72      "light construction materials", "lcm",},
73     {{I_IRON, I_NONE, I_NONE}, {2, 0, 0},
74      I_HCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100,
75      "heavy construction materials", "hcm",},
76     {{I_DUST, I_OIL, I_LCM}, {1, 5, 10},
77      I_NONE, NAT_TLEV, 300, 0, 0, NAT_ELEV, 5, 10, 100,
78      "technological breakthroughs", "tech",},
79     {{I_DUST, I_OIL, I_LCM}, {1, 5, 10},
80      I_NONE, NAT_RLEV, 90, 0, 0, NAT_ELEV, 5, 10, 100,
81      "medical discoveries", "medical",},
82     {{I_LCM, I_NONE, I_NONE}, {1, 0, 0},
83      I_NONE, NAT_ELEV, 9, 0, 0, -1, 0, 0, 100,
84      "a class of graduates", "edu",},
85     {{I_LCM, I_NONE, I_NONE}, {1, 0, 0},
86      I_NONE, NAT_HLEV, 9, 0, 0, -1, 0, 0, 100,
87      "happy strollers", "happy",},
88     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
89      I_RAD, -1, 2, offsetof(struct sctstr, sct_uran), 35, NAT_TLEV, 40, 10, 100,
90      "radioactive materials", "rad",},
91     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
92      I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 75,
93      "gold dust", "dust",},
94     {{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
95      I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, "", "",}
96 };
97
98 int prd_maxno = (sizeof(pchr) / sizeof(struct pchrstr)) - 1;