]> granicus.if.org Git - nethack/commitdiff
Additional obstruction messaging fixup
authornhmall <mjnh@persona.ca>
Sat, 14 Mar 2015 13:43:07 +0000 (09:43 -0400)
committernhmall <mjnh@persona.ca>
Sat, 14 Mar 2015 13:43:07 +0000 (09:43 -0400)
src/lock.c

index b57d9eb85efcf02c094d3b47840559c516de30e8..3de76fe669871545b9901c5aa8522a1f667d4371 100644 (file)
@@ -627,14 +627,21 @@ register int x, y;
 boolean quietly;
 {
        register struct monst *mtmp = m_at(x, y);
-       boolean is_worm_tail = ((mtmp->mx != x) || (mtmp->my != y));
 
        if(mtmp && mtmp->m_ap_type != M_AP_FURNITURE) {
                if (mtmp->m_ap_type == M_AP_OBJECT) goto objhere;
-               if (!quietly) pline("%s %s in the way!",
-                       is_worm_tail ? "Something" :
-                          !canspotmon(mtmp) ? "Some creature" : Monnam(mtmp),
-                       slithy(mtmp->data) ? "is situated" : "stands");
+               if (!quietly) {
+                   if ((mtmp->mx != x) || (mtmp->my != y)) {
+                       /* worm tail */
+                       pline("%s%s blocks the way!",
+                               !canspotmon(mtmp) ? Something :
+                                       s_suffix(Monnam(mtmp)),
+                               !canspotmon(mtmp) ? "" : " tail");
+                   } else {
+                       pline("%s blocks the way!",
+                          !canspotmon(mtmp) ? "Some creature" : Monnam(mtmp));
+                   }
+               }
                if (!canspotmon(mtmp))
                        map_invisible(x, y);
                return(TRUE);