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

Function clearpriests

src/priest.c:918–929  ·  view source on GitHub ↗

* When saving bones, find priests that aren't on their shrine level, * and remove them. This avoids big problems when restoring bones. * [Perhaps we should convert them into roamers instead?] */

Source from the content-addressed store, hash-verified

916 * [Perhaps we should convert them into roamers instead?]
917 */
918void
919clearpriests(void)
920{
921 struct monst *mtmp;
922
923 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
924 if (DEADMONSTER(mtmp))
925 continue;
926 if (mtmp->ispriest && !on_level(&(EPRI(mtmp)->shrlevel), &u.uz))
927 mongone(mtmp);
928 }
929}
930
931/* munge priest-specific structure when restoring -dlc */
932void

Callers 1

really_doneFunction · 0.85

Calls 2

on_levelFunction · 0.85
mongoneFunction · 0.85

Tested by

no test coverage detected