… | |
… | |
239 | treasurelist *tlist = find_treasurelist (RP->treasurestyle); |
239 | treasurelist *tlist = find_treasurelist (RP->treasurestyle); |
240 | |
240 | |
241 | if (tlist != NULL) |
241 | if (tlist != NULL) |
242 | for (ti = 0; ti < n_treasures; ti++) |
242 | for (ti = 0; ti < n_treasures; ti++) |
243 | { /* use the treasure list */ |
243 | { /* use the treasure list */ |
244 | object *new_treasure = pick_random_object (style_map); |
244 | object *new_treasure = style_map->pick_random_object (); |
245 | |
245 | |
246 | insert_ob_in_ob (arch_to_object (new_treasure->arch), the_chest); |
246 | insert_ob_in_ob (arch_to_object (new_treasure->arch), the_chest); |
247 | } |
247 | } |
248 | else |
248 | else |
249 | { /* use the style map */ |
249 | { /* use the style map */ |
… | |
… | |
264 | maptile *trap_map = find_style ("/styles/trapstyles", "traps", -1); |
264 | maptile *trap_map = find_style ("/styles/trapstyles", "traps", -1); |
265 | object *the_trap; |
265 | object *the_trap; |
266 | |
266 | |
267 | if (trap_map) |
267 | if (trap_map) |
268 | { |
268 | { |
269 | the_trap = pick_random_object (trap_map); |
269 | the_trap = trap_map->pick_random_object (); |
270 | the_trap->stats.Cha = 10 + RP->difficulty; |
270 | the_trap->stats.Cha = 10 + RP->difficulty; |
271 | the_trap->level = bc_random ((3 * RP->difficulty) / 2); |
271 | the_trap->level = bc_random ((3 * RP->difficulty) / 2); |
272 | if (the_trap) |
272 | if (the_trap) |
273 | { |
273 | { |
274 | object *new_trap; |
274 | object *new_trap; |