* worm_nomove() * * Check for mon->wormno before calling this function! * * The worm doesn't move, so it should shrink. */
| 285 | * The worm doesn't move, so it should shrink. |
| 286 | */ |
| 287 | void |
| 288 | worm_nomove(struct monst *worm) |
| 289 | { |
| 290 | shrink_worm((int) worm->wormno); /* shrink */ |
| 291 | |
| 292 | if (worm->mhp > count_wsegs(worm)) { |
| 293 | worm->mhp -= d(2, 2); /* 2..4, average 3; note: mhpmax not changed! */ |
| 294 | if (worm->mhp < 1) |
| 295 | worm->mhp = 1; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | /* |
| 300 | * wormgone() |
no test coverage detected