Crossfire Server, Trunk  R20513
treasure.h
Go to the documentation of this file.
1 
6 #ifndef TREASURE_H
7 #define TREASURE_H
8 
10 #define CHANCE_FOR_ARTIFACT 20
11 
13 #define MAXMAGIC 4
14 
16 #define DIFFLEVELS 201
17 
19 #define MAX_SPELLITEM_LEVEL 110
20 
30 enum {
31  GT_ENVIRONMENT = 0x0001,
32  GT_INVISIBLE = 0x0002,
33  GT_STARTEQUIP = 0x0004,
34  GT_ONLY_GOOD = 0x0008,
35  GT_UPDATE_INV = 0x0010,
36  GT_MINIMAL = 0x0020
37 };
38 
51 typedef struct _change_arch {
52  const char *name;
53  const char *title;
54  const char *slaying;
55 } _change_arch;
56 
63 typedef struct treasurestruct {
64  struct archt *item;
65  const char *name;
66  struct treasurestruct *next;
69  struct _change_arch change_arch;
77 } treasure;
78 
82 typedef struct treasureliststruct {
83  const char *name;
91 } treasurelist;
92 
93 #endif /* TREASURE_H */
struct treasureliststruct treasurelist
treasureliststruct represents one logical group of items to be generated together.
treasureliststruct represents one logical group of items to be generated together.
Definition: treasure.h:82
const char * name
is != NULL, copy this over the original arch name
Definition: treasure.h:52
unsigned char uint8_t
Definition: win32.h:161
Unused?
Definition: treasure.h:32
struct treasureliststruct * next
Next treasure-item in linked list.
Definition: treasure.h:89
treasure is one element in a linked list, which together consist of a complete treasure-list.
Definition: treasure.h:63
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:465
struct archt * item
Which item this link can be.
Definition: treasure.h:64
Don't generate bad/cursed items.
Definition: treasure.h:34
int16_t total_chance
If non-zero, only 1 item on this list should be generated.
Definition: treasure.h:84
signed short int16_t
Definition: win32.h:160
const char * title
is != NULL, copy this over the original arch name
Definition: treasure.h:53
uint8_t magic
Max magic bonus to item If the entry is a list transition, 'magic' contains the difficulty required t...
Definition: treasure.h:71
struct _change_arch _change_arch
when a treasure got cloned from archlist, we want perhaps change some default values.
when a treasure got cloned from archlist, we want perhaps change some default values.
Definition: treasure.h:51
struct treasurestruct * next_no
If this item was not generated, then continue here.
Definition: treasure.h:68
uint16_t nrof
random 1 to nrof items are generated
Definition: treasure.h:76
struct treasurestruct * items
Items in this list, linked.
Definition: treasure.h:90
unsigned short uint16_t
Definition: win32.h:163
uint8_t chance
Percent chance for this item.
Definition: treasure.h:70
const char * name
Usually monster-name/combination.
Definition: treasure.h:83
When object has been generated, send its information to player.
Definition: treasure.h:35
struct treasurestruct * next_yes
If this item was generated, use this link instead of ->next.
Definition: treasure.h:67
struct treasurestruct treasure
treasure is one element in a linked list, which together consist of a complete treasure-list.
Generated items have the FLAG_STARTEQUIP.
Definition: treasure.h:33
const char * slaying
is != NULL, copy this over the original arch name
Definition: treasure.h:54
Do minimal adjustments, don't make artifacts, and so on.
Definition: treasure.h:36
struct treasurestruct * next
Next treasure-item in a linked list.
Definition: treasure.h:66
const char * name
If non null, name of list to use instead.
Definition: treasure.h:65