diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-27 21:39:14 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-27 21:39:14 -0700 |
commit | c1121941e73d563492e917b3778721d41997fd6c (patch) | |
tree | 9451a893596f4f17d3931d3bca02ce9b3fd1d1d3 /crawl-ref/source/acr.cc | |
parent | 12f74fc875b1de8089676ee8e78461f75dce6b00 (diff) | |
download | crawl-ref-c1121941e73d563492e917b3778721d41997fd6c.tar.gz crawl-ref-c1121941e73d563492e917b3778721d41997fd6c.zip |
acr.c: Prompt to open excluded doors
If an exclusion is placed right on top of a door, prompt before opening
it.
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 3cc6579458..26681330ff 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3213,6 +3213,20 @@ static void _open_door(coord_def move, bool check_confused) int skill = you.dex + (you.skills[SK_TRAPS_DOORS] + you.skills[SK_STEALTH]) / 2; + if (is_exclude_root(doorpos) && !(check_confused && you.confused())) + { + std::string prompt = + make_stringf("This %s%s is marked as excluded! Open it " + "anyways?", adj, noun); + + if (!yesno(prompt.c_str(), true, 'n', true, false)) + { + canned_msg(MSG_OK); + interrupt_activity( AI_FORCE_INTERRUPT ); + return; + } + } + if (you.duration[DUR_BERSERKER]) { // XXX: Better flavour for larger doors? |