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

Function bad_rock

src/hack.c:938–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

936}
937
938boolean
939bad_rock(struct permonst *mdat, coordxy x, coordxy y)
940{
941 return (boolean) ((Sokoban && sobj_at(BOULDER, x, y))
942 || (IS_OBSTRUCTED(levl[x][y].typ)
943 && (!tunnels(mdat) || needspick(mdat)
944 || !may_dig(x, y))
945 && !(passes_walls(mdat) && may_passwall(x, y))));
946}
947
948/* caller has already decided that it's a tight diagonal; check whether a
949 monster--who might be the hero--can fit through, and if not then return

Callers 8

test_moveFunction · 0.85
domove_attackmon_atFunction · 0.85
domove_swap_with_petFunction · 0.85
impaired_movementFunction · 0.85
crawl_destinationFunction · 0.85
hurtle_stepFunction · 0.85
mfndposFunction · 0.85
try_disarmFunction · 0.85

Calls 3

sobj_atFunction · 0.85
may_digFunction · 0.85
may_passwallFunction · 0.85

Tested by 1

test_moveFunction · 0.68