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.
This commit is contained in:
cohrs
2003-08-02 22:42:49 +00:00
parent 423ad806a3
commit ad5e58e0de
2 changed files with 28 additions and 13 deletions

View 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

View File

@@ -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");