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

Function can_center_spell_location

src/spell.c:1618–1624  ·  view source on GitHub ↗

not quite the same as throwspell limits, but close enough */

Source from the content-addressed store, hash-verified

1616
1617/* not quite the same as throwspell limits, but close enough */
1618staticfn boolean
1619can_center_spell_location(coordxy x, coordxy y)
1620{
1621 if (distmin(u.ux, u.uy, x, y) > 10)
1622 return FALSE;
1623 return (isok(x, y) && cansee(x, y) && !(IS_STWALL(levl[x][y].typ)));
1624}
1625
1626staticfn void
1627display_spell_target_positions(boolean on_off)

Callers 1

Calls 2

distminFunction · 0.85
isokFunction · 0.85

Tested by

no test coverage detected