diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-02 03:40:05 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-02 03:40:56 -0800 |
commit | b6249cf8af6ab098fe22db33972ededaaf0a507b (patch) | |
tree | 797c77710d0efd20444a00d71da0066cce272ad1 /crawl-ref/source/it_use2.cc | |
parent | f4ef35e877a1a7e23b61e166e1a5a34690536ce5 (diff) | |
download | crawl-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.cc | 4 |
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); |