randomize object descriptions */
| 319 | |
| 320 | /* randomize object descriptions */ |
| 321 | staticfn void |
| 322 | shuffle_all(void) |
| 323 | { |
| 324 | /* entire classes; obj_shuffle_range() handles their exceptions */ |
| 325 | static char shuffle_classes[] = { |
| 326 | AMULET_CLASS, POTION_CLASS, RING_CLASS, SCROLL_CLASS, |
| 327 | SPBOOK_CLASS, WAND_CLASS, VENOM_CLASS, |
| 328 | }; |
| 329 | /* sub-class type ranges (one item from each group) */ |
| 330 | static short shuffle_types[] = { |
| 331 | HELMET, LEATHER_GLOVES, CLOAK_OF_PROTECTION, SPEED_BOOTS, |
| 332 | }; |
| 333 | int first, last, idx; |
| 334 | |
| 335 | /* do whole classes (amulets, &c) */ |
| 336 | for (idx = 0; idx < SIZE(shuffle_classes); idx++) { |
| 337 | obj_shuffle_range(svb.bases[(int) shuffle_classes[idx]], |
| 338 | &first, &last); |
| 339 | shuffle(first, last, TRUE); |
| 340 | } |
| 341 | /* do type ranges (helms, &c) */ |
| 342 | for (idx = 0; idx < SIZE(shuffle_types); idx++) { |
| 343 | obj_shuffle_range(shuffle_types[idx], &first, &last); |
| 344 | shuffle(first, last, FALSE); |
| 345 | } |
| 346 | return; |
| 347 | } |
| 348 | |
| 349 | /* Return TRUE if the provided string matches the unidentified description of |
| 350 | * the provided object. */ |
no test coverage detected