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

Function holds_up_web

src/monmove.c:1226–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1224}
1225
1226staticfn boolean
1227holds_up_web(coordxy x, coordxy y)
1228{
1229 stairway *sway;
1230
1231 if (!isok(x, y)
1232 || IS_OBSTRUCTED(levl[x][y].typ)
1233 || ((levl[x][y].typ == STAIRS || levl[x][y].typ == LADDER)
1234 && (sway = stairway_at(x, y)) != 0 && sway->up)
1235 || levl[x][y].typ == IRONBARS)
1236 return TRUE;
1237
1238 return FALSE;
1239}
1240
1241/* returns the number of walls in the four cardinal directions that could
1242 hold up a web */

Callers 1

count_webbing_wallsFunction · 0.85

Calls 2

isokFunction · 0.85
stairway_atFunction · 0.85

Tested by

no test coverage detected