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

Function m_use_healing

src/muse.c:336–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 */
335
336staticfn boolean
337m_use_healing(struct monst *mtmp)
338{
339 struct obj *obj;
340
341 if ((obj = m_carrying(mtmp, POT_FULL_HEALING)) != 0) {
342 gm.m.defensive = obj;
343 gm.m.has_defense = MUSE_POT_FULL_HEALING;
344 return TRUE;
345 }
346 if ((obj = m_carrying(mtmp, POT_EXTRA_HEALING)) != 0) {
347 gm.m.defensive = obj;
348 gm.m.has_defense = MUSE_POT_EXTRA_HEALING;
349 return TRUE;
350 }
351 if ((obj = m_carrying(mtmp, POT_HEALING)) != 0) {
352 gm.m.defensive = obj;
353 gm.m.has_defense = MUSE_POT_HEALING;
354 return TRUE;
355 }
356 return FALSE;
357}
358
359/* return TRUE if monster mtmp can see at least one sleeping soldier */
360staticfn boolean

Callers 1

find_defensiveFunction · 0.85

Calls 1

m_carryingFunction · 0.85

Tested by

no test coverage detected