]> granicus.if.org Git - nethack/commitdiff
obscure polyself message
authorPatR <rankin@nethack.org>
Thu, 2 Jun 2016 01:45:52 +0000 (18:45 -0700)
committerPatR <rankin@nethack.org>
Thu, 2 Jun 2016 01:45:52 +0000 (18:45 -0700)
Hero was poly'd into a hider monster and was swallowed by something.
Attempting to hide via '#monster' gave "You can't hide while you're
being held."  It correctly blocked hiding due to u.ustuck but the
feedback ignored the possibility of u.ustuck+u.uswallow.

doc/fixes36.1
src/polyself.c

index 26967c078a6c5796346c1051c1e99e47f0cd5d97..8cfd5880ae303cf4250a14aea3f752172379c19b 100644 (file)
@@ -278,6 +278,8 @@ describe detected door traps and chest traps as trapped door and trapped chest
        instead of bear trap; bear trap tile is still used on map though
 thrown potion that killed peaceful monster would cause "the <mon> gets argry"
        after the message about it being killed
+when poly'd into a hider and engulfed, attempt to hide via #monster was blocked
+       but feedback said "can't hide while held" rather than "while engulfed"
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index b67cc133ad2c59dba52c7dcbab03bc30e5314174..d4c2afdf1cd6d906286b1d2951868066b5baf58a 100644 (file)
@@ -1399,11 +1399,12 @@ dohide()
        (except for floor hiders [trapper or mimic] in pits) */
     if (u.ustuck || (u.utrap && (u.utraptype != TT_PIT || on_ceiling))) {
         You_cant("hide while you're %s.",
-                 !u.ustuck ? "trapped" : !sticks(youmonst.data)
-                                             ? "being held"
-                                             : humanoid(u.ustuck->data)
-                                                   ? "holding someone"
-                                                   : "holding that creature");
+                 !u.ustuck ? "trapped"
+                   : u.uswallow ? (is_animal(u.ustuck->data) ? "swallowed"
+                                                             : "engulfed")
+                     : !sticks(youmonst.data) ? "being held"
+                       : (humanoid(u.ustuck->data) ? "holding someone"
+                                                   : "holding that creature"));
         if (u.uundetected
             || (ismimic && youmonst.m_ap_type != M_AP_NOTHING)) {
             u.uundetected = 0;