summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-07-12 15:26:53 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-07-13 00:33:57 -0700
commitfed8404d299063c153073816a5ed77a85c9c008c (patch)
tree71cb50c8ef1fea2881be777ffb2c44d95c5cb6a8 /crawl-ref/source/item_use.cc
parent533b47cd6b7ff87f5d17d41a5d414cb9f8f3a6f2 (diff)
downloadcrawl-ref-fed8404d299063c153073816a5ed77a85c9c008c.tar.gz
crawl-ref-fed8404d299063c153073816a5ed77a85c9c008c.zip
Refactor item handedness code
Instead of specifying HANDS_ONE or HANDS_TWO in Weapon_prop[] (which were... misleading at best), there's now a min_2h_size and min_1h_size field. The former controls the minimum size a player or monster must be to wield the weapon at all; the latter is the minimum size required to wield it with one hand. This means that giants can now wield daggers (unlike before); if necessary, a max_size field can be added, but this seems a low priority to preserve. This breaks formatting of Weapon_prop[] a bit; apologies.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9a36abb862..bbb9e3e95a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -165,7 +165,7 @@ bool can_wield(item_def *weapon, bool say_reason,
// Small species wielding large weapons...
if (you.body_size(PSIZE_BODY) < SIZE_MEDIUM
- && !check_weapon_wieldable_size(*weapon, you.body_size(PSIZE_BODY)))
+ && !is_weapon_wieldable(*weapon, you.body_size(PSIZE_BODY)))
{
SAY(mpr("That's too large for you to wield."));
return false;