summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 21:25:37 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 21:25:37 +0000
commitdea302d31da47a825c293a7d8021b7bfa03653e5 (patch)
treef3c69dbe9243e854c313a688a323129549bbef64 /crawl-ref/source/effects.cc
parent4cad928d655daaef8b3d83de1a47cd3b7b92b4f0 (diff)
downloadcrawl-ref-dea302d31da47a825c293a7d8021b7bfa03653e5.tar.gz
crawl-ref-dea302d31da47a825c293a7d8021b7bfa03653e5.zip
Don't display the "You hear..." message for scrolls of random
uselessness if the player is silenced. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5270 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc25
1 files changed, 14 insertions, 11 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 344702c037..11175a04b9 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -805,17 +805,20 @@ void random_uselessness(unsigned char ru, unsigned char sc_read_2)
break;
case 8:
- temp_rand = random2(9);
- mprf("You hear %s.",
- (temp_rand == 0) ? "snatches of song" :
- (temp_rand == 1) ? "a voice call someone else's name" :
- (temp_rand == 2) ? "a very strange noise" :
- (temp_rand == 3) ? "roaring flame" :
- (temp_rand == 4) ? "a very strange noise indeed" :
- (temp_rand == 5) ? "the chiming of a distant gong" :
- (temp_rand == 6) ? "the bellowing of a yak" :
- (temp_rand == 7) ? "a crunching sound"
- : "the tinkle of an enormous bell");
+ if (!silenced(you.x_pos, you.y_pos))
+ {
+ temp_rand = random2(9);
+ mprf("You hear %s.",
+ (temp_rand == 0) ? "snatches of song" :
+ (temp_rand == 1) ? "a voice call someone else's name" :
+ (temp_rand == 2) ? "a very strange noise" :
+ (temp_rand == 3) ? "roaring flame" :
+ (temp_rand == 4) ? "a very strange noise indeed" :
+ (temp_rand == 5) ? "the chiming of a distant gong" :
+ (temp_rand == 6) ? "the bellowing of a yak" :
+ (temp_rand == 7) ? "a crunching sound"
+ : "the tinkle of an enormous bell");
+ }
break;
}