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

Function mon_has_arti

src/wizard.c:164–177  ·  view source on GitHub ↗

* If "otyp" is zero, it triggers a check for the quest_artifact, * since bell, book, candle, and amulet are all objects, not really * artifacts right now. [MRS] */

Source from the content-addressed store, hash-verified

162 * artifacts right now. [MRS]
163 */
164staticfn boolean
165mon_has_arti(struct monst *mtmp, short otyp)
166{
167 struct obj *otmp;
168
169 for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) {
170 if (otyp) {
171 if (otmp->otyp == otyp)
172 return 1;
173 } else if (any_quest_artifact(otmp))
174 return 1;
175 }
176 return 0;
177}
178
179/*
180 * Returns some monster other than mtmp that

Callers 2

other_mon_has_artiFunction · 0.85
target_onFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected