diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-26 11:58:34 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-26 11:58:34 +0000 |
commit | ef6e7277f36d2273d29e06fbf2c3b56ae829e860 (patch) | |
tree | 86e98217ccae9e88eab5c0f2611811cbc2ba1749 | |
parent | 592c6a235e81c40fd67cddaa429326d2397979a9 (diff) | |
download | crawl-ref-ef6e7277f36d2273d29e06fbf2c3b56ae829e860.tar.gz crawl-ref-ef6e7277f36d2273d29e06fbf2c3b56ae829e860.zip |
Fixed bug 1565538, horns don't push off worn helmets.
(This is indisputably a bug, it was caused due to the change in the
way item properties are handled.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@136 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/mutation.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index f2a041b11b..62b22bdcb6 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -35,6 +35,7 @@ #include "defines.h" #include "effects.h" +#include "itemprop.h" #include "macro.h" #include "notes.h" #include "ouch.h" @@ -1487,8 +1488,9 @@ bool mutate(int which_mutation, bool failMsg) { mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION); - if (you.equip[EQ_HELMET] != -1 - && you.inv[you.equip[EQ_HELMET]].plus2 > 1) + if (you.equip[EQ_HELMET] != -1 && + (get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_CAP || + get_helmet_type(you.inv[you.equip[EQ_HELMET]]) == THELM_WIZARD_HAT)) { break; // horns don't push caps/wizard hats off } |