… | |
… | |
48 | GT_ENVIRONMENT = 0x0001, // put treasure at objetc, not into object |
48 | GT_ENVIRONMENT = 0x0001, // put treasure at objetc, not into object |
49 | GT_INVISIBLE = 0x0002, |
49 | GT_INVISIBLE = 0x0002, |
50 | GT_STARTEQUIP = 0x0004, |
50 | GT_STARTEQUIP = 0x0004, |
51 | GT_APPLY = 0x0008, |
51 | GT_APPLY = 0x0008, |
52 | GT_ONLY_GOOD = 0x0010, |
52 | GT_ONLY_GOOD = 0x0010, |
53 | GT_UPDATE_INV = 0x0020, |
|
|
54 | GT_MINIMAL = 0x0040, // Do minimal adjustments |
53 | GT_MINIMAL = 0x0020, // Do minimal adjustments |
55 | }; |
54 | }; |
56 | |
55 | |
57 | /* when a treasure got cloned from archlist, we want perhaps change some default |
56 | /* when a treasure got cloned from archlist, we want perhaps change some default |
58 | * values. All values in this structure will override the default arch. |
57 | * values. All values in this structure will override the default arch. |
59 | * TODO: It is a bad way to implement this with a special structure. |
58 | * TODO: It is a bad way to implement this with a special structure. |
… | |
… | |
76 | * to get generated standard treasure when an archetype of that type |
75 | * to get generated standard treasure when an archetype of that type |
77 | * is generated (from a generator) |
76 | * is generated (from a generator) |
78 | */ |
77 | */ |
79 | struct treasure : zero_initialised |
78 | struct treasure : zero_initialised |
80 | { |
79 | { |
81 | struct archetype *item; /* Which item this link can be */ |
80 | arch_ptr item; /* Which item this link can be */ |
82 | shstr name; /* If non null, name of list to use |
81 | shstr name; /* If non null, name of list to use |
83 | instead */ |
82 | instead */ |
84 | treasure *next; /* Next treasure-item in a linked list */ |
83 | treasure *next; /* Next treasure-item in a linked list */ |
85 | treasure *next_yes; /* If this item was generated, use */ |
84 | treasure *next_yes; /* If this item was generated, use */ |
86 | /* this link instead of ->next */ |
85 | /* this link instead of ->next */ |
87 | treasure *next_no; /* If this item was not generated, */ |
86 | treasure *next_no; /* If this item was not generated, */ |
88 | /* then continue here */ |
87 | /* then continue here */ |
89 | struct _change_arch change_arch; /* override default arch values if set in treasure list */ |
88 | struct _change_arch change_arch; /* override default arch values if set in treasure list */ |
90 | uint16 chance; /* Percent chance for this item */ |
89 | uint16 chance; /* Percent chance for this item */ |
91 | /* If the entry is a list transition, |
90 | /* If the entry is a list transition, |
92 | * 'magic' contains the difficulty |
91 | * 'magic' contains the difficulty |
93 | * required to go to the new list |
92 | * required to go to the new list |
94 | */ |
93 | */ |
95 | uint16 nrof; /* random 1 to nrof items are generated */ |
94 | uint16 nrof; /* random 1 to nrof items are generated */ |
96 | uint8 magic; /* Max magic bonus to item */ |
95 | uint8 magic; /* Max magic bonus to item */ |
97 | |
96 | |
98 | treasure () |
97 | treasure () |
99 | : chance (100) |
98 | : chance (100) |
100 | { } |
99 | { } |
101 | }; |
100 | }; |