summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-02 12:36:30 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-02 12:36:30 -0800
commite899ce42db18f54a06e082c482dc528daa3be1d1 (patch)
treeca06b33b59d174fe1dea9d7ddfb4d5f983676d52 /crawl-ref/source
parent6722acc40a80c6951d4f485a84ada395c4de8317 (diff)
downloadcrawl-ref-e899ce42db18f54a06e082c482dc528daa3be1d1.tar.gz
crawl-ref-e899ce42db18f54a06e082c482dc528daa3be1d1.zip
Give +Invis the same treatment as +Lev
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/it_use2.cc3
-rw-r--r--crawl-ref/source/item_use.cc7
2 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 158aa5fd47..967c9a0b7c 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -740,6 +740,9 @@ void unuse_artefact(const item_def &item, bool *show_msgs)
&& !you.permanent_levitation())
you.duration[DUR_LEVITATION] = 1;
+ if (proprt[ARTP_INVISIBLE] != 0 && you.duration[DUR_INVIS] > 1)
+ you.duration[DUR_INVIS] = 1;
+
if (is_unrandom_artefact( item ))
{
const unrandart_entry *entry = get_unrand_entry(item.special);
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 4f5af8d051..a58057e26a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3773,6 +3773,13 @@ void jewellery_remove_effects(item_def &item, bool mesg)
}
break;
+ case RING_INVISIBILITY:
+ if (you.duration[DUR_INVIS])
+ {
+ you.duration[DUR_INVIS] = 1;
+ }
+ break;
+
case RING_MAGICAL_POWER:
mpr("You feel your mana capacity decrease.");
// dec_max_mp(9);