From: cohrs Date: Sat, 2 Aug 2003 22:42:49 +0000 (+0000) Subject: cmdassist for grid bugs X-Git-Tag: MOVE2GIT~1869 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad5e58e0dee67eab3a9ff2977ad433ef201b1b52;p=nethack cmdassist for grid bugs 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. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 2ae5ba3bb..d60833806 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/cmd.c b/src/cmd.c index 8240a5779..6ffe9699b 100644 --- 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");