summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/it_use2.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-02 03:40:05 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-02 03:40:56 -0800
commitb6249cf8af6ab098fe22db33972ededaaf0a507b (patch)
tree797c77710d0efd20444a00d71da0066cce272ad1 /crawl-ref/source/it_use2.cc
parentf4ef35e877a1a7e23b61e166e1a5a34690536ce5 (diff)
downloadcrawl-ref-b6249cf8af6ab098fe22db33972ededaaf0a507b.tar.gz
crawl-ref-b6249cf8af6ab098fe22db33972ededaaf0a507b.zip
Removing +Lev items cancels levitation
Complete with removal-over-water blocking! Logic is very fiddly, don't trust it to not kill you.
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index e0a8f1736c..158aa5fd47 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -736,6 +736,10 @@ void unuse_artefact(const item_def &item, bool *show_msgs)
if (proprt[ARTP_NOISES] != 0)
you.attribute[ATTR_NOISES] = 0;
+ if (proprt[ARTP_LEVITATE] != 0 && you.duration[DUR_LEVITATION] > 2
+ && !you.permanent_levitation())
+ you.duration[DUR_LEVITATION] = 1;
+
if (is_unrandom_artefact( item ))
{
const unrandart_entry *entry = get_unrand_entry(item.special);