summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-act.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2014-05-26 05:21:20 -0500
committergammafunk <gammafunk@gmail.com>2014-05-26 22:45:16 -0500
commit55d1b512e3395f07e9341ce9eae5079b581b6894 (patch)
tree811704017046d8ed62335bd1c45d36476e0dea55 /crawl-ref/source/player-act.cc
parentb364f15f4eeff0e148b6fc026c01de1327254cd2 (diff)
downloadcrawl-ref-55d1b512e3395f07e9341ce9eae5079b581b6894.tar.gz
crawl-ref-55d1b512e3395f07e9341ce9eae5079b581b6894.zip
Remove player burden and carrying capacity
Item inventory weights (based on item mass) generally don't lead to meaningful decisions that justify the inventory juggling and interface problems that come from having burden states. The 52-slot limit is a better system for limiting inventory and providing inventory-related decisions because it's not so fine-grained and doesn't require the player to examine weights for each slot. Work is ongoing to improve the slot system by consolidating food types and handling strategic consumables in a different way.
Diffstat (limited to 'crawl-ref/source/player-act.cc')
-rw-r--r--crawl-ref/source/player-act.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index 415f60e80d..590d6da209 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -300,12 +300,8 @@ random_var player::attack_delay(item_def *weap, item_def *projectile,
rv::roll_dice(2, armour_penalty),
20)));
- // Unarmed speed. Min delay is 10 - 270/54 = 5.
- if (you.burden_state == BS_UNENCUMBERED)
- {
- skill_type sk = projectile ? SK_THROWING : SK_UNARMED_COMBAT;
- attk_delay -= div_rand_round(constant(you.skill(sk, 10)), 54);
- }
+ skill_type sk = projectile ? SK_THROWING : SK_UNARMED_COMBAT;
+ attk_delay -= div_rand_round(constant(you.skill(sk, 10)), 54);
// Bats are faster (for what good it does them).
if (you.form == TRAN_BAT && !projectile)
@@ -417,12 +413,14 @@ bool player::can_wield(const item_def& item, bool ignore_curse,
bool player::could_wield(const item_def &item, bool ignore_brand,
bool ignore_transform) const
{
+ size_type bsize = body_size(PSIZE_TORSO, ignore_transform);
+
if (species == SP_FELID)
return false;
- // Only ogres and trolls can wield giant clubs and large rocks (for
+ // Only ogres and trolls can wield giant clubs or large rocks (for
// sandblast).
- if (body_size(PSIZE_TORSO, ignore_transform) < SIZE_LARGE
+ if (bsize < SIZE_LARGE
&& ((item.base_type == OBJ_WEAPONS
&& is_giant_club_type(item.sub_type))
|| (item.base_type == OBJ_MISSILES &&
@@ -440,12 +438,8 @@ bool player::could_wield(const item_def &item, bool ignore_brand,
return true;
// 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)))
- {
+ if (bsize < SIZE_MEDIUM && !check_weapon_wieldable_size(item, bsize))
return false;
- }
if (!ignore_brand)
{