From: <gi...@cr...> - 2011-04-28 19:42:14
|
via c038912a24ff8fd1f123a031e5e6f934d7f655f6 (commit) via df2b6aa16ada77d64538c0fd86fe3a56a505be5b (commit) from ea30b76e340f4df88aacf99802616c032c3e8b40 (commit) ----------------------------------------------------------------------- commit c038912a24ff8fd1f123a031e5e6f934d7f655f6 Author: David Lawrence Ramsey <dol...@us...> Date: Thu Apr 28 14:36:48 2011 -0500 Make player/monster "extra balanced" checks check against SIZE_LARGE. This matches size checks done elsewhere, and produces the same results as before in any case. commit df2b6aa16ada77d64538c0fd86fe3a56a505be5b Author: David Lawrence Ramsey <dol...@us...> Date: Thu Apr 28 14:28:49 2011 -0500 Remove redundant body_size() parameters matched by the default value. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/item_use.cc | 2 +- crawl-ref/source/monster.cc | 2 +- crawl-ref/source/player-act.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index da22f2d..19c01fc 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -158,7 +158,7 @@ bool can_wield(item_def *weapon, bool say_reason, // Only ogres and trolls can wield giant clubs (>= 30 aum) // and large rocks (60 aum). - if (you.body_size(PSIZE_TORSO) < SIZE_LARGE + if (you.body_size() < SIZE_LARGE && (item_mass(*weapon) >= 500 || weapon->base_type == OBJ_WEAPONS && item_mass(*weapon) >= 300)) diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 58d616f..922e0ed 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -236,7 +236,7 @@ bool monster::extra_balanced_at(const coord_def p) const const dungeon_feature_type grid = grd(p); return (grid == DNGN_SHALLOW_WATER && (mons_genus(type) == MONS_NAGA // tails, not feet - || body_size(PSIZE_BODY) > SIZE_MEDIUM)); + || body_size(PSIZE_BODY) >= SIZE_LARGE)); } bool monster::extra_balanced() const diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc index 4f5c03a..5ced0d2 100644 --- a/crawl-ref/source/player-act.cc +++ b/crawl-ref/source/player-act.cc @@ -118,7 +118,7 @@ bool player::extra_balanced() const const dungeon_feature_type grid = grd(pos()); return (grid == DNGN_SHALLOW_WATER && (species == SP_NAGA // tails, not feet - || body_size(PSIZE_BODY) > SIZE_MEDIUM) + || body_size(PSIZE_BODY) >= SIZE_LARGE) && !form_changed_physiology()); } @@ -298,7 +298,7 @@ bool player::could_wield(const item_def &item, bool ignore_brand, { if (species == SP_CAT) return (false); - if (body_size(PSIZE_TORSO) < SIZE_LARGE && item_mass(item) >= 300) + if (body_size() < SIZE_LARGE && item_mass(item) >= 300) return (false); // Small species wielding large weapons... -- Dungeon Crawl Stone Soup |