* Choose randomly the state (nodoor, open, closed or locked) for a door */
| 1145 | * Choose randomly the state (nodoor, open, closed or locked) for a door |
| 1146 | */ |
| 1147 | staticfn int |
| 1148 | rnddoor(void) |
| 1149 | { |
| 1150 | static int state[] = { D_NODOOR, D_BROKEN, D_ISOPEN, D_CLOSED, D_LOCKED }; |
| 1151 | |
| 1152 | return ROLL_FROM(state); |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 | * Select a random trap |