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

Function monhaskey

src/monmove.c:95–103  ·  view source on GitHub ↗

check whether a monster is carrying a locking/unlocking tool */

Source from the content-addressed store, hash-verified

93
94/* check whether a monster is carrying a locking/unlocking tool */
95boolean
96monhaskey(
97 struct monst *mon,
98 boolean for_unlocking) /* true => credit card ok, false => not ok */
99{
100 if (for_unlocking && m_carrying(mon, CREDIT_CARD))
101 return TRUE;
102 return m_carrying(mon, SKELETON_KEY) || m_carrying(mon, LOCK_PICK);
103}
104
105void
106mon_yells(struct monst *mon, const char *shout)

Callers 2

mon_allowflagsFunction · 0.85
m_moveFunction · 0.85

Calls 1

m_carryingFunction · 0.85

Tested by

no test coverage detected