randomizes the quantity given a trobj description */
| 1106 | |
| 1107 | /* randomizes the quantity given a trobj description */ |
| 1108 | staticfn long |
| 1109 | trquan(const struct trobj *trop) |
| 1110 | { |
| 1111 | if (!trop->trquan_min) |
| 1112 | return 1; |
| 1113 | return trop->trquan_min + rn2(trop->trquan_max - trop->trquan_min + 1); |
| 1114 | } |
| 1115 | |
| 1116 | /* create random object of certain class, filtering out too powerful items */ |
| 1117 | staticfn struct obj * |
no test coverage detected