summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 11:37:24 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 11:37:24 +0000
commit5c1d15b2a0ba16caafbc5f426541386776e6ad70 (patch)
tree340d1ea4b5fb4d28b3578dbb3257eca03714b2e9 /crawl-ref/source/item_use.cc
parenta7c16941b77fcdcc841c3edbcd0514c16ac4c2e5 (diff)
downloadcrawl-ref-5c1d15b2a0ba16caafbc5f426541386776e6ad70.tar.gz
crawl-ref-5c1d15b2a0ba16caafbc5f426541386776e6ad70.zip
Fix 1945337: Vampires getting carnivorous/herbivorous mutations.
Fix 1944345: Dropping worn/wielded items while Berserk. Fix 1945347: Drinking from fountans while Berserk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4326 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index af1c6906c5..ad37d5f351 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1134,6 +1134,12 @@ bool takeoff_armour(int item)
return false;
}
+ if (you.duration[DUR_BERSERKER])
+ {
+ canned_msg(MSG_TOO_BERSERK);
+ return false;
+ }
+
if (item_cursed( you.inv[item] ))
{
for (int loopy = EQ_CLOAK; loopy <= EQ_BODY_ARMOUR; loopy++)
@@ -3533,6 +3539,12 @@ bool _drink_fountain()
return false;
}
+ if (you.duration[DUR_BERSERKER])
+ {
+ canned_msg(MSG_TOO_BERSERK);
+ return false;
+ }
+
potion_type fountain_effect = POT_WATER;
if ( feat == DNGN_FOUNTAIN_BLUE )
{