| 923 | } |
| 924 | |
| 925 | staticfn boolean |
| 926 | obstructed(coordxy x, coordxy y, boolean quietly) |
| 927 | { |
| 928 | struct monst *mtmp = m_at(x, y); |
| 929 | |
| 930 | if (mtmp && M_AP_TYPE(mtmp) != M_AP_FURNITURE) { |
| 931 | if (M_AP_TYPE(mtmp) == M_AP_OBJECT) |
| 932 | goto objhere; |
| 933 | if (!quietly) { |
| 934 | char *Mn = Some_Monnam(mtmp); /* Monnam, Someone or Something */ |
| 935 | |
| 936 | if ((mtmp->mx != x || mtmp->my != y) && canspotmon(mtmp)) |
| 937 | /* s_suffix() returns a modifiable buffer */ |
| 938 | Mn = strcat(s_suffix(Mn), " tail"); |
| 939 | |
| 940 | pline("%s blocks the way!", Mn); |
| 941 | } |
| 942 | if (!canspotmon(mtmp)) |
| 943 | map_invisible(x, y); |
| 944 | return TRUE; |
| 945 | } |
| 946 | if (OBJ_AT(x, y)) { |
| 947 | objhere: |
| 948 | if (!quietly) |
| 949 | pline("%s's in the way.", Something); |
| 950 | return TRUE; |
| 951 | } |
| 952 | return FALSE; |
| 953 | } |
| 954 | |
| 955 | /* the #close command - try to close a door */ |
| 956 | int |
no test coverage detected