diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-24 00:50:41 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-24 00:50:41 -0700 |
commit | a698d535913e0e222aa1635805a193cfdc5a592c (patch) | |
tree | cf1ab93915faff4003109d1483a8daf7a98c36dd /crawl-ref/source/player.cc | |
parent | 9c08ad575dfa4fbfcbdff5280a582a7846094f60 (diff) | |
download | crawl-ref-a698d535913e0e222aa1635805a193cfdc5a592c.tar.gz crawl-ref-a698d535913e0e222aa1635805a193cfdc5a592c.zip |
Don't use invisibility items when pointless
Since the game won't let you waste (known) scrolls or wand charges of
teleportation if it's known that you can't teleport (you're wearing an
identified artefact which prevents teleportation) do something similar
for invisiblity: if you're haloed because of worshipping TSO then
refuse to use known wands or potions of invisibility, and if you're
glowing from magical contamination then prompt before usage (since the
glow *might* wear off before the invisibility).
Also: 1) add some informational messages about the interaction of
invisibility and being backlit, 2) if you use-identify invisibility
while haloed then just print a message, but don't actually get the
invisibility duration.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 148af8e8f3..3f196501c7 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5179,6 +5179,12 @@ void contaminate_player(int change, bool controlled, bool status_only) if (change > 0) xom_is_stimulated(new_level * 32); + + if (new_level == 0 && you.duration[DUR_INVIS] && !you.backlit()) + { + mpr("You fade completely from view now that you are no longer " + "glowing from magical contamination."); + } } else if (old_level == 0 && old_amount > 0 && you.magic_contamination == 0) mpr("Your magical contamination has completely faded away."); |