| 1523 | } |
| 1524 | |
| 1525 | boolean |
| 1526 | is_valid_travelpt(coordxy x, coordxy y) |
| 1527 | { |
| 1528 | int tx = u.tx; |
| 1529 | int ty = u.ty; |
| 1530 | boolean ret; |
| 1531 | int glyph = glyph_at(x,y); |
| 1532 | |
| 1533 | if (u_at(x, y)) |
| 1534 | return TRUE; |
| 1535 | if (isok(x,y) && glyph_is_cmap(glyph) && S_stone == glyph_to_cmap(glyph) |
| 1536 | && !levl[x][y].seenv) |
| 1537 | return FALSE; |
| 1538 | u.tx = x; |
| 1539 | u.ty = y; |
| 1540 | ret = findtravelpath(TRAVP_VALID); |
| 1541 | u.tx = tx; |
| 1542 | u.ty = ty; |
| 1543 | return ret; |
| 1544 | } |
| 1545 | |
| 1546 | /* try to escape being stuck in a trapped state by walking out of it; |
| 1547 | return true iff moving should continue to intended destination |
no test coverage detected