From 36f2dedeb6afebe76e249ed4ac55e4bc2b1df1d3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 25 Aug 2022 18:10:47 +0300 Subject: [PATCH] Adjust couple therecmdmenu entries - Don't show attacking a peaceful or tame monster, as that is actually swapping places with them - so add that. - Don't show naming a hostile monster - it's usually not wanted, and this way when clicking a hostile monster, the only entry is the attack, so will be executed automatically. This makes it much more usable. --- src/cmd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index b0c9f085d..6ed005a71 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -5541,15 +5541,18 @@ there_cmd_menu_next2u( if (mtmp && (mtmp->mpeaceful || mtmp->mtame)) { Sprintf(buf, "Talk to %s", mon_nam(mtmp)); mcmd_addmenu(win, MCMD_TALK, buf), ++K; - } - if (mtmp) { + + Sprintf(buf, "Swap places with %s", mon_nam(mtmp)); + mcmd_addmenu(win, MCMD_MOVE_DIR, buf), ++K; + Sprintf(buf, "%s %s", !has_mgivenname(mtmp) ? "Name" : "Rename", mon_nam(mtmp)); mcmd_addmenu(win, MCMD_NAME, buf), ++K; } - if (mtmp || glyph_is_invisible(glyph_at(x, y))) { + if ((mtmp && !(mtmp->mpeaceful || mtmp->mtame)) + || glyph_is_invisible(glyph_at(x, y))) { Sprintf(buf, "Attack %s", mtmp ? mon_nam(mtmp) : "unseen creature"); mcmd_addmenu(win, MCMD_ATTACK_NEXT2U, buf), ++K; /* attacking overrides any other automatic action */