summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-17 11:03:36 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-17 11:03:36 +0000
commit58fadd8bee0e04b270522f5024bb2777ea1fb66d (patch)
tree9689e000412dee45f2dbbf77c1434961a3e5aff3 /crawl-ref/source/item_use.cc
parent43d9191f4ba2c718d5df92989a1e57fe480974d1 (diff)
downloadcrawl-ref-58fadd8bee0e04b270522f5024bb2777ea1fb66d.tar.gz
crawl-ref-58fadd8bee0e04b270522f5024bb2777ea1fb66d.zip
* Fix 2860301: armour acquirement failing when transformed.
* Fix 2829495: certain missiles and large weapons not being marked as useless. * Post-berserk exhaustion cancels Haste even wearing an amulet of RS. If you've got a lot of speed piled up it will last 2-3 more turns, but that's it. * Make tiles spell clicking use Z rather than z behaviour. (Assuming that mindless mouseclicks are more difficult to do than mindless keyboard bashing. That, and macros don't take into account mouseclicks.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10690 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 954046ad1e..4987daedf9 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -800,7 +800,10 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
else if (sub_type == ARM_CENTAUR_BARDING)
can_wear = (you.species == SP_CENTAUR);
else
- can_wear = (fit_armour_size(item, player_size()) == 0);
+ {
+ can_wear = (fit_armour_size(item,
+ player_size(PSIZE_TORSO, ignore_temporary)) == 0);
+ }
if (!can_wear)
{
@@ -899,7 +902,8 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
}
// Giant races and draconians.
- if (player_size(PSIZE_TORSO) >= SIZE_LARGE || player_genus(GENPC_DRACONIAN))
+ if (player_size(PSIZE_TORSO, ignore_temporary) >= SIZE_LARGE
+ || player_genus(GENPC_DRACONIAN))
{
if (sub_type >= ARM_LEATHER_ARMOUR
&& sub_type <= ARM_PLATE_MAIL
@@ -917,7 +921,7 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
}
// Tiny races.
- if (player_size(PSIZE_TORSO) <= SIZE_LITTLE)
+ if (player_size(PSIZE_TORSO, ignore_temporary) <= SIZE_LITTLE)
{
if ((sub_type >= ARM_LEATHER_ARMOUR
&& sub_type <= ARM_PLATE_MAIL)