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

Function m_carrying

src/mthrowu.c:1404–1414  ·  view source on GitHub ↗

check if a monster is carrying an item of a particular type */

Source from the content-addressed store, hash-verified

1402
1403/* check if a monster is carrying an item of a particular type */
1404struct obj *
1405m_carrying(struct monst *mtmp, int type)
1406{
1407 struct obj *otmp;
1408
1409 for (otmp = (mtmp == &gy.youmonst) ? gi.invent : mtmp->minvent; otmp;
1410 otmp = otmp->nobj)
1411 if (otmp->otyp == type)
1412 break;
1413 return otmp;
1414}
1415
1416void
1417hit_bars(

Callers 13

savebonesFunction · 0.85
m_is_steadfastFunction · 0.85
select_rwepFunction · 0.85
mon_wield_itemFunction · 0.85
gd_letknowFunction · 0.85
sanity_check_single_monFunction · 0.85
mfndposFunction · 0.85
xkilledFunction · 0.85
burnarmorFunction · 0.85
monhaskeyFunction · 0.85
m_use_healingFunction · 0.85
find_defensiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected