summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-05-09 01:19:29 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-05-09 01:19:29 +0100
commit2d6cb6d8e2e66bb1d511ebf4c90441a3c3de224a (patch)
tree020af8e522d98b0087819892e4f0437edc01e843 /crawl-ref/source/mon-act.cc
parent5691e6de537a61e4091936bb5e55d1c35effc26a (diff)
downloadcrawl-ref-2d6cb6d8e2e66bb1d511ebf4c90441a3c3de224a.tar.gz
crawl-ref-2d6cb6d8e2e66bb1d511ebf4c90441a3c3de224a.zip
Don't distract sleeping monsters with gold either
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index d664fd72ab..43e9a29d76 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2066,7 +2066,8 @@ void handle_monster_move(monster* mons)
}
const int gold = gozag_gold_in_los(mons);
- if (!mons->wont_attack() && gold > 0)
+ if (!mons->asleep()
+ && !mons->wont_attack() && gold > 0)
{
for (int i = 0; i < gold; i++)
if (one_chance_in(20))