… | |
… | |
86 | treasure *next_yes; /* If this item was generated, use */ |
86 | treasure *next_yes; /* If this item was generated, use */ |
87 | /* this link instead of ->next */ |
87 | /* this link instead of ->next */ |
88 | treasure *next_no; /* If this item was not generated, */ |
88 | treasure *next_no; /* If this item was not generated, */ |
89 | /* then continue here */ |
89 | /* then continue here */ |
90 | struct _change_arch change_arch; /* override default arch values if set in treasure list */ |
90 | struct _change_arch change_arch; /* override default arch values if set in treasure list */ |
91 | uint8 chance; /* Percent chance for this item */ |
91 | uint16 chance; /* Percent chance for this item */ |
92 | uint8 magic; /* Max magic bonus to item */ |
|
|
93 | /* If the entry is a list transition, |
92 | /* If the entry is a list transition, |
94 | * 'magic' contains the difficulty |
93 | * 'magic' contains the difficulty |
95 | * required to go to the new list |
94 | * required to go to the new list |
96 | */ |
95 | */ |
97 | uint16 nrof; /* random 1 to nrof items are generated */ |
96 | uint16 nrof; /* random 1 to nrof items are generated */ |
|
|
97 | uint8 magic; /* Max magic bonus to item */ |
98 | |
98 | |
99 | treasure () |
99 | treasure () |
100 | : chance (100) |
100 | : chance (100) |
101 | { } |
101 | { } |
102 | }; |
102 | }; |
… | |
… | |
110 | * the chance for this list. |
110 | * the chance for this list. |
111 | */ |
111 | */ |
112 | treasurelist *next; /* Next treasure-item in linked list */ |
112 | treasurelist *next; /* Next treasure-item in linked list */ |
113 | treasure *items; /* Items in this list, linked */ |
113 | treasure *items; /* Items in this list, linked */ |
114 | |
114 | |
|
|
115 | void create (object *op, int flag, int difficulty); |
|
|
116 | |
115 | static treasurelist *read (object_thawer &f); |
117 | static treasurelist *read (object_thawer &f); |
116 | static treasurelist *get (const char *name); // find or create |
118 | static treasurelist *get (const char *name); // find or create |
117 | static treasurelist *find (const char *name); |
119 | static treasurelist *find (const char *name); |
118 | }; |
120 | }; |
119 | |
121 | |