Return the number of turns after which a Rider corpse revives */
| 1368 | |
| 1369 | /* Return the number of turns after which a Rider corpse revives */ |
| 1370 | long |
| 1371 | rider_revival_time(struct obj *body, boolean retry) |
| 1372 | { |
| 1373 | long when; |
| 1374 | long minturn = retry ? 3L : (body->corpsenm == PM_DEATH) ? 6L : 12L; |
| 1375 | |
| 1376 | /* Riders have a 1/3 chance per turn of reviving after 12, 6, or 3 turns. |
| 1377 | Always revive by 67. */ |
| 1378 | for (when = minturn; when < 67L; when++) |
| 1379 | if (!rn2(3)) |
| 1380 | break; |
| 1381 | return when; |
| 1382 | } |
| 1383 | |
| 1384 | /* |
| 1385 | * Start a corpse decay or revive timer. |
no test coverage detected