summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 11:41:45 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 11:41:45 +0000
commit386f074019ae10e1bbbd7f20b2962031ac8e5e14 (patch)
treecdb09e47e12038c3cc947bf98a3998cb1b11c822 /crawl-ref/source/player.cc
parenta298a872647d9beb0d30d71472a0e08e83df1440 (diff)
downloadcrawl-ref-386f074019ae10e1bbbd7f20b2962031ac8e5e14.tar.gz
crawl-ref-386f074019ae10e1bbbd7f20b2962031ac8e5e14.zip
Fix [2608901]: too many transforms got to keep their soft caps.
We should really merge you_tran_can_wear() and the various tests in transfor.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9111 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 08efe21cb4..d03dadfa10 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -661,12 +661,14 @@ bool you_tran_can_wear(const item_def &item)
else if (item.sub_type == ARM_CENTAUR_BARDING)
return (you.species == SP_CENTAUR && you_tran_can_wear(EQ_BOOTS));
- if (item.sub_type == ARM_CAP || item.sub_type == ARM_WIZARD_HAT)
+ if (get_armour_slot(item) == EQ_HELMET
+ && !is_hard_helmet(item)
+ && (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
+ || you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST))
{
- const int transform = you.attribute[ATTR_TRANSFORMATION];
- // All but these transformations can wear hats/caps.
- return (transform != TRAN_BAT && transform != TRAN_AIR);
+ return (true);
}
+
return you_tran_can_wear(get_armour_slot(item), true);
default: