1 /*
2 This file is part of "Avanor, the Land of Mystery" roguelike game
3 Home page: http://www.avanor.com/
4 Copyright (C) 2000-2003 Vadim Gaidukevich
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., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20 
21 #ifndef __ITEMDB_H
22 #define __ITEMDB_H
23 
24 #include "defs.h"
25 #include "itemdef.h"
26 
27 #define DB_PROP_SZ	15 //number of materials!
28 #define ENH_DB_SZ	20 //number of special powers ("of Strength")
29 
30 struct _MAIN_ITEM_STRUCT
31 {
32 	ITEM_TYPE it;
33 	char * name;
34 	char view;
35 	char * dv;
36 	char * pv;
37 	char * hit;
38 	char * dice;
39 	char * z; //random z to dice;
40 	char * r;
41 	ITEM_SET iset;
42 	int value;
43 	int valume;
44 	int probability;
45 	char * breserved;
46 };
47 
48 
49 
50 struct ENHANCE_STRUCT
51 {
52 	char * name;
53 	int color; //if 0 don't change a color
54 	char * dv;
55 	char * pv;
56 	char * hit;
57 	char * dice;
58 	char * z; //random z to dice;
59 	char * rng;
60 	int val; // value
61 	ITEM_MASK im;
62 	BRAND_TYPE brt;
63 	CAN_FLAG res_flag;
64 	SPECIAL_PROPERTY spp;
65 	char * s; //stats
66 	char * r; //resists
67 };
68 
69 typedef _MAIN_ITEM_STRUCT XITEM_STRUCT[];
70 typedef XITEM_STRUCT * ITEM_STRUCT;
71 
72 extern _ITEMPROP item_prop[DB_PROP_SZ];
73 extern ENHANCE_STRUCT ienh_db[ENH_DB_SZ];
74 
75 
76 #endif
77