From 378c95389b4ac05f90399105c705a2667a1c922e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 25 May 2008 13:02:35 +0000 Subject: Remove the prompt before putting/removing on stat draining items in favour of just refusing to do so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5233 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 727a572ca9..804995e72b 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2871,35 +2871,31 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove, if (remove) { - std::string prompt = - item.base_type == OBJ_WEAPONS ? "Unwielding" : "Removing"; - prompt += " this item could be fatal. "; - prompt += item.base_type == OBJ_WEAPONS ? "Unwield" : "Remove"; - prompt += " anyway?"; - - if ((prop_str >= you.strength || prop_int >= you.intel - || prop_dex >= you.dex) - && (quiet || !yesno(prompt.c_str(), false, 'n'))) + if (prop_str >= you.strength || prop_int >= you.intel + || prop_dex >= you.dex) { if (!quiet) - canned_msg(MSG_OK); + { + mprf(MSGCH_WARN, "%s this item would be fatal, so you refuse " + "to do that.", + (item.base_type == OBJ_WEAPONS ? "Unwielding" + : "Removing")); + } return (false); } } else // put on { - std::string prompt = - item.base_type == OBJ_WEAPONS ? "Wield" : "Wear"; - prompt += "ing this item could be fatal. "; - prompt += item.base_type == OBJ_WEAPONS ? "Wield" : "Put on"; - prompt += " anyway?"; - - if ((-prop_str >= you.strength || -prop_int >= you.intel - || -prop_dex >= you.dex) - && (quiet || !yesno(prompt.c_str(), false, 'n'))) + if (-prop_str >= you.strength || -prop_int >= you.intel + || -prop_dex >= you.dex) { if (!quiet) - canned_msg(MSG_OK); + { + mprf(MSGCH_WARN, "%s this item would be fatal, so you refuse " + "to do that.", + (item.base_type == OBJ_WEAPONS ? "Wielding" + : "Wearing")); + } return (false); } } -- cgit v1.2.3-54-g00ecf