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

Function passes_bars

src/mondata.c:553–563  ·  view source on GitHub ↗

True iff the type of monster pass through iron bars */

Source from the content-addressed store, hash-verified

551
552/* True iff the type of monster pass through iron bars */
553boolean
554passes_bars(struct permonst *mptr)
555{
556 return (boolean) (passes_walls(mptr) || amorphous(mptr) || unsolid(mptr)
557 || is_whirly(mptr) || verysmall(mptr)
558 /* rust monsters and some puddings can destroy bars */
559 || dmgtype(mptr, AD_RUST) || dmgtype(mptr, AD_CORR)
560 /* rock moles can eat bars */
561 || metallivorous(mptr)
562 || (slithy(mptr) && !bigmonst(mptr)));
563}
564
565/* returns True if monster can blow (whistle, etc) */
566boolean

Callers 2

test_moveFunction · 0.85
mon_allowflagsFunction · 0.85

Calls 1

dmgtypeFunction · 0.85

Tested by 1

test_moveFunction · 0.68