summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-15 09:39:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-15 09:39:09 +0000
commit6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8 (patch)
tree1291287ce0c9443d6911c4ecd0ec2d3b8ebd77ae /crawl-ref/source/stuff.cc
parent66740a30c6be993c636285d8351ad0f50c1a8ec7 (diff)
downloadcrawl-ref-6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8.tar.gz
crawl-ref-6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8.zip
Add a tutorial hint for encountering an invisible monster and offer a
different healing message if you recently met an invisible monster, as suggested in FR 1964267. Killing an invisible monster does not yet reset the counter, though I guess it should. Also, disallow randart weapons to be named after Sif Muna. (Vehumet, too, maybe?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5052 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r--crawl-ref/source/stuff.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index fb9ea9b870..92c46482ac 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -992,7 +992,7 @@ static const char* _list_allowed_keys(char yes1, char yes2,
// like yesno(), but returns 0 for no, 1 for yes, and -1 for quit
// alt_yes and alt_yes2 allow up to two synonyms for 'Y'
-int yesnoquit( const char* str, bool safe, int safeanswer,
+int yesnoquit( const char* str, bool safe, int safeanswer, bool allow_all,
bool clear_after, char alt_yes, char alt_yes2 )
{
if (!crawl_state.is_repeating_cmd())
@@ -1008,7 +1008,7 @@ int yesnoquit( const char* str, bool safe, int safeanswer,
int tmp = getchm(KC_CONFIRM);
- if ( tmp == CK_ESCAPE || tmp == 'q' || tmp == 'Q' )
+ if (tmp == CK_ESCAPE || tmp == 'q' || tmp == 'Q')
return -1;
if ((tmp == ' ' || tmp == '\r' || tmp == '\n') && safeanswer)
@@ -1016,7 +1016,7 @@ int yesnoquit( const char* str, bool safe, int safeanswer,
if (Options.easy_confirm == CONFIRM_ALL_EASY
|| tmp == safeanswer
- || (Options.easy_confirm == CONFIRM_SAFE_EASY && safe))
+ || safe && Options.easy_confirm == CONFIRM_SAFE_EASY)
{
tmp = toupper( tmp );
}
@@ -1026,8 +1026,16 @@ int yesnoquit( const char* str, bool safe, int safeanswer,
if (tmp == 'N')
return 0;
- else if (tmp == 'Y' || tmp == alt_yes)
+ else if (tmp == 'Y' || tmp == alt_yes || tmp == alt_yes2)
return 1;
+ else if (allow_all)
+ {
+ if (tmp == 'A')
+ return 2;
+ else
+ mprf("Choose [Y]es%s, [N]o, [Q]uit, or [A]ll!",
+ _list_alternative_yes(alt_yes, alt_yes2, false, true).c_str());
+ }
else
{
mprf("[Y]es%s, [N]o or [Q]uit only, please.",