| 1932 | } |
| 1933 | |
| 1934 | void |
| 1935 | find_trap(struct trap *trap) |
| 1936 | { |
| 1937 | boolean cleared = FALSE; |
| 1938 | |
| 1939 | trap->tseen = 1; |
| 1940 | exercise(A_WIS, TRUE); |
| 1941 | feel_newsym(trap->tx, trap->ty); |
| 1942 | |
| 1943 | /* The "Hallucination ||" is to preserve 3.6.1 behavior, but this |
| 1944 | behavior might need a rework in the hallucination case |
| 1945 | (e.g. to not prompt if any trap glyph appears on the square). */ |
| 1946 | if (Hallucination || |
| 1947 | levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) { |
| 1948 | /* There's too much clutter to see your find otherwise */ |
| 1949 | cls(); |
| 1950 | map_trap(trap, 1); |
| 1951 | display_self(); |
| 1952 | cleared = TRUE; |
| 1953 | } |
| 1954 | |
| 1955 | set_msg_xy(trap->tx, trap->ty); |
| 1956 | You("find %s.", an(trapname(trap->ttyp, FALSE))); |
| 1957 | |
| 1958 | if (cleared) { |
| 1959 | display_nhwindow(WIN_MAP, TRUE); /* wait */ |
| 1960 | docrt(); |
| 1961 | } |
| 1962 | } |
| 1963 | |
| 1964 | staticfn int |
| 1965 | mfind0(struct monst *mtmp, boolean via_warning) |
no test coverage detected