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

Function valid_cloud_pos

src/read.c:1068–1074  ·  view source on GitHub ↗

Can a stinking cloud physically exist at a certain position? * NOT the same thing as can_center_cloud. */

Source from the content-addressed store, hash-verified

1066 * NOT the same thing as can_center_cloud.
1067 */
1068boolean
1069valid_cloud_pos(coordxy x, coordxy y)
1070{
1071 if (!isok(x,y))
1072 return FALSE;
1073 return ACCESSIBLE(levl[x][y].typ) || is_pool(x, y) || is_lava(x, y);
1074}
1075
1076/* Callback for getpos_sethilite, also used in determining whether a scroll
1077 * should have its regular effects, or not because it was out of range.

Callers 2

create_gas_cloudFunction · 0.85
can_center_cloudFunction · 0.85

Calls 3

isokFunction · 0.85
is_poolFunction · 0.85
is_lavaFunction · 0.85

Tested by

no test coverage detected