Atrinik Server  4.0
treasure.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program 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 2 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, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef TREASURE_H
31 #define TREASURE_H
32 
34 #define CHANCE_FOR_ARTIFACT 20
35 
37 #define NUM_COINS 6
38 
42 #define DIFFLEVELS 201
43 
47 #define MAXMAGIC 4
48 
57 #define GT_ENVIRONMENT 0x0001
58 
59 #define GT_STARTEQUIP 0x0004
60 
61 #define GT_APPLY 0x0008
62 
63 #define GT_ONLY_GOOD 0x0010
64 
65 #define GT_UPDATE_INV 0x0020
66 
67 #define GT_NO_VALUE 0x0040
68 
75 typedef struct treasure_attrs {
77  shstr *name;
78 
80  shstr *title;
81 
83  shstr *slaying;
84 
86  int item_race;
87 
89  int material;
90 
93 
96 
98  int quality;
99 
103 
111 typedef struct treasure {
113  struct archetype *item;
114 
116  shstr *name;
117 
119  struct treasure *next;
120 
123 
125  struct treasure *next_no;
126 
128  treasure_affinity_t *affinity;
129 
132 
138 
150 
152  int magic;
153 
159 
161  uint16_t nrof;
162 
165  int16_t chance_fix;
166 
168  uint8_t chance;
169 
172 } treasure_t;
173 
175 typedef struct treasure_list {
177  shstr *name;
178 
180  treasure_affinity_t *affinity;
181 
184 
186  int16_t chance_fix;
187 
193  int16_t total_chance;
194 
197 
199  struct treasure *items;
201 
202 #endif
shstr * title
Definition: treasure.h:80
struct treasure * next_no
Definition: treasure.h:125
int difficulty
Definition: treasure.h:158
int material_range
Definition: treasure.h:95
int16_t total_chance
Definition: treasure.h:193
int16_t chance_fix
Definition: treasure.h:165
struct treasure * items
Definition: treasure.h:199
int magic_chance
Definition: treasure.h:131
shstr * slaying
Definition: treasure.h:83
int material_quality
Definition: treasure.h:92
struct treasure_list treasure_list_t
shstr * name
Definition: treasure.h:177
Definition: arch.h:40
int artifact_chance
Definition: treasure.h:149
int magic_fix
Definition: treasure.h:137
shstr * name
Definition: treasure.h:77
uint8_t chance
Definition: treasure.h:168
shstr * name
Definition: treasure.h:116
treasure_affinity_t * affinity
Definition: treasure.h:128
struct treasure_attrs attrs
Definition: treasure.h:171
int artifact_chance
Definition: treasure.h:183
struct treasure_attrs treasure_attrs_t
struct treasure * next_yes
Definition: treasure.h:122
struct treasure * next
Definition: treasure.h:119
struct treasure_list * next
Definition: treasure.h:196
treasure_affinity_t * affinity
Definition: treasure.h:180
uint16_t nrof
Definition: treasure.h:161
int magic
Definition: treasure.h:152
struct archetype * item
Definition: treasure.h:113
int16_t chance_fix
Definition: treasure.h:186
int quality_range
Definition: treasure.h:101
struct treasure treasure_t