summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-14 15:31:00 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-14 15:31:00 +0000
commit2ed4f389c28fa47ae5e16d747d0eb81e3a498acf (patch)
tree06494a4ca20aacd8b75dea9d14496d2c15ef37d2 /crawl-ref/source/item_use.cc
parent85e11d2d3c892c2ffcd53b0bf55c0e83ce13fb9d (diff)
downloadcrawl-ref-2ed4f389c28fa47ae5e16d747d0eb81e3a498acf.tar.gz
crawl-ref-2ed4f389c28fa47ae5e16d747d0eb81e3a498acf.zip
* Fix 2477235: Use inscription check when switching back from butchering
tool in case it was autoinscribed {!w}. * Make TSO reclaim holy wrath weapons an Elyvilon worshipper is attempting to destroy (flavour only). (FR 2497133) * Disallow Dissolution outside of the Slime Pits. * Explain 'e' as "Drain corpses" for Vampires in the command help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8450 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index ee73745107..36a15df6ec 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -219,7 +219,10 @@ static bool _valid_weapon_swap(const item_def &item)
return (false);
}
-bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages)
+// If force is true, don't check weapon inscriptions.
+// (Assuming the player was already prompted for that.)
+bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages,
+ bool force)
{
if (inv_count() < 1)
{
@@ -318,8 +321,11 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages)
return (false);
// For non-auto_wield cases checked above.
- if (auto_wield && !check_warning_inscriptions(new_wpn, OPER_WIELD))
+ if (auto_wield && !force
+ && !check_warning_inscriptions(new_wpn, OPER_WIELD))
+ {
return (false);
+ }
// Wield the weapon.
if (!safe_to_remove_or_wear(new_wpn, false))