diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-12-27 23:41:17 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-12-27 23:41:17 -0800 |
commit | 02962c9ca97ca896e2d7be0e891f800efbbd9368 (patch) | |
tree | 30cd70ab2bb93edbc1f793b7b9dfdaf536395479 /crawl-ref/source/player.cc | |
parent | cc6a658772e7c26cf2dedceb7028601c9863268f (diff) | |
download | crawl-ref-02962c9ca97ca896e2d7be0e891f800efbbd9368.tar.gz crawl-ref-02962c9ca97ca896e2d7be0e891f800efbbd9368.zip |
Forms never lower weight cap
I'm just building the bikeshed - somebody else needs to paint this stupid thing.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 04c1498297..7ba87a20ff 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2379,7 +2379,11 @@ int player_sust_abil(bool calc_unid) int carrying_capacity(burden_state_type bs) { - int cap = (2 * you.body_weight()) + (you.strength * 300) + // Yuck. We need this for gameplay - it nerfs small forms too much + // otherwise - but there's no good way to rationalize here... --sorear + int used_weight = std::max(you.body_weight(), you.body_weight(true)); + + int cap = (2 * used_weight) + (you.strength * 300) + (you.airborne() ? 1000 : 0); // We are nice to the lighter species in that strength adds absolutely // instead of relatively to body weight. --dpeg @@ -5593,9 +5597,12 @@ size_type player::body_size(size_part_type psize, bool base) const } } -int player::body_weight() const +int player::body_weight(bool base) const { - int weight = actor::body_weight(); + int weight = actor::body_weight(base); + + if (base) + return (weight); switch (attribute[ATTR_TRANSFORMATION]) { |