| 475 | } |
| 476 | |
| 477 | staticfn struct permonst * |
| 478 | morguemon(void) |
| 479 | { |
| 480 | int i = rn2(100), hd = rn2(level_difficulty()); |
| 481 | |
| 482 | if (hd > 10 && i < 10) { |
| 483 | if (Inhell || In_endgame(&u.uz)) { |
| 484 | return mkclass(S_DEMON, 0); |
| 485 | } else { |
| 486 | int ndemon_res = ndemon(A_NONE); |
| 487 | if (ndemon_res != NON_PM) |
| 488 | return &mons[ndemon_res]; |
| 489 | /* else do what? As is, it will drop to ghost/wraith/zombie */ |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | if (hd > 8 && i > 85) |
| 494 | return mkclass(S_VAMPIRE, 0); |
| 495 | |
| 496 | return ((i < 20) ? &mons[PM_GHOST] |
| 497 | : (i < 40) ? &mons[PM_WRAITH] |
| 498 | : mkclass(S_ZOMBIE, 0)); |
| 499 | } |
| 500 | |
| 501 | struct permonst * |
| 502 | antholemon(void) |