From 27b9f892b8cba07261c79f9f33feadaf84f09068 Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 17 Feb 2009 18:21:25 +0000 Subject: Make _mutations_prevent_wearing() properly account for the beak mutation (which disallows hard helmets). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9116 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/transfor.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/transfor.cc') diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index e530a398b2..ca842ca4e2 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -168,7 +168,7 @@ static void _remove_equipment(const std::set& removed, (unequip ? "falls away!" : "melds into your body.")); _unwear_equipment_slot(e); - + if (unequip) you.equip[e] = -1; } @@ -182,8 +182,11 @@ bool _mutations_prevent_wearing(const item_def& item) const equipment_type eqslot = get_armour_slot(item); - if (you.mutation[MUT_HORNS] && is_hard_helmet(item)) + if (is_hard_helmet(item) + && (you.mutation[MUT_HORNS] || you.mutation[MUT_BEAK])) + { return (true); + } if (item.sub_type == ARM_BOOTS // barding excepted! && (you.mutation[MUT_HOOVES] || you.mutation[MUT_TALONS])) @@ -207,7 +210,7 @@ static void _rewear_equipment_slot(equipment_type e) return; item_def& item = you.inv[you.equip[e]]; - + if (item.base_type == OBJ_JEWELLERY) jewellery_wear_effects(item); else @@ -510,12 +513,12 @@ bool transform(int pow, transformation_type which_trans, bool quiet) { mpr("The transformation conflicts with an enchantment " "already in effect."); - } + } return (false); } std::set rem_stuff = _init_equipment_removal(which_trans); - + if (_check_for_cursed_equipment(rem_stuff, which_trans, quiet)) return (false); -- cgit v1.2.3-54-g00ecf