summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-17 07:17:37 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-17 07:17:37 +0000
commit841912a64cbeb5e4d798a7df3d4c7ee881aaf5fa (patch)
tree2a47f347a8397662a9cb8fded2d8f8be04d0812a /crawl-ref/source/player.cc
parent4f5084a7944889bd2095629ff0937b1ef39ccd2c (diff)
downloadcrawl-ref-841912a64cbeb5e4d798a7df3d4c7ee881aaf5fa.tar.gz
crawl-ref-841912a64cbeb5e4d798a7df3d4c7ee881aaf5fa.zip
If contaminate_player() makes the player glow when s/he wasn't glowing
before then give a "you are contaminated with residual magics" type message instead of "you feel more contaminated with magical energies". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5916 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 86f9a53376..926e99f6bb 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4936,10 +4936,7 @@ void contaminate_player(int change, bool controlled, bool status_only)
// figure out new level
new_level = _get_contamination_level();
- if (new_level >= 1)
- learned_something_new(TUT_GLOWING);
-
- if (status_only)
+ if (status_only || (new_level >= 1 && old_level == 0))
{
if (new_level > 0)
{
@@ -4958,16 +4955,20 @@ void contaminate_player(int change, bool controlled, bool status_only)
(new_level == 3) ? "!" : ".");
}
}
- return;
}
-
- if (new_level != old_level)
+ else if (new_level != old_level)
{
mprf((change > 0) ? MSGCH_WARN : MSGCH_RECOVERY,
"You feel %s contaminated with magical energies.",
(change > 0) ? "more" : "less" );
}
+ if (new_level >= 1)
+ learned_something_new(TUT_GLOWING);
+
+ if (status_only)
+ return;
+
// Zin doesn't like mutations or mutagenic radiation.
if (you.religion == GOD_ZIN)
{