From 386f074019ae10e1bbbd7f20b2962031ac8e5e14 Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 17 Feb 2009 11:41:45 +0000 Subject: 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 --- crawl-ref/source/player.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref') 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: -- cgit v1.2.3-54-g00ecf