From a4f9a079be784391b0dca1244a25cfe44be638a0 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Wed, 14 Oct 2009 01:53:45 -0700 Subject: 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. --- crawl-ref/source/player.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/player.cc') 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; -- cgit v1.2.3-54-g00ecf