From c1121941e73d563492e917b3778721d41997fd6c Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 27 Oct 2009 21:39:14 -0700 Subject: acr.c: Prompt to open excluded doors If an exclusion is placed right on top of a door, prompt before opening it. --- crawl-ref/source/acr.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crawl-ref/source/acr.cc') 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? -- cgit v1.2.3-54-g00ecf