From ef6e7277f36d2273d29e06fbf2c3b56ae829e860 Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 26 Sep 2006 11:58:34 +0000 Subject: 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 --- crawl-ref/source/mutation.cc | 6 ++++-- 1 file 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 } -- cgit v1.2.3-54-g00ecf