Untrap tip

This commit is contained in:
Pasi Kallinen
2023-03-04 11:02:06 +02:00
parent e85c7ff94f
commit 10df388245
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -14,6 +14,7 @@
enum nh_tips { enum nh_tips {
TIP_ENHANCE = 0, /* #enhance */ TIP_ENHANCE = 0, /* #enhance */
TIP_SWIM, /* walking into water */ TIP_SWIM, /* walking into water */
TIP_UNTRAP_MON, /* walking into trapped peaceful */
TIP_GETPOS, /* getpos/farlook */ TIP_GETPOS, /* getpos/farlook */
NUM_TIPS NUM_TIPS
+1 -1
View File
@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones * Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files. * and save files.
*/ */
#define EDITLEVEL 76 #define EDITLEVEL 77
/* /*
* Development status possibilities. * Development status possibilities.
+4
View File
@@ -1658,6 +1658,9 @@ handle_tip(int tip)
pline("(Use '%s' prefix to step in if you really want to.)", pline("(Use '%s' prefix to step in if you really want to.)",
visctrl(cmd_from_func(do_reqmenu))); visctrl(cmd_from_func(do_reqmenu)));
break; break;
case TIP_UNTRAP_MON:
pline("(Perhaps #untrap would help?)");
break;
case TIP_GETPOS: case TIP_GETPOS:
l_nhcore_call(NHCORE_GETPOS_TIP); l_nhcore_call(NHCORE_GETPOS_TIP);
break; 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 */ /* all mtame are also mpeaceful, so this affects pets too */
You("stop. %s can't move out of that trap.", You("stop. %s can't move out of that trap.",
upstart(y_monnam(mtmp))); upstart(y_monnam(mtmp)));
handle_tip(TIP_UNTRAP_MON);
didnt_move = TRUE; didnt_move = TRUE;
} else if (mtmp->mpeaceful } else if (mtmp->mpeaceful
&& (!goodpos(u.ux0, u.uy0, mtmp, 0) && (!goodpos(u.ux0, u.uy0, mtmp, 0)