From daffe68811f8666a4aaf25fa882fd0bfe196015f Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 12 Dec 2007 22:33:11 +0000 Subject: Add minor cleanups of the new helmet handling code: use is_hard_helmet() instead of hardcoding references to caps and wizard hats when possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3049 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mutation.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/mutation.cc') diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index c826468563..e4d648636c 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1799,21 +1799,21 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation, break; - case MUT_HORNS: // horns force your helmet off + case MUT_HORNS: { mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION); + // horns force hard helmets off if (you.equip[EQ_HELMET] != -1 && - (you.inv[you.equip[EQ_HELMET]].sub_type == ARM_CAP || - you.inv[you.equip[EQ_HELMET]].sub_type == ARM_WIZARD_HAT)) + !is_hard_helmet( you.inv[you.equip[EQ_HELMET]] )) { - break; // horns don't push caps/wizard hats off + break; } remove_one_equip(EQ_HELMET); } break; - + case MUT_STRONG_STIFF: if (you.mutation[MUT_FLEXIBLE_WEAK] > 0) { -- cgit v1.2.3-54-g00ecf