]> granicus.if.org Git - nethack/commitdiff
cmdassist for grid bugs
authorcohrs <cohrs>
Sat, 2 Aug 2003 22:42:49 +0000 (22:42 +0000)
committercohrs <cohrs>
Sat, 2 Aug 2003 22:42:49 +0000 (22:42 +0000)
the cmdassist message shows all the valid directions even if you are
polymorphed into a grid bug.  I noticed this when I typed a diagonal
direction as a grid bug and got the dialog, telling me the key I just typed
was valid, but it wasn't.  Limit the keys to those valid for grid bugs.

doc/fixes34.2
src/cmd.c

index 2ae5ba3bbfc9769c2bcfd1dd8d1b5acc62c006fb..d608338063a7c59a97eb4035f2fc0dad34b08036 100644 (file)
@@ -116,6 +116,7 @@ add looting freehand() check to able_to_loot() to prevent opening container
        only to be told that you can't loot anything
 Schroedinger's Cat could be placed at wrong location when its box is carried
 travel while polymorphed into a grid bug should not move diagonally
+refine cmdassist handling for grid bugs
 
 
 Platform- and/or Interface-Specific Fixes
index 8240a57794b82fcc4629e54339c6a76573bfcc8b..6ffe9699bd81e945e5f2ac9281ab5f27c2d534ca 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -2113,20 +2113,34 @@ const char *msg;
                putstr(win, 0, "");
            }
        }
-       if (iflags.num_pad) {
-               putstr(win, 0, "Valid direction keys (with number_pad on) are:");
-               putstr(win, 0, "          7  8  9");
-               putstr(win, 0, "           \\ | / ");
-               putstr(win, 0, "          4- . -6");
-               putstr(win, 0, "           / | \\ ");
-               putstr(win, 0, "          1  2  3");
+       if (iflags.num_pad && u.umonnum == PM_GRID_BUG) {
+           putstr(win, 0, "Valid direction keys in your current form (with number_pad on) are:");
+           putstr(win, 0, "             8   ");
+           putstr(win, 0, "             |   ");
+           putstr(win, 0, "          4- . -6");
+           putstr(win, 0, "             |   ");
+           putstr(win, 0, "             2   ");
+       } else if (u.umonnum == PM_GRID_BUG) {
+           putstr(win, 0, "Valid direction keys in your current form are:");
+           putstr(win, 0, "             k   ");
+           putstr(win, 0, "             |   ");
+           putstr(win, 0, "          h- . -l");
+           putstr(win, 0, "             |   ");
+           putstr(win, 0, "             j   ");
+       } else if (iflags.num_pad) {
+           putstr(win, 0, "Valid direction keys (with number_pad on) are:");
+           putstr(win, 0, "          7  8  9");
+           putstr(win, 0, "           \\ | / ");
+           putstr(win, 0, "          4- . -6");
+           putstr(win, 0, "           / | \\ ");
+           putstr(win, 0, "          1  2  3");
        } else {
-               putstr(win, 0, "Valid direction keys are:");
-               putstr(win, 0, "          y  k  u");
-               putstr(win, 0, "           \\ | / ");
-               putstr(win, 0, "          h- . -l");
-               putstr(win, 0, "           / | \\ ");
-               putstr(win, 0, "          b  j  n");
+           putstr(win, 0, "Valid direction keys are:");
+           putstr(win, 0, "          y  k  u");
+           putstr(win, 0, "           \\ | / ");
+           putstr(win, 0, "          h- . -l");
+           putstr(win, 0, "           / | \\ ");
+           putstr(win, 0, "          b  j  n");
        };
        putstr(win, 0, "");
        putstr(win, 0, "          <  up");