summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-act.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-05-14 09:27:46 -0400
committergammafunk <gammafunk@gmail.com>2014-05-26 22:44:47 -0500
commit959a3ba7cfd916225fd3ccf3ca91b4448d924d19 (patch)
treef70052cc3785c07acb088be1a379dfb3c806f7cf /crawl-ref/source/player-act.cc
parentfb02dadd07b4c6ce572780c6540cf35fa28ea716 (diff)
downloadcrawl-ref-959a3ba7cfd916225fd3ccf3ca91b4448d924d19.tar.gz
crawl-ref-959a3ba7cfd916225fd3ccf3ca91b4448d924d19.zip
Remove two checks based on item mass.
Should be no functional change. (commiter's note: tweaked the comments.)
Diffstat (limited to 'crawl-ref/source/player-act.cc')
-rw-r--r--crawl-ref/source/player-act.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index 5575426c6c..34fe271e38 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -425,10 +425,13 @@ bool player::could_wield(const item_def &item, bool ignore_brand,
if (species == SP_FELID)
return false;
- if (body_size(PSIZE_TORSO, true) < SIZE_LARGE
- && (item_mass(item) >= 500
- || item.base_type == OBJ_WEAPONS
- && item_mass(item) >= 300))
+ // Only ogres and trolls can wield giant clubs and large rocks (for
+ // sandblast).
+ if (body_size(PSIZE_TORSO, ignore_transform) < SIZE_LARGE
+ && ((item.base_type == OBJ_WEAPONS
+ && is_giant_club_type(item.sub_type))
+ || (item.base_type == OBJ_MISSILES &&
+ item.sub_type == MI_LARGE_ROCK)))
{
return false;
}
@@ -444,7 +447,7 @@ bool player::could_wield(const item_def &item, bool ignore_brand,
// Small species wielding large weapons...
if (body_size(PSIZE_BODY, ignore_transform) < SIZE_MEDIUM
&& !check_weapon_wieldable_size(item,
- body_size(PSIZE_BODY, ignore_transform)))
+ body_size(PSIZE_BODY, ignore_transform)))
{
return false;
}