diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-12 15:26:53 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-13 00:33:57 -0700 |
commit | fed8404d299063c153073816a5ed77a85c9c008c (patch) | |
tree | 71cb50c8ef1fea2881be777ffb2c44d95c5cb6a8 /crawl-ref/source/player-act.cc | |
parent | 533b47cd6b7ff87f5d17d41a5d414cb9f8f3a6f2 (diff) | |
download | crawl-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/player-act.cc')
-rw-r--r-- | crawl-ref/source/player-act.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc index f9574be068..74ea3d87a8 100644 --- a/crawl-ref/source/player-act.cc +++ b/crawl-ref/source/player-act.cc @@ -443,7 +443,7 @@ bool player::could_wield(const item_def &item, bool ignore_brand, return true; // Small species wielding large weapons... - if (bsize < SIZE_MEDIUM && !check_weapon_wieldable_size(item, bsize)) + if (bsize < SIZE_MEDIUM && !is_weapon_wieldable(item, bsize)) return false; if (!ignore_brand) |