MCPcopy Create free account
hub / github.com/NetHack/NetHack / dlord

Function dlord

src/minion.c:404–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404int
405dlord(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 */
419int

Callers 3

sacrifice_your_raceFunction · 0.85
msummonFunction · 0.85
dprinceFunction · 0.85

Calls 2

sgnFunction · 0.85
ndemonFunction · 0.85

Tested by

no test coverage detected