| 402 | } |
| 403 | |
| 404 | int |
| 405 | dlord(aligntyp atyp) |
| 406 | { |
| 407 | int tryct, pm; |
| 408 | |
| 409 | for (tryct = !In_endgame(&u.uz) ? 20 : 0; tryct > 0; --tryct) { |
| 410 | pm = rn1(PM_YEENOGHU + 1 - PM_JUIBLEX, PM_JUIBLEX); |
| 411 | if (!(svm.mvitals[pm].mvflags & G_GONE) |
| 412 | && (atyp == A_NONE || sgn(mons[pm].maligntyp) == sgn(atyp))) |
| 413 | return pm; |
| 414 | } |
| 415 | return ndemon(atyp); /* approximate */ |
| 416 | } |
| 417 | |
| 418 | /* create lawful (good) lord */ |
| 419 | int |
no test coverage detected