diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-12 22:33:11 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-12 22:33:11 +0000 |
commit | daffe68811f8666a4aaf25fa882fd0bfe196015f (patch) | |
tree | c62456ce86b9e10b3be5d02153441c4fd5584c19 /crawl-ref/source/mutation.cc | |
parent | 3dbe5462b4b3113a209e0c00bc38dc324ef5b313 (diff) | |
download | crawl-ref-daffe68811f8666a4aaf25fa882fd0bfe196015f.tar.gz crawl-ref-daffe68811f8666a4aaf25fa882fd0bfe196015f.zip |
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
Diffstat (limited to 'crawl-ref/source/mutation.cc')
-rw-r--r-- | crawl-ref/source/mutation.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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) { |