|
|
1 | /* |
|
|
2 | * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. |
|
|
3 | * |
|
|
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
|
|
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
|
|
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
|
|
7 | * |
|
|
8 | * Crossfire TRT is free software: you can redistribute it and/or modify |
|
|
9 | * it under the terms of the GNU General Public License as published by |
|
|
10 | * the Free Software Foundation, either version 3 of the License, or |
|
|
11 | * (at your option) any later version. |
|
|
12 | * |
|
|
13 | * This program is distributed in the hope that it will be useful, |
|
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
16 | * GNU General Public License for more details. |
|
|
17 | * |
|
|
18 | * You should have received a copy of the GNU General Public License |
|
|
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
20 | * |
|
|
21 | * The authors can be reached via e-mail to <crossfire@schmorp.de> |
|
|
22 | */ |
|
|
23 | |
1 | /* 'recipe' and 'recipelist' are used by the alchemy code */ |
24 | /* 'recipe' and 'recipelist' are used by the alchemy code */ |
2 | typedef struct recipestruct { |
25 | typedef struct recipestruct |
|
|
26 | { |
3 | const char *title; /* distinguishing name of product */ |
27 | shstr title; /* distinguishing name of product */ |
4 | size_t arch_names; /* the size of the arch_name[] array */ |
28 | size_t arch_names; /* the size of the arch_name[] array */ |
5 | char **arch_name; /* the possible archetypes of the final product made */ |
29 | char **arch_name; /* the possible archetypes of the final product made */ |
6 | int chance; /* chance that recipe for this item will appear |
30 | int chance; /* chance that recipe for this item will appear |
7 | * in an alchemical grimore */ |
31 | * in an alchemical grimore */ |
8 | int diff; /* alchemical dfficulty level */ |
32 | int diff; /* alchemical dfficulty level */ |
9 | int exp; /* how much exp to give for this formulae */ |
33 | int exp; /* how much exp to give for this formulae */ |
10 | int index; /* an index value derived from formula ingredients */ |
34 | int index; /* an index value derived from formula ingredients */ |
11 | int transmute; /* if defined, one of the formula ingredients is |
35 | int transmute; /* if defined, one of the formula ingredients is |
12 | * used as the basis for the product object */ |
36 | * used as the basis for the product object */ |
13 | int yield; /* The maximum number of items produced by the recipe */ |
37 | int yield; /* The maximum number of items produced by the recipe */ |
14 | linked_char *ingred; /* comma delimited list of ingredients */ |
38 | linked_char *ingred; /* comma delimited list of ingredients */ |
15 | struct recipestruct *next; |
39 | struct recipestruct *next; |
16 | const char *keycode; /* keycode needed to use the recipe */ |
40 | shstr keycode; /* keycode needed to use the recipe */ |
17 | const char *skill; /* skill name used to make this recipe */ |
41 | shstr skill; /* skill name used to make this recipe */ |
18 | const char *cauldron; /* the arch of the cauldron/workbench used to house the |
42 | shstr cauldron; /* the arch of the cauldron/workbench used to house the |
19 | * formulae. */ |
43 | * formulae. */ |
20 | } recipe; |
44 | } recipe; |
21 | |
45 | |
22 | typedef struct recipeliststruct { |
46 | typedef struct recipeliststruct |
|
|
47 | { |
23 | int total_chance; |
48 | int total_chance; |
24 | int number; /* number of recipes in this list */ |
49 | int number; /* number of recipes in this list */ |
25 | struct recipestruct *items; /* pointer to first recipe in this list */ |
50 | struct recipestruct *items; /* pointer to first recipe in this list */ |
26 | struct recipeliststruct *next; /* pointer to next recipe list */ |
51 | struct recipeliststruct *next; /* pointer to next recipe list */ |
27 | } recipelist; |
52 | } recipelist; |
28 | |
|
|
29 | |
|
|