]> granicus.if.org Git - nethack/commitdiff
More untrap message clean-up
authornethack.allison <nethack.allison>
Sat, 20 Jul 2002 02:07:09 +0000 (02:07 +0000)
committernethack.allison <nethack.allison>
Sat, 20 Jul 2002 02:07:09 +0000 (02:07 +0000)
src/trap.c

index 07b2b980413332c27683fc4d35f157d10c8846f1..ff82eee73c870e244e6367da73bfccef1bc8e56b 100644 (file)
@@ -3171,15 +3171,24 @@ boolean force;
                deal_with_floor_trap = TRUE;
                Strcpy(the_trap, the(defsyms[trap_to_defsym(ttmp->ttyp)].explanation));
                if (box_here) {
-                       Sprintf(qbuf, "There %s and %s here. %s %s?",
+                       if (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT) {
+                           You_cant("do much about %s%s.",
+                                       the_trap, u.utrap ?
+                                       " that you're stuck in" :
+                                       " while standing on the edge of it");
+                           trap_skipped = TRUE;
+                           deal_with_floor_trap = FALSE;
+                       } else {
+                           Sprintf(qbuf, "There %s and %s here. %s %s?",
                                (containercnt == 1) ? "is a container" : "are containers",
                                an(defsyms[trap_to_defsym(ttmp->ttyp)].explanation),
                                ttmp->ttyp == WEB ? "Remove" : "Disarm", the_trap);
-                       switch (ynq(qbuf)) {
-                         case 'q': return(0);
-                         case 'n': trap_skipped = TRUE;
-                                   deal_with_floor_trap = FALSE;
-                                   break;
+                           switch (ynq(qbuf)) {
+                               case 'q': return(0);
+                               case 'n': trap_skipped = TRUE;
+                                         deal_with_floor_trap = FALSE;
+                                         break;
+                           }
                        }
                }
                if (deal_with_floor_trap) {
@@ -3221,9 +3230,8 @@ boolean force;
        if(!u.dx && !u.dy) {
            for(otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
                if(Is_box(otmp)) {
-                   There("is %s here.", doname(otmp));
-
-                   switch (ynq("Check for traps?")) {
+                   Sprintf(qbuf, "There is %s here. Check it for traps?", doname(otmp));
+                   switch (ynq(qbuf)) {
                        case 'q': return(0);
                        case 'n': continue;
                    }