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/monster.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/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 4331bb05ee..2be5afda92 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -655,7 +655,7 @@ bool monster::could_wield(const item_def &item, bool ignore_brand, return false; // Wimpy monsters (e.g. kobolds, goblins) can't use halberds, etc. - if (!check_weapon_wieldable_size(item, body_size())) + if (!is_weapon_wieldable(item, body_size())) return false; if (!ignore_brand) |