diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 615b450ac..72ac336ce 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -446,6 +446,7 @@ make '[' command more precise when poly'd hero has embedded dragon scales/mail fainting while wielding a cockatrice corpse will be fatal Sunsword's light radius depends on its curse/bless state Add M-C and M-R meta-key shortcuts for #conduct and #ride, respectively +can now use ESC to cancel out of prompts for playing musical instruments Platform- and/or Interface-Specific New Features diff --git a/src/music.c b/src/music.c index 797bf03e3..cb6f58d56 100644 --- a/src/music.c +++ b/src/music.c @@ -1,5 +1,4 @@ /* NetHack 3.5 music.c $Date$ $Revision$ */ -/* SCCS Id: @(#)music.c 3.5 2007/07/08 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -563,14 +562,20 @@ struct obj *instr; return(0); } if (instr->otyp != LEATHER_DRUM && instr->otyp != DRUM_OF_EARTHQUAKE) { - c = yn("Improvise?"); + c = ynq("Improvise?"); + if (c == 'q') goto nevermind; } if (c == 'n') { - if (u.uevent.uheard_tune == 2 && yn("Play the passtune?") == 'y') { + if (u.uevent.uheard_tune == 2) c = ynq("Play the passtune?"); + if (c == 'q') { + goto nevermind; + } else if (c == 'y') { Strcpy(buf, tune); } else { getlin("What tune are you playing? [5 notes, A-G]", buf); (void)mungspaces(buf); + if (*buf == '\033') goto nevermind; + /* convert to uppercase and change any "H" to the expected "B" */ for (s = buf; *s; s++) { #ifndef AMIGA @@ -684,6 +689,10 @@ struct obj *instr; return 1; } else return do_improvisation(instr); + + nevermind: + pline(Never_mind); + return 0; } #ifdef UNIX386MUSIC