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

Function get_valid_polearm_position

src/apply.c:3320–3331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3318}
3319
3320staticfn boolean
3321get_valid_polearm_position(coordxy x, coordxy y)
3322{
3323 int glyph;
3324
3325 glyph = glyph_at(x, y);
3326
3327 return (isok(x, y) && distu(x, y) >= gp.polearm_range_min
3328 && distu(x, y) <= gp.polearm_range_max
3329 && (cansee(x, y) || (couldsee(x, y)
3330 && glyph_is_poleable(glyph))));
3331}
3332
3333staticfn void
3334display_polearm_positions(boolean on_off)

Callers 2

find_poleable_monFunction · 0.85

Calls 2

glyph_atFunction · 0.85
isokFunction · 0.85

Tested by

no test coverage detected