]> granicus.if.org Git - nethack/commitdiff
Untrap tip
authorPasi Kallinen <paxed@alt.org>
Sat, 4 Mar 2023 09:02:06 +0000 (11:02 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 4 Mar 2023 09:02:06 +0000 (11:02 +0200)
include/context.h
include/patchlevel.h
src/hack.c

index 662165dda86becbb7e09e0b4fa21fd79eb48ebbf..382a607aaedce0cd632c470f70a66805187c2699 100644 (file)
@@ -14,6 +14,7 @@
 enum nh_tips {
     TIP_ENHANCE = 0, /* #enhance */
     TIP_SWIM,        /* walking into water */
+    TIP_UNTRAP_MON,  /* walking into trapped peaceful */
     TIP_GETPOS,      /* getpos/farlook */
 
     NUM_TIPS
index 05d9cc8dd565dee8d2f87027eb37f78f828c1bf4..b2635426d6b1af09fefc94804ddc644df7975f14 100644 (file)
@@ -17,7 +17,7 @@
  * Incrementing EDITLEVEL can be used to force invalidation of old bones
  * and save files.
  */
-#define EDITLEVEL 76
+#define EDITLEVEL 77
 
 /*
  * Development status possibilities.
index 60cf2fc72b4c41c04bf2bb0b13d60d8ff51824f6..f96a4142494a96dc6b1a3ab6fa0c0794263c2346 100644 (file)
@@ -1658,6 +1658,9 @@ handle_tip(int tip)
             pline("(Use '%s' prefix to step in if you really want to.)",
                   visctrl(cmd_from_func(do_reqmenu)));
             break;
+        case TIP_UNTRAP_MON:
+            pline("(Perhaps #untrap would help?)");
+            break;
         case TIP_GETPOS:
             l_nhcore_call(NHCORE_GETPOS_TIP);
             break;
@@ -1871,6 +1874,7 @@ domove_swap_with_pet(struct monst *mtmp, coordxy x, coordxy y)
         /* all mtame are also mpeaceful, so this affects pets too */
         You("stop.  %s can't move out of that trap.",
             upstart(y_monnam(mtmp)));
+        handle_tip(TIP_UNTRAP_MON);
         didnt_move = TRUE;
     } else if (mtmp->mpeaceful
                && (!goodpos(u.ux0, u.uy0, mtmp, 0)