1 | /* |
1 | /* |
2 | * static char *rcsid_treasure_h = |
2 | * static char *rcsid_treasure_h = |
3 | * "$Id: treasure.h,v 1.3 2006/08/31 17:54:14 root Exp $"; |
3 | * "$Id: treasure.h,v 1.4 2006/09/03 00:18:41 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
82 | * complete treasure-list. Any arch can point to a treasure-list |
82 | * complete treasure-list. Any arch can point to a treasure-list |
83 | * to get generated standard treasure when an archetype of that type |
83 | * to get generated standard treasure when an archetype of that type |
84 | * is generated (from a generator) |
84 | * is generated (from a generator) |
85 | */ |
85 | */ |
86 | |
86 | |
87 | typedef struct treasurestruct { |
87 | typedef struct treasurestruct : zero_initialised |
|
|
88 | { |
88 | struct archt *item; /* Which item this link can be */ |
89 | struct archt *item; /* Which item this link can be */ |
89 | shstr name; /* If non null, name of list to use |
90 | shstr name; /* If non null, name of list to use |
90 | instead */ |
91 | instead */ |
91 | struct treasurestruct *next; /* Next treasure-item in a linked list */ |
92 | struct treasurestruct *next; /* Next treasure-item in a linked list */ |
92 | struct treasurestruct *next_yes; /* If this item was generated, use */ |
93 | struct treasurestruct *next_yes; /* If this item was generated, use */ |
… | |
… | |
102 | */ |
103 | */ |
103 | uint16 nrof; /* random 1 to nrof items are generated */ |
104 | uint16 nrof; /* random 1 to nrof items are generated */ |
104 | } treasure; |
105 | } treasure; |
105 | |
106 | |
106 | |
107 | |
107 | typedef struct treasureliststruct { |
108 | typedef struct treasureliststruct : zero_initialised |
|
|
109 | { |
108 | shstr name; /* Usually monster-name/combination */ |
110 | shstr name; /* Usually monster-name/combination */ |
109 | sint16 total_chance; /* If non-zero, only 1 item on this |
111 | sint16 total_chance; /* If non-zero, only 1 item on this |
110 | * list should be generated. The |
112 | * list should be generated. The |
111 | * total_chance contains the sum of |
113 | * total_chance contains the sum of |
112 | * the chance for this list. |
114 | * the chance for this list. |