summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-14 01:53:45 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-14 01:53:45 -0700
commita4f9a079be784391b0dca1244a25cfe44be638a0 (patch)
tree80799b7c350dd27dffcac0273eaa1782babf7492 /crawl-ref/source/player.cc
parentba64f5cdc8000506457e3e78c063316f0cdf3116 (diff)
downloadcrawl-ref-a4f9a079be784391b0dca1244a25cfe44be638a0.tar.gz
crawl-ref-a4f9a079be784391b0dca1244a25cfe44be638a0.zip
Add messages about gaining and loosing non-dangerous amounts of
magical contamination (you.magic_contamination <= 5), since we now display a grey "Glow" status line for such non-dangerous amounts.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index b0bdc8cbaf..a6467a4c4b 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5312,8 +5312,9 @@ void contaminate_player(int change, bool controlled, bool status_only)
return;
// get current contamination level
- int old_level = get_contamination_level();
- int new_level = 0;
+ int old_amount = you.magic_contamination;
+ int old_level = get_contamination_level();
+ int new_level = 0;
#if DEBUG_DIAGNOSTICS
if (change > 0 || (change < 0 && you.magic_contamination))
{
@@ -5336,7 +5337,8 @@ void contaminate_player(int change, bool controlled, bool status_only)
// figure out new level
new_level = get_contamination_level();
- if (status_only || (new_level >= 1 && old_level == 0))
+ if (status_only || (new_level >= 1 && old_level == 0)
+ || (old_amount == 0 && you.magic_contamination > 0))
{
if (new_level > 3)
{
@@ -5344,6 +5346,11 @@ void contaminate_player(int change, bool controlled, bool status_only)
"Your entire body has taken on an eerie glow!" :
"You are engulfed in a nimbus of crackling magics!");
}
+ else if (new_level == 0 && old_amount == 0
+ && you.magic_contamination > 0)
+ {
+ mpr("You are very lightly contaminated with residual magic.");
+ }
else
{
mprf("You are %s with residual magics%s",
@@ -5363,6 +5370,8 @@ void contaminate_player(int change, bool controlled, bool status_only)
if (change > 0)
xom_is_stimulated(new_level * 32);
}
+ else if (old_level == 0 && old_amount > 0 && you.magic_contamination == 0)
+ mpr("Your magical contamination has completely faded away.");
if (status_only)
return;