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

Function In_W_tower

src/dungeon.c:1922–1938  ·  view source on GitHub ↗

is of `lev' inside the Wizard's tower? */

Source from the content-addressed store, hash-verified

1920
1921/* is <x,y> of `lev' inside the Wizard's tower? */
1922boolean
1923In_W_tower(coordxy x, coordxy y, d_level *lev)
1924{
1925 if (!On_W_tower_level(lev))
1926 return FALSE;
1927 if (!svd.dndest.nlx) {
1928 impossible("No boundary for Wizard's Tower?");
1929 return FALSE;
1930 }
1931 /*
1932 * Both of the exclusion regions for arriving via level teleport
1933 * (from above or below) define the tower's boundary.
1934 * assert( svu.updest.nIJ == svd.dndest.nIJ for I={l|h},J={x|y} );
1935 */
1936 return (boolean) within_bounded_area(x, y, svd.dndest.nlx, svd.dndest.nly,
1937 svd.dndest.nhx, svd.dndest.nhy);
1938}
1939
1940/* are you in one of the Hell levels? */
1941boolean

Callers 12

rlocFunction · 0.85
goto_levelFunction · 0.85
tacticsFunction · 0.85
has_aggravatablesFunction · 0.85
aggravateFunction · 0.85
wiz_makemapFunction · 0.85
Can_rise_upFunction · 0.85
level_difficultyFunction · 0.85
migrate_to_levelFunction · 0.85
mm_2way_aggressionFunction · 0.85
lspo_reset_levelFunction · 0.85
lspo_finalize_levelFunction · 0.85

Calls 2

On_W_tower_levelFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected