summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-09 17:19:35 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-09 17:19:35 +0000
commit069ab73287c844507edb580e6898ea7fd1f7a2aa (patch)
tree2fe80ae62e1ba6da1c69bc6f75b7bcf1e09b99f4 /crawl-ref/source/item_use.cc
parented1c1da05856c0d032acc38fa46d96eb039c36ae (diff)
downloadcrawl-ref-069ab73287c844507edb580e6898ea7fd1f7a2aa.tar.gz
crawl-ref-069ab73287c844507edb580e6898ea7fd1f7a2aa.zip
[1958923] If player can't wield weapon without a shield, don't give any messages about not being able to wield the weapon because a shield is equipped.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4959 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index ca537e4443..c83392ec3a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -129,12 +129,6 @@ bool can_wield(const item_def *weapon, bool say_reason,
}
}
- if (!ignore_temporary_disability && is_shield_incompatible(*weapon))
- {
- SAY(mpr("You can't wield that with a shield."));
- return (false);
- }
-
// We don't have to check explicitly for staves - all staves are wieldable
// by everyone.
if (weapon->base_type != OBJ_WEAPONS)
@@ -176,6 +170,12 @@ bool can_wield(const item_def *weapon, bool say_reason,
return false;
}
+ if (!ignore_temporary_disability && is_shield_incompatible(*weapon))
+ {
+ SAY(mpr("You can't wield that with a shield."));
+ return (false);
+ }
+
// We can wield this weapon. Phew!
return true;