summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 18:21:25 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-17 18:21:25 +0000
commit27b9f892b8cba07261c79f9f33feadaf84f09068 (patch)
tree4e81b6a4c06c8782e6d1c4c7a3e0f5a4c067af1a /crawl-ref/source/transfor.cc
parentb20abee634a8d41db05e8324657c7a0d3826a93c (diff)
downloadcrawl-ref-27b9f892b8cba07261c79f9f33feadaf84f09068.tar.gz
crawl-ref-27b9f892b8cba07261c79f9f33feadaf84f09068.zip
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
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc13
1 files changed, 8 insertions, 5 deletions
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<equipment_type>& 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<equipment_type> rem_stuff = _init_equipment_removal(which_trans);
-
+
if (_check_for_cursed_equipment(rem_stuff, which_trans, quiet))
return (false);